-
-## What is charts?
-
-Charts is a PHP (Laravel) library to handle all the charts in your application. It supports multiple
-charting libraries and they allow to be loaded over AJAX with a nice loading animation.
-
-It uses a simple API to create all the JS logic for you. You just need to write a few PHP lines :)
-
-## Documentation
-
-The documentation for the latest version of charts can be found here by pressing the image below.
-
-
-
-## Example screenshot
-
-A sample screenshot of a chartjs chart created using Charts.
-
-
-```
-
-More examples in [the wiki](https://github.com/erusev/parsedown/wiki/) and in [this video tutorial](http://youtu.be/wYZBY8DEikI).
-
-### Security
-
-Parsedown is capable of escaping user-input within the HTML that it generates. Additionally Parsedown will apply sanitisation to additional scripting vectors (such as scripting link destinations) that are introduced by the markdown syntax itself.
-
-To tell Parsedown that it is processing untrusted user-input, use the following:
-```php
-$parsedown = new Parsedown;
-$parsedown->setSafeMode(true);
-```
-
-If instead, you wish to allow HTML within untrusted user-input, but still want output to be free from XSS it is recommended that you make use of a HTML sanitiser that allows HTML tags to be whitelisted, like [HTML Purifier](http://htmlpurifier.org/).
-
-In both cases you should strongly consider employing defence-in-depth measures, like [deploying a Content-Security-Policy](https://scotthelme.co.uk/content-security-policy-an-introduction/) (a browser security feature) so that your page is likely to be safe even if an attacker finds a vulnerability in one of the first lines of defence above.
-
-#### Security of Parsedown Extensions
-
-Safe mode does not necessarily yield safe results when using extensions to Parsedown. Extensions should be evaluated on their own to determine their specific safety against XSS.
-
-### Escaping HTML
-> ⚠️ **WARNING:** This method isn't safe from XSS!
-
-If you wish to escape HTML **in trusted input**, you can use the following:
-```php
-$parsedown = new Parsedown;
-$parsedown->setMarkupEscaped(true);
-```
-
-Beware that this still allows users to insert unsafe scripting vectors, such as links like `[xss](javascript:alert%281%29)`.
-
-### Questions
-
-**How does Parsedown work?**
-
-It tries to read Markdown like a human. First, it looks at the lines. It’s interested in how the lines start. This helps it recognise blocks. It knows, for example, that if a line starts with a `-` then perhaps it belongs to a list. Once it recognises the blocks, it continues to the content. As it reads, it watches out for special characters. This helps it recognise inline elements (or inlines).
-
-We call this approach "line based". We believe that Parsedown is the first Markdown parser to use it. Since the release of Parsedown, other developers have used the same approach to develop other Markdown parsers in PHP and in other languages.
-
-**Is it compliant with CommonMark?**
-
-It passes most of the CommonMark tests. Most of the tests that don't pass deal with cases that are quite uncommon. Still, as CommonMark matures, compliance should improve.
-
-**Who uses it?**
-
-[Laravel Framework](https://laravel.com/), [Bolt CMS](http://bolt.cm/), [Grav CMS](http://getgrav.org/), [Herbie CMS](http://www.getherbie.org/), [Kirby CMS](http://getkirby.com/), [October CMS](http://octobercms.com/), [Pico CMS](http://picocms.org), [Statamic CMS](http://www.statamic.com/), [phpDocumentor](http://www.phpdoc.org/), [RaspberryPi.org](http://www.raspberrypi.org/), [Symfony demo](https://github.com/symfony/symfony-demo) and [more](https://packagist.org/packages/erusev/parsedown/dependents).
-
-**How can I help?**
-
-Use it, star it, share it and if you feel generous, [donate](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=528P3NZQMP8N2).
diff --git a/vendor/erusev/parsedown/composer.json b/vendor/erusev/parsedown/composer.json
deleted file mode 100644
index f8b40f8ce..000000000
--- a/vendor/erusev/parsedown/composer.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
- "name": "erusev/parsedown",
- "description": "Parser for Markdown.",
- "keywords": ["markdown", "parser"],
- "homepage": "http://parsedown.org",
- "type": "library",
- "license": "MIT",
- "authors": [
- {
- "name": "Emanuil Rusev",
- "email": "hello@erusev.com",
- "homepage": "http://erusev.com"
- }
- ],
- "require": {
- "php": ">=5.3.0",
- "ext-mbstring": "*"
- },
- "require-dev": {
- "phpunit/phpunit": "^4.8.35"
- },
- "autoload": {
- "psr-0": {"Parsedown": ""}
- },
- "autoload-dev": {
- "psr-0": {
- "TestParsedown": "test/",
- "ParsedownTest": "test/",
- "CommonMarkTest": "test/",
- "CommonMarkTestWeak": "test/"
- }
- }
-}
diff --git a/vendor/eveseat/eseye/.codeclimate.yml b/vendor/eveseat/eseye/.codeclimate.yml
deleted file mode 100644
index b43927404..000000000
--- a/vendor/eveseat/eseye/.codeclimate.yml
+++ /dev/null
@@ -1,24 +0,0 @@
----
-engines:
- duplication:
- enabled: true
- config:
- languages:
- - javascript
- - php
- fixme:
- enabled: true
- phpmd:
- enabled: true
- checks:
- Controversial/CamelCaseParameterName:
- enabled: false
- Controversial/CamelCasePropertyName:
- enabled: false
- Controversial/CamelCaseVariableName:
- enabled: false
-ratings:
- paths:
- - "**.php"
-exclude_paths:
-- tests/
diff --git a/vendor/eveseat/eseye/.gitignore b/vendor/eveseat/eseye/.gitignore
deleted file mode 100644
index 56e7dac18..000000000
--- a/vendor/eveseat/eseye/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-/vendor/
-composer.lock
-.idea/
-/logs/
-/cache/
-/build/
diff --git a/vendor/eveseat/eseye/.styleci.yml b/vendor/eveseat/eseye/.styleci.yml
deleted file mode 100644
index ac6961aa4..000000000
--- a/vendor/eveseat/eseye/.styleci.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-preset: laravel
-
-risky: false
-
-enabled:
- - alpha_ordered_imports
- - concat_with_spaces
- - no_empty_comment
-
-disabled:
- - braces
- - phpdoc_no_package
- - concat_without_spaces
- - length_ordered_imports
- - no_blank_lines_after_class_opening
- - no_blank_lines_after_throw
-
-finder:
- exclude:
- - "tests"
- name:
- - "*.php"
diff --git a/vendor/eveseat/eseye/.travis.yml b/vendor/eveseat/eseye/.travis.yml
deleted file mode 100644
index 282775004..000000000
--- a/vendor/eveseat/eseye/.travis.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-language: php
-
-php:
- - 7.1
- - 7.2
-
-before_script:
- - echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- - travis_retry composer self-update
- - travis_retry composer install
-
-notifications:
- on_success: never
- on_failure: always
-
-addons:
- code_climate:
- repo_token: $CODE_CLIMATE_TOKEN
-
-script:
- - vendor/bin/phpunit --verbose --coverage-clover build/logs/clover.xml
-
-after_success:
- - vendor/bin/test-reporter
diff --git a/vendor/eveseat/eseye/LICENSE b/vendor/eveseat/eseye/LICENSE
deleted file mode 100644
index 23cb79033..000000000
--- a/vendor/eveseat/eseye/LICENSE
+++ /dev/null
@@ -1,339 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Lesser General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- {description}
- Copyright (C) {year} {fullname}
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- {signature of Ty Coon}, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.
diff --git a/vendor/eveseat/eseye/README.md b/vendor/eveseat/eseye/README.md
deleted file mode 100644
index 208ba54a6..000000000
--- a/vendor/eveseat/eseye/README.md
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-[](https://travis-ci.org/eveseat/eseye)
-[](https://codeclimate.com/github/eveseat/eseye)
-[](https://codeclimate.com/github/eveseat/eseye/coverage)
-[](https://packagist.org/packages/eveseat/eseye)
-[](https://packagist.org/packages/eveseat/eseye)
-[](https://packagist.org/packages/eveseat/eseye)
-[](https://packagist.org/packages/eseye/eveapi)
-[](https://styleci.io/repos/78866259)
-
-# eseye
-👾 A Standalone, Dynamic ESI (EVE Swagger Interface) Client Library written in PHP
-
-## example usage
-Its supposed to be simple!
-
-```php
-// initialization stuff
-$esi = new Eseye();
-
-// Optionally, set the ESI endpoint version to use.
-// If you dont set this, Eseye will use /latest
-$esi->setVersion('v4');
-
-// make a call
-$character_info = $esi->invoke('get', '/characters/{character_id}/', [
- 'character_id' => 1477919642,
-]);
-
-// get data!
-echo $character_info->name;
-```
-
-For a more complete usage example, please refer to [example.php](example.php)
-
-## documentation
-For up to date documentation, more examples and other goodies, please check out the [project wiki](https://github.com/eveseat/eseye/wiki)!
diff --git a/vendor/eveseat/eseye/bin/index.php b/vendor/eveseat/eseye/bin/index.php
deleted file mode 100644
index b68b08e83..000000000
--- a/vendor/eveseat/eseye/bin/index.php
+++ /dev/null
@@ -1,401 +0,0 @@
-
-
-
-
-
-
-
-
- New ESI Refresh Token
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Valid until you delete the app from your account
- here.
-
- Start Again
-
-EOF;
- echo get_footer();
-}
-
-// Ensure we have an action!
-if (! isset($_GET['action']))
- redirect_to_new();
-
-// Worlds most caveman router!
-
-// Decide where to go based on the value of 'action'
-switch ($_GET['action']) {
-
- // Display the form to create a new login.
- case 'new':
- $_SESSION['test'] = 'bob';
- new_login();
- break;
-
- case 'submitsecrets':
- // Ensure we got some values
- if (! isset($_REQUEST['clientid']) ||
- ! isset($_REQUEST['secret']) ||
- ! isset($_REQUEST['scopes'])
- ) {
-
- echo 'All fields are mandatory! ' . PHP_EOL;
- echo 'Start again';
-
- die();
- }
-
- $_SESSION['clientid'] = $_REQUEST['clientid'];
- $_SESSION['secret'] = $_REQUEST['secret'];
- $_SESSION['state'] = uniqid();
-
- // Generate the url with the requested scopes
- $url = 'https://login.eveonline.com/oauth/authorize/?response_type=code&redirect_uri=' .
- urlencode(get_sso_callback_url()) . '&client_id=' .
- $_SESSION['clientid'] . '&scope=' . implode(' ', $_REQUEST['scopes']) . ' &state=' . $_SESSION['state'];
-
- // Print the HTML with the login button.
- print_sso_url($url);
- break;
-
- case 'eveonlinecallback':
- // Verify the state.
- if ($_REQUEST['state'] != $_SESSION['state']) {
-
- echo 'Invalid State! You will have to start again! ';
- echo 'Start again';
- die();
- }
-
- // Clear the state value.
- $_SESSION['state'] = null;
-
- // Prep the authentication header.
- $headers = [
- 'Authorization: Basic ' . base64_encode($_SESSION['clientid'] . ':' . $_SESSION['secret']),
- 'Content-Type: application/json',
- ];
-
- // Seems like CCP does not mind JSON in the body. Yay.
- $fields = json_encode([
- 'grant_type' => 'authorization_code',
- 'code' => $_REQUEST['code'],
- ]);
-
- // Start a cURL session
- $ch = curl_init('https://login.eveonline.com/oauth/token');
- curl_setopt_array($ch, [
- CURLOPT_URL => 'https://login.eveonline.com/oauth/token',
- CURLOPT_POST => true,
- CURLOPT_POSTFIELDS => $fields,
- CURLOPT_HTTPHEADER => $headers,
- CURLOPT_RETURNTRANSFER => true,
- CURLOPT_USERAGENT => 'eseye/tokengenerator',
- CURLOPT_SSL_VERIFYPEER => true,
- CURLOPT_SSL_CIPHER_LIST => 'TLSv1',
- ]
- );
-
- $result = curl_exec($ch);
-
- $data = json_decode($result);
-
- print_tokens($data->access_token, $data->refresh_token);
- break;
-
- // If we dont know what 'action' to perform, then redirect.
- default:
- redirect_to_new();
- break;
-}
diff --git a/vendor/eveseat/eseye/bin/tokengenerator b/vendor/eveseat/eseye/bin/tokengenerator
deleted file mode 100755
index 1fc5831d0..000000000
--- a/vendor/eveseat/eseye/bin/tokengenerator
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/bash
-
-# 2017 - Leon Jacobs
-
-# Server the token generator app using PHP's builtin web server.
-
-# Thanks: http://stackoverflow.com/questions/59895/getting-the-source-directory-of-a-bash-script-from-within?answertab=votes#tab-top
-SOURCE="${BASH_SOURCE[0]}"
-while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
-
- DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
- SOURCE="$(readlink "$SOURCE")"
- [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
-
-done
-DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
-
-php -S 127.0.0.1:9009 -t $DIR
diff --git a/vendor/eveseat/eseye/composer.json b/vendor/eveseat/eseye/composer.json
deleted file mode 100644
index d62809068..000000000
--- a/vendor/eveseat/eseye/composer.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "name": "eveseat/eseye",
- "description": "A Standalone PHP ESI (EVE Swagger Interface) Client Library",
- "type": "library",
- "require": {
- "php": ">= 7.1",
- "guzzlehttp/guzzle": "^6.2",
- "nesbot/carbon": "^1.21|^2.6",
- "monolog/monolog": "^1.22",
- "predis/predis": "^1.1"
- },
- "require-dev": {
- "phpunit/phpunit": "^5.7",
- "mikey179/vfsStream": "~1",
- "codeclimate/php-test-reporter": "dev-master"
- },
- "license": "GPL-2.0",
- "authors": [
- {
- "name": "Leon Jacobs",
- "email": "leonja511@gmail.com"
- }
- ],
- "autoload": {
- "psr-4": {
- "Seat\\Eseye\\": "src/"
- },
- "files": [
- "src/Helpers/helpers.php"
- ]
- },
- "bin": [
- "bin/tokengenerator"
- ]
-}
diff --git a/vendor/eveseat/eseye/example.php b/vendor/eveseat/eseye/example.php
deleted file mode 100644
index d3a4fc3ea..000000000
--- a/vendor/eveseat/eseye/example.php
+++ /dev/null
@@ -1,74 +0,0 @@
-cache = NullCache::class;
-
-// Prepare an authentication container for ESI
-$authentication = new EsiAuthentication([
- 'client_id' => 'SSO_CLIENT_ID',
- 'secret' => 'SSO_SECRET',
- 'refresh_token' => 'CHARACTER_REFRESH_TOKEN',
-]);
-
-// Instantiate a new ESI instance.
-$esi = new Eseye($authentication);
-
-// Get character information. This is a public call to the EVE
-// Swagger Interface
-$character_info = $esi->invoke('get', '/characters/{character_id}/', [
- 'character_id' => 1477919642,
-]);
-
-// Get the location information for a character. This is an authenticated
-// call to the EVE Swagger Interface.
-$location = $esi->invoke('get', '/characters/{character_id}/location/', [
- 'character_id' => 1477919642,
-]);
-
-$clones = $esi->invoke('get', '/characters/{character_id}/clones/', [
- 'character_id' => 1477919642,
-]);
-
-// Print some information from the calls we have made.
-echo 'Character Name is: ' . $character_info->name . PHP_EOL;
-echo 'Character was born: ' . carbon($character_info->birthday)
- ->diffForHumans() . PHP_EOL; // The 'carbon' helper is included in the package.
-echo 'Home Solar System ID is: ' . $location->solar_system_id . PHP_EOL;
-echo 'Home Station ID is: ' . $location->station_id . PHP_EOL;
-
-echo 'You have the following clones: ' . PHP_EOL;
-foreach ($clones->jump_clones as $jump_clone) {
-
- echo 'Clone at a ' . $jump_clone->location_type .
- ' with ' . count($jump_clone->implants) . ' implants' . PHP_EOL;
-}
diff --git a/vendor/eveseat/eseye/phpunit.xml b/vendor/eveseat/eseye/phpunit.xml
deleted file mode 100644
index 02dc69671..000000000
--- a/vendor/eveseat/eseye/phpunit.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
- ./tests/
-
-
-
-
- ./src/
-
-
-
diff --git a/vendor/eveseat/eseye/src/Access/AccessInterface.php b/vendor/eveseat/eseye/src/Access/AccessInterface.php
deleted file mode 100644
index 76e644b47..000000000
--- a/vendor/eveseat/eseye/src/Access/AccessInterface.php
+++ /dev/null
@@ -1,39 +0,0 @@
- [
-
- // 'meta' URI's. see: https://esi.evetech.net/ui/?version=meta
- '/ping' => 'public',
-
- // Generated using tools: php get_endpoints_and_scopes.php
- '/alliances/{alliance_id}/' => 'public',
- '/alliances/{alliance_id}/corporations/' => 'public',
- '/alliances/names/' => 'public',
- '/alliances/{alliance_id}/icons/' => 'public',
- '/alliances/' => 'public',
- '/characters/{character_id}/assets/' => 'esi-assets.read_assets.v1',
- '/corporations/{corporation_id}/assets/' => 'esi-assets.read_corporation_assets.v1',
- '/characters/{character_id}/bookmarks/' => 'esi-bookmarks.read_character_bookmarks.v1',
- '/characters/{character_id}/bookmarks/folders/' => 'esi-bookmarks.read_character_bookmarks.v1',
- '/corporations/{corporation_id}/bookmarks/' => 'esi-bookmarks.read_corporation_bookmarks.v1',
- '/corporations/{corporation_id}/bookmarks/folders/' => 'esi-bookmarks.read_corporation_bookmarks.v1',
- '/characters/{character_id}/calendar/' => 'esi-calendar.read_calendar_events.v1',
- '/characters/{character_id}/calendar/{event_id}/' => 'esi-calendar.read_calendar_events.v1',
- '/characters/{character_id}/calendar/{event_id}/attendees/' => 'esi-calendar.read_calendar_events.v1',
- '/characters/{character_id}/stats/' => 'esi-characterstats.read.v1',
- '/characters/{character_id}/' => 'public',
- '/characters/names/' => 'public',
- '/characters/{character_id}/portrait/' => 'public',
- '/characters/{character_id}/corporationhistory/' => 'public',
- '/characters/{character_id}/chat_channels/' => 'esi-characters.read_chat_channels.v1',
- '/characters/{character_id}/medals/' => 'esi-characters.read_medals.v1',
- '/characters/{character_id}/standings/' => 'esi-characters.read_standings.v1',
- '/characters/{character_id}/agents_research/' => 'esi-characters.read_agents_research.v1',
- '/characters/{character_id}/blueprints/' => 'esi-characters.read_blueprints.v1',
- '/characters/{character_id}/fatigue/' => 'esi-characters.read_fatigue.v1',
- '/characters/{character_id}/notifications/contacts/' => 'esi-characters.read_notifications.v1',
- '/characters/{character_id}/notifications/' => 'esi-characters.read_notifications.v1',
- '/characters/{character_id}/roles/' => 'esi-characters.read_corporation_roles.v1',
- '/characters/{character_id}/titles/' => 'esi-characters.read_titles.v1',
- '/characters/{character_id}/clones/' => 'esi-clones.read_clones.v1',
- '/characters/{character_id}/implants/' => 'esi-clones.read_implants.v1',
- '/characters/{character_id}/contacts/' => 'esi-characters.read_contacts.v1',
- '/corporations/{corporation_id}/contacts/' => 'esi-corporations.read_contacts.v1',
- '/alliances/{alliance_id}/contacts/' => 'esi-alliances.read_contacts.v1',
- '/characters/{character_id}/contacts/labels/' => 'esi-characters.read_contacts.v1',
- '/corporations/{corporation_id}/contacts/labels/' => 'esi-corporations.read_contacts.v1',
- '/characters/{character_id}/contracts/' => 'esi-contracts.read_character_contracts.v1',
- '/characters/{character_id}/contracts/{contract_id}/items/' => 'esi-contracts.read_character_contracts.v1',
- '/characters/{character_id}/contracts/{contract_id}/bids/' => 'esi-contracts.read_character_contracts.v1',
- '/corporations/{corporation_id}/contracts/' => 'esi-contracts.read_corporation_contracts.v1',
- '/corporations/{corporation_id}/contracts/{contract_id}/items/' => 'esi-contracts.read_corporation_contracts.v1',
- '/corporations/{corporation_id}/contracts/{contract_id}/bids/' => 'esi-contracts.read_corporation_contracts.v1',
- '/corporations/{corporation_id}/shareholders/' => 'esi-wallet.read_corporation_wallets.v1',
- '/corporations/{corporation_id}/' => 'public',
- '/corporations/{corporation_id}/alliancehistory/' => 'public',
- '/corporations/names/' => 'public',
- '/corporations/{corporation_id}/members/' => 'esi-corporations.read_corporation_membership.v1',
- '/corporations/{corporation_id}/roles/' => 'esi-corporations.read_corporation_membership.v1',
- '/corporations/{corporation_id}/roles/history/' => 'esi-corporations.read_corporation_membership.v1',
- '/corporations/{corporation_id}/icons/' => 'public',
- '/corporations/npccorps/' => 'public',
- '/corporations/{corporation_id}/structures/' => 'esi-corporations.read_structures.v1',
- '/corporations/{corporation_id}/membertracking/' => 'esi-corporations.track_members.v1',
- '/corporations/{corporation_id}/divisions/' => 'esi-corporations.read_divisions.v1',
- '/corporations/{corporation_id}/members/limit/' => 'esi-corporations.track_members.v1',
- '/corporations/{corporation_id}/titles/' => 'esi-corporations.read_titles.v1',
- '/corporations/{corporation_id}/members/titles/' => 'esi-corporations.read_titles.v1',
- '/corporations/{corporation_id}/blueprints/' => 'esi-corporations.read_blueprints.v1',
- '/corporations/{corporation_id}/standings/' => 'esi-corporations.read_standings.v1',
- '/corporations/{corporation_id}/starbases/' => 'esi-corporations.read_starbases.v1',
- '/corporations/{corporation_id}/starbases/{starbase_id}/' => 'esi-corporations.read_starbases.v1',
- '/corporations/{corporation_id}/containers/logs/' => 'esi-corporations.read_container_logs.v1',
- '/corporations/{corporation_id}/facilities/' => 'esi-corporations.read_facilities.v1',
- '/corporations/{corporation_id}/medals/' => 'esi-corporations.read_medals.v1',
- '/corporations/{corporation_id}/medals/issued/' => 'esi-corporations.read_medals.v1',
- '/dogma/attributes/' => 'public',
- '/dogma/attributes/{attribute_id}/' => 'public',
- '/dogma/effects/' => 'public',
- '/dogma/effects/{effect_id}/' => 'public',
- '/fw/wars/' => 'public',
- '/fw/stats/' => 'public',
- '/fw/systems/' => 'public',
- '/fw/leaderboards/' => 'public',
- '/fw/leaderboards/characters/' => 'public',
- '/fw/leaderboards/corporations/' => 'public',
- '/corporations/{corporation_id}/fw/stats/' => 'esi-corporations.read_fw_stats.v1',
- '/characters/{character_id}/fw/stats/' => 'esi-characters.read_fw_stats.v1',
- '/characters/{character_id}/fittings/' => 'esi-fittings.read_fittings.v1',
- '/fleets/{fleet_id}/' => 'esi-fleets.read_fleet.v1',
- '/characters/{character_id}/fleet/' => 'esi-fleets.read_fleet.v1',
- '/fleets/{fleet_id}/members/' => 'esi-fleets.read_fleet.v1',
- '/fleets/{fleet_id}/wings/' => 'esi-fleets.read_fleet.v1',
- '/incursions/' => 'public',
- '/industry/facilities/' => 'public',
- '/industry/systems/' => 'public',
- '/characters/{character_id}/industry/jobs/' => 'esi-industry.read_character_jobs.v1',
- '/characters/{character_id}/mining/' => 'esi-industry.read_character_mining.v1',
- '/corporation/{corporation_id}/mining/observers/' => 'esi-industry.read_corporation_mining.v1',
- '/corporation/{corporation_id}/mining/observers/{observer_id}/' => 'esi-industry.read_corporation_mining.v1',
- '/corporations/{corporation_id}/industry/jobs/' => 'esi-industry.read_corporation_jobs.v1',
- '/corporation/{corporation_id}/mining/extractions/' => 'esi-industry.read_corporation_mining.v1',
- '/insurance/prices/' => 'public',
- '/killmails/{killmail_id}/{killmail_hash}/' => 'public',
- '/characters/{character_id}/killmails/recent/' => 'esi-killmails.read_killmails.v1',
- '/corporations/{corporation_id}/killmails/recent/' => 'esi-killmails.read_corporation_killmails.v1',
- '/characters/{character_id}/location/' => 'esi-location.read_location.v1',
- '/characters/{character_id}/ship/' => 'esi-location.read_ship_type.v1',
- '/characters/{character_id}/online/' => 'esi-location.read_online.v1',
- '/loyalty/stores/{corporation_id}/offers/' => 'public',
- '/characters/{character_id}/loyalty/points/' => 'esi-characters.read_loyalty.v1',
- '/characters/{character_id}/mail/' => 'esi-mail.read_mail.v1',
- '/characters/{character_id}/mail/labels/' => 'esi-mail.read_mail.v1',
- '/characters/{character_id}/mail/lists/' => 'esi-mail.read_mail.v1',
- '/characters/{character_id}/mail/{mail_id}/' => 'esi-mail.read_mail.v1',
- '/markets/prices/' => 'public',
- '/markets/{region_id}/orders/' => 'public',
- '/markets/{region_id}/history/' => 'public',
- '/markets/structures/{structure_id}/' => 'esi-markets.structure_markets.v1',
- '/markets/groups/' => 'public',
- '/markets/groups/{market_group_id}/' => 'public',
- '/characters/{character_id}/orders/' => 'esi-markets.read_character_orders.v1',
- '/markets/{region_id}/types/' => 'public',
- '/corporations/{corporation_id}/orders/' => 'esi-markets.read_corporation_orders.v1',
- '/opportunities/groups/' => 'public',
- '/opportunities/groups/{group_id}/' => 'public',
- '/opportunities/tasks/' => 'public',
- '/opportunities/tasks/{task_id}/' => 'public',
- '/characters/{character_id}/opportunities/' => 'esi-characters.read_opportunities.v1',
- '/characters/{character_id}/planets/' => 'esi-planets.manage_planets.v1',
- '/characters/{character_id}/planets/{planet_id}/' => 'esi-planets.manage_planets.v1',
- '/universe/schematics/{schematic_id}/' => 'public',
- '/corporations/{corporation_id}/customs_offices/' => 'esi-planets.read_customs_offices.v1',
- '/route/{origin}/{destination}/' => 'public',
- '/characters/{character_id}/search/' => 'esi-search.search_structures.v1',
- '/search/' => 'public',
- '/characters/{character_id}/skillqueue/' => 'esi-skills.read_skillqueue.v1',
- '/characters/{character_id}/skills/' => 'esi-skills.read_skills.v1',
- '/characters/{character_id}/attributes/' => 'esi-skills.read_skills.v1',
- '/sovereignty/structures/' => 'public',
- '/sovereignty/campaigns/' => 'public',
- '/sovereignty/map/' => 'public',
- '/status/' => 'public',
- '/universe/planets/{planet_id}/' => 'public',
- '/universe/stations/{station_id}/' => 'public',
- '/universe/structures/{structure_id}/' => 'esi-universe.read_structures.v1',
- '/universe/systems/{system_id}/' => 'public',
- '/universe/systems/' => 'public',
- '/universe/types/{type_id}/' => 'public',
- '/universe/types/' => 'public',
- '/universe/groups/' => 'public',
- '/universe/groups/{group_id}/' => 'public',
- '/universe/categories/' => 'public',
- '/universe/categories/{category_id}/' => 'public',
- '/universe/structures/' => 'public',
- '/universe/races/' => 'public',
- '/universe/factions/' => 'public',
- '/universe/bloodlines/' => 'public',
- '/universe/regions/' => 'public',
- '/universe/regions/{region_id}/' => 'public',
- '/universe/constellations/' => 'public',
- '/universe/constellations/{constellation_id}/' => 'public',
- '/universe/moons/{moon_id}/' => 'public',
- '/universe/stargates/{stargate_id}/' => 'public',
- '/universe/graphics/' => 'public',
- '/universe/graphics/{graphic_id}/' => 'public',
- '/universe/system_jumps/' => 'public',
- '/universe/system_kills/' => 'public',
- '/universe/stars/{star_id}/' => 'public',
- '/characters/{character_id}/wallet/' => 'esi-wallet.read_character_wallet.v1',
- '/characters/{character_id}/wallet/journal/' => 'esi-wallet.read_character_wallet.v1',
- '/characters/{character_id}/wallet/transactions/' => 'esi-wallet.read_character_wallet.v1',
- '/corporations/{corporation_id}/wallets/' => 'esi-wallet.read_corporation_wallets.v1',
- '/corporations/{corporation_id}/wallets/{division}/journal/' => 'esi-wallet.read_corporation_wallets.v1',
- '/corporations/{corporation_id}/wallets/{division}/transactions/' => 'esi-wallet.read_corporation_wallets.v1',
- '/wars/' => 'public',
- '/wars/{war_id}/' => 'public',
- '/wars/{war_id}/killmails/' => 'public',
- ],
- 'post' => [
- '/characters/{character_id}/assets/names/' => 'esi-assets.read_assets.v1',
- '/characters/{character_id}/assets/locations/' => 'esi-assets.read_assets.v1',
- '/corporations/{corporation_id}/assets/names/' => 'esi-assets.read_corporation_assets.v1',
- '/corporations/{corporation_id}/assets/locations/' => 'esi-assets.read_corporation_assets.v1',
- '/characters/affiliation/' => 'public',
- '/characters/{character_id}/cspa/' => 'esi-characters.read_contacts.v1',
- '/characters/{character_id}/contacts/' => 'esi-characters.write_contacts.v1',
- '/characters/{character_id}/fittings/' => 'esi-fittings.write_fittings.v1',
- '/fleets/{fleet_id}/members/' => 'esi-fleets.write_fleet.v1',
- '/fleets/{fleet_id}/wings/' => 'esi-fleets.write_fleet.v1',
- '/fleets/{fleet_id}/wings/{wing_id}/squads/' => 'esi-fleets.write_fleet.v1',
- '/characters/{character_id}/mail/' => 'esi-mail.send_mail.v1',
- '/characters/{character_id}/mail/labels/' => 'esi-mail.organize_mail.v1',
- '/universe/names/' => 'public',
- '/universe/ids/' => 'public',
- '/ui/openwindow/marketdetails/' => 'esi-ui.open_window.v1',
- '/ui/openwindow/contract/' => 'esi-ui.open_window.v1',
- '/ui/openwindow/information/' => 'esi-ui.open_window.v1',
- '/ui/autopilot/waypoint/' => 'esi-ui.write_waypoint.v1',
- '/ui/openwindow/newmail/' => 'esi-ui.open_window.v1',
- ],
- 'put' => [
- '/characters/{character_id}/calendar/{event_id}/' => 'esi-calendar.respond_calendar_events.v1',
- '/characters/{character_id}/contacts/' => 'esi-characters.write_contacts.v1',
- '/corporations/{corporation_id}/structures/{structure_id}/' => 'esi-corporations.write_structures.v1',
- '/fleets/{fleet_id}/' => 'esi-fleets.write_fleet.v1',
- '/fleets/{fleet_id}/members/{member_id}/' => 'esi-fleets.write_fleet.v1',
- '/fleets/{fleet_id}/wings/{wing_id}/' => 'esi-fleets.write_fleet.v1',
- '/fleets/{fleet_id}/squads/{squad_id}/' => 'esi-fleets.write_fleet.v1',
- '/characters/{character_id}/mail/{mail_id}/' => 'esi-mail.organize_mail.v1',
- ],
- 'delete' => [
- '/characters/{character_id}/contacts/' => 'esi-characters.write_contacts.v1',
- '/characters/{character_id}/fittings/{fitting_id}/' => 'esi-fittings.write_fittings.v1',
- '/fleets/{fleet_id}/members/{member_id}/' => 'esi-fleets.write_fleet.v1',
- '/fleets/{fleet_id}/wings/{wing_id}/' => 'esi-fleets.write_fleet.v1',
- '/fleets/{fleet_id}/squads/{squad_id}/' => 'esi-fleets.write_fleet.v1',
- '/characters/{character_id}/mail/labels/{label_id}/' => 'esi-mail.organize_mail.v1',
- '/characters/{character_id}/mail/{mail_id}/' => 'esi-mail.organize_mail.v1',
- ],
- 'patch' => [
- ],
- ];
-
- /**
- * @param string $method
- * @param string $uri
- * @param array $scopes
- *
- * @return bool|mixed
- * @throws \Seat\Eseye\Exceptions\InvalidContainerDataException
- */
- public function can(string $method, string $uri, array $scopes): bool
- {
-
- if (! array_key_exists($uri, $this->scope_map[$method])) {
-
- Configuration::getInstance()->getLogger()
- ->warning('An unknown URI was called. Allowing ' . $uri);
-
- return true;
- }
-
- $required_scope = $this->scope_map[$method][$uri];
-
- // Public scopes require no authentication!
- if ($required_scope == 'public')
- return true;
-
- if (! in_array($required_scope, $scopes))
- return false;
-
- return true;
- }
-}
diff --git a/vendor/eveseat/eseye/src/Cache/CacheInterface.php b/vendor/eveseat/eseye/src/Cache/CacheInterface.php
deleted file mode 100644
index d9846bf11..000000000
--- a/vendor/eveseat/eseye/src/Cache/CacheInterface.php
+++ /dev/null
@@ -1,65 +0,0 @@
-cache_path = Configuration::getInstance()
- ->file_cache_location;
-
- // Ensure the cache directory is OK
- $this->checkCacheDirectory();
- }
-
- /**
- * @return bool
- * @throws \Seat\Eseye\Exceptions\CachePathException
- */
- public function checkCacheDirectory()
- {
-
- // Ensure the cache path exists
- if (! is_dir($this->cache_path) &&
- ! @mkdir($this->cache_path, 0775, true)
- ) {
- throw new CachePathException(
- 'Unable to create cache directory ' . $this->cache_path);
- }
-
- // Ensure the cache directory is readable/writable
- if (! is_readable($this->cache_path) ||
- ! is_writable($this->cache_path)
- ) {
-
- if (! chmod($this->getCachePath(), 0775))
- throw new CachePathException(
- $this->cache_path . ' must be readable and writable');
- }
-
- return true;
- }
-
- /**
- * @return string
- */
- public function getCachePath(): string
- {
-
- return $this->cache_path;
- }
-
- /**
- * @param string $uri
- * @param string $query
- * @param \Seat\Eseye\Containers\EsiResponse $data
- *
- * @return mixed|void
- */
- public function set(string $uri, string $query, EsiResponse $data)
- {
-
- $path = $this->buildRelativePath($this->safePath($uri), $query);
-
- // Create the subpath if that does not already exist
- if (! file_exists($path))
- @mkdir($path, 0775, true);
-
- // Dump the contents to file
- file_put_contents($path . $this->results_filename, serialize($data));
- }
-
- /**
- * @param string $path
- * @param string $query
- *
- * @return string
- */
- public function buildRelativePath(string $path, string $query = ''): string
- {
-
- // If the query string has data, hash it.
- if ($query != '')
- $query = $this->hashString($query);
-
- return rtrim(rtrim($this->cache_path, '/') . rtrim($path), '/') .
- '/' . $query . '/';
- }
-
- /**
- * @param string $uri
- *
- * @return string
- */
- public function safePath(string $uri): string
- {
-
- return preg_replace('/[^A-Za-z0-9\/]/', '', $uri);
- }
-
- /**
- * @param string $uri
- * @param string $query
- *
- * @return bool|mixed
- */
- public function has(string $uri, string $query = ''): bool
- {
-
- if ($status = $this->get($uri, $query))
- return true;
-
- return false;
- }
-
- /**
- * @param string $uri
- * @param string $query
- *
- * @return mixed
- */
- public function get(string $uri, string $query = '')
- {
-
- $path = $this->buildRelativePath($this->safePath($uri), $query);
- $cache_file_path = $path . $this->results_filename;
-
- // If we cant read from the cache, then just return false.
- if (! is_readable($cache_file_path))
- return false;
-
- // Get the data from the file and unserialize it
- $file = unserialize(file_get_contents($cache_file_path));
-
- // If the cached entry is expired and does not have any ETag, remove it.
- if ($file->expired() && ! $file->hasHeader('ETag')) {
-
- $this->forget($uri, $query);
-
- return false;
- }
-
- return $file;
- }
-
- /**
- * @param string $uri
- * @param string $query
- *
- * @return void
- */
- public function forget(string $uri, string $query = '')
- {
-
- $path = $this->buildRelativePath($uri, $query);
- $cache_file_path = $path . $this->results_filename;
-
- @unlink($cache_file_path);
- }
-}
diff --git a/vendor/eveseat/eseye/src/Cache/HashesStrings.php b/vendor/eveseat/eseye/src/Cache/HashesStrings.php
deleted file mode 100644
index b7fa20011..000000000
--- a/vendor/eveseat/eseye/src/Cache/HashesStrings.php
+++ /dev/null
@@ -1,41 +0,0 @@
-memcached = $instance;
-
- $this->is_memcached = class_exists('Memcached', false);
-
- $configuration = Configuration::getInstance();
- $this->prefix = $configuration->memcached_cache_prefix;
-
- if (is_null($this->memcached)) {
- if ($this->is_memcached)
- $this->memcached = new \Memcached();
- else
- $this->memcached = new \Memcache();
-
- $this->memcached->addServer($configuration->memcached_cache_host, $configuration->memcached_cache_port, 0);
-
- if ($this->is_memcached)
- $this->memcached->setOption(\Memcached::OPT_COMPRESSION, ($configuration->memcached_cache_compressed));
- else
- $this->flags = ($configuration->memcached_cache_compressed) ? MEMCACHE_COMPRESSED : 0;
- }
-
- }
-
- /**
- * @param string $uri
- * @param string $query
- * @param \Seat\Eseye\Containers\EsiResponse $data
- *
- * @return void
- */
- public function set(string $uri, string $query, EsiResponse $data)
- {
-
- if ($this->is_memcached)
- $this->memcached->set($this->buildCacheKey($uri, $query), serialize($data), 0);
- else
- $this->memcached->set($this->buildCacheKey($uri, $query), serialize($data), $this->flags, 0);
- }
-
- /**
- * @param string $uri
- * @param string $query
- *
- * @return string
- */
- public function buildCacheKey(string $uri, string $query = ''): string
- {
-
- if ($query != '')
- $query = $this->hashString($query);
-
- return $this->prefix . $this->hashString($uri . $query);
- }
-
- /**
- * @param string $uri
- * @param string $query
- *
- * @return mixed
- */
- public function get(string $uri, string $query = '')
- {
-
- $value = $this->memcached->get($this->buildCacheKey($uri, $query));
- if ($value === false)
- return false;
-
- $data = unserialize($value);
-
- // If the cached entry is expired and does not have any ETag, remove it.
- if ($data->expired() && ! $data->hasHeader('ETag')) {
- $this->forget($uri, $query);
-
- return false;
- }
-
- return $data;
- }
-
- /**
- * @param string $uri
- * @param string $query
- *
- * @return mixed
- */
- public function forget(string $uri, string $query = '')
- {
-
- return $this->memcached->delete($this->buildCacheKey($uri, $query));
- }
-
- /**
- * @param string $uri
- * @param string $query
- *
- * @return bool|mixed
- */
- public function has(string $uri, string $query = ''): bool
- {
-
- return $this->memcached->get($this->buildCacheKey($uri, $query)) !== false;
- }
-}
diff --git a/vendor/eveseat/eseye/src/Cache/NullCache.php b/vendor/eveseat/eseye/src/Cache/NullCache.php
deleted file mode 100644
index 6ba6a0d22..000000000
--- a/vendor/eveseat/eseye/src/Cache/NullCache.php
+++ /dev/null
@@ -1,79 +0,0 @@
-redis = new Client($configuration->redis_cache_location, [
- 'prefix' => $configuration->redis_cache_prefix,
- ]);
-
- return;
- }
-
- $this->redis = $redis;
- }
-
- /**
- * @param string $uri
- * @param string $query
- * @param \Seat\Eseye\Containers\EsiResponse $data
- *
- * @return void
- */
- public function set(string $uri, string $query, EsiResponse $data)
- {
-
- $this->redis->set($this->buildCacheKey($uri, $query), serialize($data));
- }
-
- /**
- * @param string $uri
- * @param string $query
- *
- * @return string
- */
- public function buildCacheKey(string $uri, string $query = ''): string
- {
-
- if ($query != '')
- $query = $this->hashString($query);
-
- return $this->hashString($uri . $query);
- }
-
- /**
- * @param string $uri
- * @param string $query
- *
- * @return mixed
- */
- public function get(string $uri, string $query = '')
- {
-
- if (! $this->has($uri, $query))
- return false;
-
- $data = unserialize($this->redis
- ->get($this->buildCacheKey($uri, $query)));
-
- // If the cached entry is expired and does not have any ETag, remove it.
- if ($data->expired() && ! $data->hasHeader('ETag')) {
-
- $this->forget($uri, $query);
-
- return false;
- }
-
- return $data;
- }
-
- /**
- * @param string $uri
- * @param string $query
- *
- * @return bool|mixed
- */
- public function has(string $uri, string $query = ''): bool
- {
-
- return $this->redis->exists($this->buildCacheKey($uri, $query));
- }
-
- /**
- * @param string $uri
- * @param string $query
- *
- * @return mixed
- */
- public function forget(string $uri, string $query = '')
- {
-
- return $this->redis->del([$this->buildCacheKey($uri, $query)]);
- }
-}
diff --git a/vendor/eveseat/eseye/src/Configuration.php b/vendor/eveseat/eseye/src/Configuration.php
deleted file mode 100644
index 9cdd5b8d2..000000000
--- a/vendor/eveseat/eseye/src/Configuration.php
+++ /dev/null
@@ -1,153 +0,0 @@
-configuration = new EsiConfiguration;
- }
-
- /**
- * @return \Seat\Eseye\Configuration
- * @throws \Seat\Eseye\Exceptions\InvalidContainerDataException
- */
- public static function getInstance(): self
- {
-
- if (is_null(self::$instance))
- self::$instance = new self();
-
- return self::$instance;
- }
-
- /**
- * @return \Seat\Eseye\Containers\EsiConfiguration
- */
- public function getConfiguration()
- {
-
- return $this->configuration;
- }
-
- /**
- * @param \Seat\Eseye\Containers\EsiConfiguration $configuration
- *
- * @throws \Seat\Eseye\Exceptions\InvalidConfigurationException
- */
- public function setConfiguration(EsiConfiguration $configuration)
- {
-
- if (! $configuration->valid())
- throw new InvalidConfigurationException(
- 'The configuration is empty/invalid values');
-
- $this->configuration = $configuration;
- }
-
- /**
- * @return \Seat\Eseye\Log\LogInterface
- */
- public function getLogger(): LogInterface
- {
-
- if (! $this->logger)
- $this->logger = new $this->configuration->logger;
-
- return $this->logger;
- }
-
- /**
- * @return \Seat\Eseye\Cache\CacheInterface
- */
- public function getCache(): CacheInterface
- {
-
- if (! $this->cache)
- $this->cache = new $this->configuration->cache;
-
- return $this->cache;
- }
-
- /**
- * Magic method to get the configuration from the configuration
- * property.
- *
- * @param $name
- *
- * @return mixed
- */
- public function __get(string $name)
- {
-
- return $this->configuration->$name;
- }
-
- /**
- * @param string $name
- * @param string $value
- *
- * @return string
- */
- public function __set(string $name, string $value)
- {
-
- return $this->configuration->$name = $value;
- }
-}
diff --git a/vendor/eveseat/eseye/src/Containers/AbstractArrayAccess.php b/vendor/eveseat/eseye/src/Containers/AbstractArrayAccess.php
deleted file mode 100644
index 5b02ef7e4..000000000
--- a/vendor/eveseat/eseye/src/Containers/AbstractArrayAccess.php
+++ /dev/null
@@ -1,98 +0,0 @@
-data);
- }
-
- /**
- * @param mixed $offset
- *
- * @return mixed
- */
- public function offsetGet($offset)
- {
-
- return $this->data[$offset];
- }
-
- /**
- * @param mixed $offset
- * @param mixed $value
- */
- public function offsetSet($offset, $value)
- {
-
- $this->data[$offset] = $value;
- }
-
- /**
- * @param mixed $offset
- */
- public function offsetUnset($offset)
- {
-
- unset($this->data[$offset]);
- }
-
- /**
- * @param $key
- *
- * @return mixed
- */
- public function __get($key)
- {
-
- return $this[$key];
- }
-
- /**
- * @param $key
- * @param $val
- */
- public function __set($key, $val)
- {
-
- $this[$key] = $val;
- }
-}
diff --git a/vendor/eveseat/eseye/src/Containers/EsiAuthentication.php b/vendor/eveseat/eseye/src/Containers/EsiAuthentication.php
deleted file mode 100644
index 048292862..000000000
--- a/vendor/eveseat/eseye/src/Containers/EsiAuthentication.php
+++ /dev/null
@@ -1,56 +0,0 @@
- null,
- 'secret' => null,
- 'access_token' => '_',
- 'refresh_token' => null,
- 'token_expires' => '1970-01-01 00:00:00',
- 'scopes' => [],
- ];
-
- public function setRefreshToken(String $refreshToken): self
- {
-
- $this->data['refresh_token'] = $refreshToken;
-
- return $this;
- }
-}
diff --git a/vendor/eveseat/eseye/src/Containers/EsiConfiguration.php b/vendor/eveseat/eseye/src/Containers/EsiConfiguration.php
deleted file mode 100644
index b2d24161f..000000000
--- a/vendor/eveseat/eseye/src/Containers/EsiConfiguration.php
+++ /dev/null
@@ -1,86 +0,0 @@
- 'Eseye Default Library',
-
- // Esi
- 'datasource' => 'tranquility',
- 'esi_scheme' => 'https',
- 'esi_host' => 'esi.evetech.net',
- 'esi_port' => 443,
-
- // Eve Online SSO
- 'sso_scheme' => 'https',
- 'sso_host' => 'login.eveonline.com',
- 'sso_port' => 443,
-
- // Fetcher
- 'fetcher' => GuzzleFetcher::class,
-
- // Logging
- 'logger' => RotatingFileLogger::class,
- 'logger_level' => Logger::INFO,
- 'logfile_location' => 'logs/',
-
- // Rotating Logger Details
- 'log_max_files' => 10,
-
- // Cache
- 'cache' => FileCache::class,
-
- // File Cache
- 'file_cache_location' => 'cache/',
-
- // Redis Cache
- 'redis_cache_location' => 'tcp://127.0.0.1',
- 'redis_cache_prefix' => 'eseye:',
-
- // Memcached Cache
- 'memcached_cache_host' => '127.0.0.1',
- 'memcached_cache_port' => '11211',
- 'memcached_cache_prefix' => 'eseye:',
- 'memcached_cache_compressed' => false,
- ];
-
-}
diff --git a/vendor/eveseat/eseye/src/Containers/EsiResponse.php b/vendor/eveseat/eseye/src/Containers/EsiResponse.php
deleted file mode 100644
index 16c077233..000000000
--- a/vendor/eveseat/eseye/src/Containers/EsiResponse.php
+++ /dev/null
@@ -1,277 +0,0 @@
-raw = $data;
-
- // Normalize and parse the response headers
- $this->parseHeaders($headers);
-
- // decode and create an object from the data
- $data = (object) json_decode($data);
-
- // Ensure that the value for 'expires' is longer than
- // 2 characters. The shortest expected value is 'now'. If it
- // is not longer than 2 characters it might be empty.
- $this->expires_at = strlen($expires) > 2 ? $expires : 'now';
- $this->response_code = $response_code;
-
- // If there is an error, set that.
- if (property_exists($data, 'error'))
- $this->error_message = $data->error;
-
- // If there is an error description, set that.
- if (property_exists($data, 'error_description'))
- $this->error_message .= ': ' . $data->error_description;
-
- // Run the parent constructor
- parent::__construct($data, ArrayObject::ARRAY_AS_PROPS);
- }
-
- /**
- * Parse an array of header key value pairs.
- *
- * Interesting header values such as X-Esi-Error-Limit-Remain
- * and X-Pages are automatically mapped to properties in this
- * object.
- *
- * @param array $headers
- */
- private function parseHeaders(array $headers)
- {
-
- // Set the raw headers as we got from the constructor.
- $this->raw_headers = $headers;
-
- // flatten the headers array so that values are not arrays themselves
- // but rather simple key value pairs.
- $headers = array_map(function ($value) {
-
- if (! is_array($value))
- return $value;
-
- return implode(';', $value);
- }, $headers);
-
- // Set the parsed headers.
- $this->headers = $headers;
-
- // Check for some header values that might be interesting
- // such as the current error limit and number of pages
- // available.
- $this->hasHeader('X-Esi-Error-Limit-Remain') ?
- $this->error_limit = (int) $this->getHeader('X-Esi-Error-Limit-Remain') : null;
-
- $this->hasHeader('X-Pages') ? $this->pages = (int) $this->getHeader('X-Pages') : null;
- }
-
- /**
- * A helper method when a key might not exist within the
- * response object.
- *
- * @param string $index
- *
- * @return mixed
- */
- public function optional(string $index)
- {
-
- if (! $this->offsetExists($index))
- return null;
-
- return $this->$index;
- }
-
- /**
- * Determine if this containers data should be considered
- * expired.
- *
- * Expiry is calculated by taking the expiry time and comparing
- * that to the local time. Before comparison though, the local
- * time is converted to the timezone in which the expiry time
- * is recorded. The resultant local time is then checked to
- * ensure that the expiry is not less than local time.
- *
- * @return bool
- */
- public function expired(): bool
- {
-
- if ($this->expires()->lte(
- carbon()->now($this->expires()->timezoneName))
- )
- return true;
-
- return false;
- }
-
- /**
- * @return \Carbon\Carbon
- */
- public function expires(): Carbon
- {
-
- return carbon($this->expires_at);
- }
-
- /**
- * @return null|string
- */
- public function error()
- {
-
- return $this->error_message;
- }
-
- /**
- * @return int
- */
- public function getErrorCode(): int
- {
-
- return $this->response_code;
- }
-
- /**
- * @return bool
- */
- public function setIsCachedLoad(): bool
- {
-
- return $this->cached_load = true;
- }
-
- /**
- * @return bool
- */
- public function isCachedLoad(): bool
- {
-
- return $this->cached_load;
- }
-
- /**
- * @param string $name
- * @return bool
- */
- public function hasHeader(string $name)
- {
- // turn headers into case insensitive array
- $key_map = array_change_key_case($this->headers, CASE_LOWER);
-
- // track for the requested header name
- return array_key_exists(strtolower($name), $key_map);
- }
-
- /**
- * @param string $name
- * @return mixed|null
- */
- public function getHeader(string $name)
- {
- // turn header name into case insensitive
- $insensitive_key = strtolower($name);
-
- // turn headers into case insensitive array
- $key_map = array_change_key_case($this->headers, CASE_LOWER);
-
- // track for the requested header name and return its value if exists
- if (array_key_exists($insensitive_key, $key_map))
- return $key_map[$insensitive_key];
-
- return null;
- }
-}
diff --git a/vendor/eveseat/eseye/src/Eseye.php b/vendor/eveseat/eseye/src/Eseye.php
deleted file mode 100644
index 5cb0cafcf..000000000
--- a/vendor/eveseat/eseye/src/Eseye.php
+++ /dev/null
@@ -1,528 +0,0 @@
-authentication = $authentication;
-
- // Setup the logger
- $this->logger = $this->getLogger();
-
- return $this;
- }
-
- /**
- * @return \Seat\Eseye\Log\LogInterface
- * @throws \Seat\Eseye\Exceptions\InvalidContainerDataException
- */
- public function getLogger(): LogInterface
- {
-
- return $this->getConfiguration()->getLogger();
- }
-
- /**
- * @return \Seat\Eseye\Configuration
- * @throws \Seat\Eseye\Exceptions\InvalidContainerDataException
- */
- public function getConfiguration(): Configuration
- {
-
- return Configuration::getInstance();
- }
-
- /**
- * @return \Seat\Eseye\Containers\EsiAuthentication
- * @throws \Seat\Eseye\Exceptions\InvalidAuthenticationException
- */
- public function getAuthentication(): EsiAuthentication
- {
-
- if (is_null($this->authentication))
- throw new InvalidAuthenticationException('Authentication data not set.');
-
- return $this->authentication;
- }
-
- /**
- * @param \Seat\Eseye\Containers\EsiAuthentication $authentication
- *
- * @return \Seat\Eseye\Eseye
- * @throws \Seat\Eseye\Exceptions\InvalidContainerDataException
- */
- public function setAuthentication(EsiAuthentication $authentication): self
- {
-
- if (! $authentication->valid())
- throw new InvalidContainerDataException('Authentication data invalid/empty');
-
- $this->authentication = $authentication;
-
- return $this;
- }
-
- /**
- * @param string $refreshToken
- *
- * @return \Seat\Eseye\Eseye
- */
- public function setRefreshToken(String $refreshToken): self
- {
-
- $this->authentication = $this->authentication->setRefreshToken($refreshToken);
-
- return $this;
- }
-
- /**
- * @param \Seat\Eseye\Fetchers\FetcherInterface $fetcher
- */
- public function setFetcher(FetcherInterface $fetcher)
- {
-
- $this->fetcher = $fetcher;
- }
-
- /**
- * @param array $body
- *
- * @return \Seat\Eseye\Eseye
- */
- public function setBody(array $body): self
- {
-
- $this->request_body = $body;
-
- return $this;
- }
-
- /**
- * @param string $method
- * @param string $uri
- * @param array $uri_data
- *
- * @return \Seat\Eseye\Containers\EsiResponse
- * @throws \Seat\Eseye\Exceptions\EsiScopeAccessDeniedException
- * @throws \Seat\Eseye\Exceptions\RequestFailedException
- * @throws \Seat\Eseye\Exceptions\InvalidAuthenticationException
- * @throws \Seat\Eseye\Exceptions\InvalidContainerDataException
- * @throws \Seat\Eseye\Exceptions\UriDataMissingException
- */
- public function invoke(string $method, string $uri, array $uri_data = []): EsiResponse
- {
-
- // Check the Access Requirement
- if (! $this->getAccessChecker()->can(
- $method, $uri, $this->getFetcher()->getAuthenticationScopes())
- ) {
-
- // Build the uri so that there is context around what is denied.
- $uri = $this->buildDataUri($uri, $uri_data);
-
- // Log the deny.
- $this->logger->warning('Access denied to ' . $uri . ' due to ' .
- 'missing scopes.');
-
- throw new EsiScopeAccessDeniedException('Access denied to ' . $uri);
- }
-
- // Build the URI from the parts we have.
- $uri = $this->buildDataUri($uri, $uri_data);
-
- // Check if there is a cached response we can return
- if (in_array(strtolower($method), $this->cachable_verb) &&
- $cached = $this->getCache()->get($uri->getPath(), $uri->getQuery())
- ) {
-
- // Mark the response as one that was loaded from the cache in case no ETag exists
- if (! $cached->hasHeader('ETag'))
- $cached->setIsCachedLoad();
-
- // Handling ETag marked response specifically (ignoring the expired time)
- // Sending a request with the stored ETag in header - if we have a 304 response, data has not been altered.
- if ($cached->hasHeader('ETag') && $cached->expired()) {
-
- $result = $this->rawFetch($method, $uri, $this->getBody(), ['If-None-Match' => $cached->getHeader('ETag')]);
-
- if ($result->getErrorCode() == 304)
- $cached->setIsCachedLoad();
- }
-
- // In case the result is effectively retrieved from cache,
- // return the cached element.
- if ($cached->isCachedLoad()) {
-
- // Perform some debug logging
- $logging_msg = 'Loaded cached response for ' . $method . ' -> ' . $uri;
-
- if ($cached->hasHeader('ETag'))
- $logging_msg = sprintf('%s [%s]', $logging_msg, $cached->getHeader('ETag'));
-
- $this->getLogger()->debug($logging_msg);
-
- return $cached;
- }
- }
-
- // Call ESI itself and get the EsiResponse in case it has not already been handled with cache control
- if (! isset($result))
- $result = $this->rawFetch($method, $uri, $this->getBody());
-
- // Cache the response if it was a get and is not already expired
- if (in_array(strtolower($method), $this->cachable_verb) && ! $result->expired())
- $this->getCache()->set($uri->getPath(), $uri->getQuery(), $result);
-
- // In preparation for the next request, perform some
- // self cleanups of this objects request data such as
- // query string parameters and post bodies.
- $this->cleanupRequestData();
-
- return $result;
- }
-
- /**
- * @return \Seat\Eseye\Access\CheckAccess
- */
- public function getAccessChecker()
- {
-
- if (! $this->access_checker)
- $this->access_checker = new CheckAccess;
-
- return $this->access_checker;
- }
-
- /**
- * @param \Seat\Eseye\Access\AccessInterface $checker
- *
- * @return \Seat\Eseye\Eseye
- */
- public function setAccessChecker(AccessInterface $checker): self
- {
-
- $this->access_checker = $checker;
-
- return $this;
- }
-
- /**
- * @return \Seat\Eseye\Fetchers\FetcherInterface
- * @throws \Seat\Eseye\Exceptions\InvalidContainerDataException
- */
- private function getFetcher(): FetcherInterface
- {
-
- if (! $this->fetcher) {
-
- $fetcher_class = $this->getConfiguration()->fetcher;
- $this->fetcher = new $fetcher_class(...[$this->authentication]);
-
- }
-
- return $this->fetcher;
- }
-
- /**
- * @param string $uri
- * @param array $data
- *
- * @return \GuzzleHttp\Psr7\Uri
- * @throws \Seat\Eseye\Exceptions\UriDataMissingException
- * @throws \Seat\Eseye\Exceptions\InvalidContainerDataException
- */
- public function buildDataUri(string $uri, array $data): Uri
- {
-
- // Create a query string for the URI. We automatically
- // include the datasource value from the configuration.
- $query_params = array_merge([
- 'datasource' => $this->getConfiguration()->datasource,
- ], $this->getQueryString());
-
- return Uri::fromParts([
- 'scheme' => $this->getConfiguration()->esi_scheme,
- 'host' => $this->getConfiguration()->esi_host,
- 'port' => $this->getConfiguration()->esi_port,
- 'path' => rtrim($this->getVersion(), '/') .
- $this->mapDataToUri($uri, $data),
- 'query' => http_build_query($query_params),
- ]);
- }
-
- /**
- * @return array
- */
- public function getQueryString(): array
- {
-
- return $this->query_string;
- }
-
- /**
- * @param array $query
- *
- * @return \Seat\Eseye\Eseye
- */
- public function setQueryString(array $query): self
- {
-
- foreach ($query as $key => $value) {
- if (is_array($value)) {
- $query[$key] = implode(',', $value);
- }
- }
-
- $this->query_string = array_merge($this->query_string, $query);
-
- return $this;
- }
-
- /**
- * Get the versioned baseURI to use.
- *
- * @return string
- */
- public function getVersion(): string
- {
-
- return $this->version;
- }
-
- /**
- * Set the version of the API endpoints base URI.
- *
- * @param string $version
- *
- * @return \Seat\Eseye\Eseye
- */
- public function setVersion(string $version)
- {
-
- if (substr($version, 0, 1) !== '/')
- $version = '/' . $version;
-
- $this->version = $version;
-
- return $this;
- }
-
- /**
- * @param string $uri
- * @param array $data
- *
- * @return string
- * @throws \Seat\Eseye\Exceptions\UriDataMissingException
- */
- private function mapDataToUri(string $uri, array $data): string
- {
-
- // Extract fields in curly braces. If there are fields,
- // replace the data with those in the URI
- if (preg_match_all('/{+(.*?)}/', $uri, $matches)) {
-
- if (empty($data))
- throw new UriDataMissingException(
- 'The data array for the uri ' . $uri . ' is empty. Please provide data to use.');
-
- foreach ($matches[1] as $match) {
-
- if (! array_key_exists($match, $data))
- throw new UriDataMissingException(
- 'Data for ' . $match . ' is missing. Please provide this by setting a value ' .
- 'for ' . $match . '.');
-
- $uri = str_replace('{' . $match . '}', $data[$match], $uri);
- }
- }
-
- return $uri;
- }
-
- /**
- * @return \Seat\Eseye\Cache\CacheInterface
- * @throws \Seat\Eseye\Exceptions\InvalidContainerDataException
- */
- private function getCache(): CacheInterface
- {
-
- return $this->getConfiguration()->getCache();
- }
-
- /**
- * @param string $method
- * @param string $uri
- * @param array $body
- * @param array $headers
- *
- * @return mixed
- * @throws \Seat\Eseye\Exceptions\InvalidAuthenticationException
- * @throws \Seat\Eseye\Exceptions\RequestFailedException
- * @throws \Seat\Eseye\Exceptions\InvalidContainerDataException
- */
- public function rawFetch(string $method, string $uri, array $body, array $headers = [])
- {
-
- return $this->getFetcher()->call($method, $uri, $body, $headers);
- }
-
- /**
- * @return array
- */
- public function getBody(): array
- {
-
- return $this->request_body;
- }
-
- /**
- * @return \Seat\Eseye\Eseye
- */
- public function cleanupRequestData(): self
- {
-
- $this->unsetBody();
- $this->unsetQueryString();
-
- return $this;
- }
-
- /**
- * @return \Seat\Eseye\Eseye
- */
- public function unsetBody(): self
- {
-
- $this->request_body = [];
-
- return $this;
- }
-
- /**
- * @return \Seat\Eseye\Eseye
- */
- public function unsetQueryString(): self
- {
-
- $this->query_string = [];
-
- return $this;
- }
-
- /**
- * A helper method to specify the page to retrieve.
- *
- * @param int $page
- *
- * @return \Seat\Eseye\Eseye
- */
- public function page(int $page): self
- {
-
- $this->setQueryString(['page' => $page]);
-
- return $this;
- }
-}
diff --git a/vendor/eveseat/eseye/src/Exceptions/CachePathException.php b/vendor/eveseat/eseye/src/Exceptions/CachePathException.php
deleted file mode 100644
index ef295f0eb..000000000
--- a/vendor/eveseat/eseye/src/Exceptions/CachePathException.php
+++ /dev/null
@@ -1,34 +0,0 @@
-esi_response = $esi_response;
- $this->original_exception = $exception;
-
- // Finish constructing the exception
- parent::__construct(
- $this->getError(),
- $this->getEsiResponse()->getErrorCode(),
- $exception->getPrevious()
- );
- }
-
- /**
- * @return null|string
- */
- public function getError()
- {
-
- return $this->getEsiResponse()->error();
- }
-
- /**
- * @return \Seat\Eseye\Containers\EsiResponse
- */
- public function getEsiResponse(): EsiResponse
- {
-
- return $this->esi_response;
- }
-
- /**
- * @return \Exception
- */
- public function getOriginalException(): Exception
- {
-
- return $this->original_exception;
- }
-}
diff --git a/vendor/eveseat/eseye/src/Exceptions/UriDataMissingException.php b/vendor/eveseat/eseye/src/Exceptions/UriDataMissingException.php
deleted file mode 100644
index d89f497c4..000000000
--- a/vendor/eveseat/eseye/src/Exceptions/UriDataMissingException.php
+++ /dev/null
@@ -1,34 +0,0 @@
-authentication = $authentication;
-
- // Setup the logger
- $this->logger = Configuration::getInstance()->getLogger();
- $this->sso_base = sprintf('%s://%s:%d/oauth',
- Configuration::getInstance()->sso_scheme,
- Configuration::getInstance()->sso_host,
- Configuration::getInstance()->sso_port);
- }
-
- /**
- * @param string $method
- * @param string $uri
- * @param array $body
- * @param array $headers
- *
- * @return mixed|\Seat\Eseye\Containers\EsiResponse
- * @throws \Seat\Eseye\Exceptions\InvalidAuthenticationException
- * @throws \Seat\Eseye\Exceptions\RequestFailedException
- * @throws \Seat\Eseye\Exceptions\InvalidContainerDataException
- */
- public function call(
- string $method, string $uri, array $body, array $headers = []): EsiResponse
- {
-
- // If we have authentication data, add the
- // Authorization header.
- if ($this->getAuthentication())
- $headers = array_merge($headers, [
- 'Authorization' => 'Bearer ' . $this->getToken(),
- ]);
-
- return $this->httpRequest($method, $uri, $headers, $body);
- }
-
- /**
- * @return \Seat\Eseye\Containers\EsiAuthentication|null
- */
- public function getAuthentication()
- {
-
- return $this->authentication;
- }
-
- /**
- * @param \Seat\Eseye\Containers\EsiAuthentication $authentication
- *
- * @throws \Seat\Eseye\Exceptions\InvalidAuthenticationException
- */
- public function setAuthentication(EsiAuthentication $authentication)
- {
-
- if (! $authentication->valid())
- throw new InvalidAuthenticationException('Authentication data invalid/empty');
-
- $this->authentication = $authentication;
- }
-
- /**
- * @return string
- * @throws \Seat\Eseye\Exceptions\InvalidAuthenticationException
- * @throws \Seat\Eseye\Exceptions\RequestFailedException
- * @throws \Seat\Eseye\Exceptions\InvalidContainerDataException
- */
- private function getToken(): string
- {
-
- // Ensure that we have authentication data before we try
- // and get a token.
- if (! $this->getAuthentication())
- throw new InvalidAuthenticationException(
- 'Trying to get a token without authentication data.');
-
- // Check the expiry date.
- $expires = carbon($this->getAuthentication()->token_expires);
-
- // If the token expires in the next minute, refresh it.
- if ($expires->lte(carbon('now')->addMinute(1)))
- $this->refreshToken();
-
- return $this->getAuthentication()->access_token;
- }
-
- /**
- * Refresh the Access token that we have in the EsiAccess container.
- *
- * @throws \Seat\Eseye\Exceptions\RequestFailedException
- * @throws \Seat\Eseye\Exceptions\InvalidAuthenticationException
- * @throws \Seat\Eseye\Exceptions\InvalidContainerDataException
- */
- private function refreshToken()
- {
-
- // Make the post request for a new access_token
- $response = $this->httpRequest('post',
- $this->sso_base . '/token/?grant_type=refresh_token&refresh_token=' .
- $this->authentication->refresh_token, [
- 'Authorization' => 'Basic ' . base64_encode(
- $this->authentication->client_id . ':' . $this->authentication->secret),
- ]
- );
-
- // Get the current EsiAuth container
- $authentication = $this->getAuthentication();
-
- // Set the new authentication values from the request
- $authentication->access_token = $response->access_token;
- $authentication->refresh_token = $response->refresh_token;
- $authentication->token_expires = carbon('now')
- ->addSeconds($response->expires_in);
-
- // ... and update the container
- $this->setAuthentication($authentication);
- }
-
- /**
- * @param string $method
- * @param string $uri
- * @param array $headers
- * @param array $body
- *
- * @return mixed|\Seat\Eseye\Containers\EsiResponse
- * @throws \Seat\Eseye\Exceptions\RequestFailedException
- * @throws \Seat\Eseye\Exceptions\InvalidContainerDataException
- */
- public function httpRequest(
- string $method, string $uri, array $headers = [], array $body = []): EsiResponse
- {
-
- // Include some basic headers to those already passed in. Everything
- // is considered to be Json.
- $headers = array_merge($headers, [
- 'Accept' => 'application/json',
- 'Content-Type' => 'application/json',
- 'User-Agent' => 'Eseye/' . Eseye::VERSION . '/' .
- Configuration::getInstance()->http_user_agent,
- ]);
-
- // Add some debug logging and start measuring how long the request took.
- $this->logger->debug('Making ' . $method . ' request to ' . $uri);
- $start = microtime(true);
-
- // Json encode the body if it has data, else just null it
- if (count($body) > 0)
- $body = json_encode($body);
- else
- $body = null;
-
- try {
-
- // Make the _actual_ request to ESI
- $response = $this->getClient()->send(
- new Request($method, $uri, $headers, $body));
-
- } catch (ClientException | ServerException $e) {
-
- // Log the event as failed
- $this->logger->error('[http ' . $e->getResponse()->getStatusCode() . ', ' .
- strtolower($e->getResponse()->getReasonPhrase()) . '] ' .
- $method . ' -> ' . $this->stripRefreshTokenValue($uri) . ' [t/e: ' .
- number_format(microtime(true) - $start, 2) . 's/' .
- implode(' ', $e->getResponse()->getHeader('X-Esi-Error-Limit-Remain')) . ']'
- );
-
- // Grab the body from the StreamInterface intance.
- $responseBody = $e->getResponse()->getBody()->getContents();
-
- // For debugging purposes, log the response body
- $this->logger->debug('Request for ' . $method . ' -> ' . $uri . ' failed. Response body was: ' .
- $responseBody);
-
- // Raise the exception that should be handled by the caller
- throw new RequestFailedException($e, $this->makeEsiResponse(
- $responseBody,
- $e->getResponse()->getHeaders(),
- 'now',
- $e->getResponse()->getStatusCode())
- );
- }
-
- // Log the successful request.
- $this->logger->log('[http ' . $response->getStatusCode() . ', ' .
- strtolower($response->getReasonPhrase()) . '] ' .
- $method . ' -> ' . $this->stripRefreshTokenValue($uri) . ' [t/e: ' .
- number_format(microtime(true) - $start, 2) . 's/' .
- implode(' ', $response->getHeader('X-Esi-Error-Limit-Remain')) . ']'
- );
-
- // Return a container response that can be parsed.
- return $this->makeEsiResponse(
- $response->getBody()->getContents(),
- $response->getHeaders(),
- $response->hasHeader('Expires') ? $response->getHeader('Expires')[0] : 'now',
- $response->getStatusCode()
- );
- }
-
- /**
- * @return \GuzzleHttp\Client
- */
- public function getClient(): Client
- {
-
- if (! $this->client)
- $this->client = new Client([
- 'timeout' => 30,
- ]);
-
- return $this->client;
- }
-
- /**
- * @param \GuzzleHttp\Client $client
- */
- public function setClient(Client $client)
- {
-
- $this->client = $client;
- }
-
- /**
- * @param string $uri
- *
- * @return string
- */
- public function stripRefreshTokenValue(string $uri): string
- {
-
- // If we have 'refresh_token' in the URI, strip it.
- if (strpos($uri, 'refresh_token'))
- return Uri::withoutQueryValue((new Uri($uri)), 'refresh_token')
- ->__toString();
-
- return $uri;
- }
-
- /**
- * @param string $body
- * @param array $headers
- * @param string $expires
- * @param int $status_code
- *
- * @return \Seat\Eseye\Containers\EsiResponse
- */
- public function makeEsiResponse(
- string $body, array $headers, string $expires, int $status_code): EsiResponse
- {
-
- return new EsiResponse($body, $headers, $expires, $status_code);
- }
-
- /**
- * @return array
- *
- * @throws \Seat\Eseye\Exceptions\InvalidAuthenticationException
- * @throws \Seat\Eseye\Exceptions\InvalidContainerDataException
- * @throws \Seat\Eseye\Exceptions\RequestFailedException
- */
- public function getAuthenticationScopes(): array
- {
-
- // If we don't have any authentication data, then
- // only public calls can be made.
- if (is_null($this->getAuthentication()))
- return ['public'];
-
- // If there are no scopes that we know of, update them.
- // There will always be at least 1 as we add the internal
- // 'public' scope.
- if (count($this->getAuthentication()->scopes) <= 0)
- $this->setAuthenticationScopes();
-
- return $this->getAuthentication()->scopes;
- }
-
- /**
- * Query the eveseat/resources repository for SDE
- * related information.
- *
- * @throws \Seat\Eseye\Exceptions\InvalidAuthenticationException
- * @throws \Seat\Eseye\Exceptions\InvalidContainerDataException
- * @throws \Seat\Eseye\Exceptions\RequestFailedException
- */
- public function setAuthenticationScopes()
- {
-
- $scopes = $this->verifyToken()['Scopes'];
-
- // Add the internal 'public' scope
- $scopes = $scopes . ' public';
- $this->authentication->scopes = explode(' ', $scopes);
- }
-
- /**
- * Verify that an access_token is still valid.
- *
- * @throws \Seat\Eseye\Exceptions\RequestFailedException
- * @throws \Seat\Eseye\Exceptions\InvalidAuthenticationException
- * @throws \Seat\Eseye\Exceptions\InvalidContainerDataException
- */
- private function verifyToken()
- {
-
- return $this->httpRequest('get', $this->sso_base . '/verify/', [
- 'Authorization' => 'Bearer ' . $this->getToken(),
- ]);
- }
-}
diff --git a/vendor/eveseat/eseye/src/Helpers/helpers.php b/vendor/eveseat/eseye/src/Helpers/helpers.php
deleted file mode 100644
index f80c05087..000000000
--- a/vendor/eveseat/eseye/src/Helpers/helpers.php
+++ /dev/null
@@ -1,40 +0,0 @@
-logfile_location, '/') . '/eseye.log',
- $configuration->logger_level
- );
- $stream->setFormatter($formatter);
-
- $this->logger = new Logger('eseye');
- $this->logger->pushHandler($stream);
- }
-
- /**
- * @param string $message
- *
- * @return mixed|void
- */
- public function log(string $message)
- {
-
- $this->logger->addInfo($message);
- }
-
- /**
- * @param string $message
- *
- * @return mixed|void
- */
- public function debug(string $message)
- {
-
- $this->logger->addDebug($message);
- }
-
- /**
- * @param string $message
- *
- * @return mixed|void
- */
- public function warning(string $message)
- {
-
- $this->logger->addWarning($message);
- }
-
- /**
- * @param string $message
- *
- * @return mixed|void
- */
- public function error(string $message)
- {
-
- $this->logger->addError($message);
- }
-}
diff --git a/vendor/eveseat/eseye/src/Log/LogInterface.php b/vendor/eveseat/eseye/src/Log/LogInterface.php
deleted file mode 100644
index 9ab188947..000000000
--- a/vendor/eveseat/eseye/src/Log/LogInterface.php
+++ /dev/null
@@ -1,58 +0,0 @@
-logfile_location, '/') . '/eseye.log',
- $configuration->log_max_files,
- $configuration->logger_level
- );
- $stream->setFormatter($formatter);
-
- $this->logger = new Logger('eseye');
- $this->logger->pushHandler($stream);
- }
-
- /**
- * @param string $message
- *
- * @return mixed|void
- */
- public function log(string $message)
- {
-
- $this->logger->addInfo($message);
- }
-
- /**
- * @param string $message
- *
- * @return mixed|void
- */
- public function debug(string $message)
- {
-
- $this->logger->addDebug($message);
- }
-
- /**
- * @param string $message
- *
- * @return mixed|void
- */
- public function warning(string $message)
- {
-
- $this->logger->addWarning($message);
- }
-
- /**
- * @param string $message
- *
- * @return mixed|void
- */
- public function error(string $message)
- {
-
- $this->logger->addError($message);
- }
-}
diff --git a/vendor/eveseat/eseye/src/Traits/ConstructsContainers.php b/vendor/eveseat/eseye/src/Traits/ConstructsContainers.php
deleted file mode 100644
index cdb749dfa..000000000
--- a/vendor/eveseat/eseye/src/Traits/ConstructsContainers.php
+++ /dev/null
@@ -1,61 +0,0 @@
- $value) {
-
- if (! array_key_exists($key, $this->data))
- throw new InvalidContainerDataException(
- 'Key ' . $key . ' is not valid for this container'
- );
-
- $this->$key = $value;
- }
- }
- }
-}
diff --git a/vendor/eveseat/eseye/src/Traits/ValidatesContainers.php b/vendor/eveseat/eseye/src/Traits/ValidatesContainers.php
deleted file mode 100644
index e4cb5649f..000000000
--- a/vendor/eveseat/eseye/src/Traits/ValidatesContainers.php
+++ /dev/null
@@ -1,42 +0,0 @@
-data, true);
- }
-}
diff --git a/vendor/eveseat/eseye/tests/Access/CheckAccessTest.php b/vendor/eveseat/eseye/tests/Access/CheckAccessTest.php
deleted file mode 100644
index a004743a3..000000000
--- a/vendor/eveseat/eseye/tests/Access/CheckAccessTest.php
+++ /dev/null
@@ -1,86 +0,0 @@
-check_access = new CheckAccess;
- }
-
- public function testCheckAccessObjectInstantiation()
- {
-
- $this->assertInstanceOf(CheckAccess::class, $this->check_access);
- }
-
- public function testCheckAccessCanShouldGrantAccess()
- {
-
- $scopes = [
- 'esi-assets.read_assets.v1',
- ];
- $result = $this->check_access->can('get', '/characters/{character_id}/assets/', $scopes);
-
- $this->assertTrue($result);
- }
-
- public function testCheckAccessCanShouldDenyAccess()
- {
-
-
- $scopes = [
- 'esi-assets.read_assets.v1',
- ];
- $result = $this->check_access->can('get', '/characters/{character_id}/bookmarks/', $scopes);
-
- $this->assertFalse($result);
- }
-
- public function testCheckAccessCanShouldAllowPublicOnlyCall()
- {
-
- $result = $this->check_access->can('get', '/alliances/', []);
-
- $this->assertTrue($result);
- }
-
- public function testCheckAccessShouldAllowAccessToUnknownUri()
- {
-
- // Disable logging.
- Configuration::getInstance()->logger = NullLogger::class;
-
- $result = $this->check_access->can('get', '/invalid/uri', []);
-
- $this->assertTrue($result);
- }
-
-}
diff --git a/vendor/eveseat/eseye/tests/Cache/FileCacheTest.php b/vendor/eveseat/eseye/tests/Cache/FileCacheTest.php
deleted file mode 100644
index 98a7d220d..000000000
--- a/vendor/eveseat/eseye/tests/Cache/FileCacheTest.php
+++ /dev/null
@@ -1,116 +0,0 @@
-root = vfsStream::setup('cache');
- Configuration::getInstance()->file_cache_location = vfsStream::url('cache');
-
- $this->file_cache = new FileCache;
- }
-
- public function testFileCacheCanInstantiate()
- {
-
- $this->assertInstanceOf(FileCache::class, new FileCache);
- }
-
- public function testFileCacheCheckCacheDirectory()
- {
-
- $this->assertTrue($this->file_cache->checkCacheDirectory());
- }
-
- public function testFileCacheBuildsRelativePathWithoutQueryString()
- {
-
- $path = $this->file_cache->buildRelativePath('/test');
-
- $this->assertEquals('vfs://cache/test//', $path);
- }
-
- public function testFileCacheBuildsRelativePathWithQueryString()
- {
-
- $path = $this->file_cache->buildRelativePath('/test', 'foo=bar');
-
- $this->assertEquals('vfs://cache/test/2fb8f40115dd1e695cbe23d4f97ce5b1fb697eee/', $path);
- }
-
- public function testFileCacheFailsCreatingDirectoryOnInvalidPath()
- {
-
- $this->expectException(CachePathException::class);
-
- if (substr(PHP_OS, 0, 3) == 'WIN')
- $invalid_path = '/completely:invalid?path';
- else
- $invalid_path = '/completely/invalid/path';
-
- Configuration::getInstance()
- ->file_cache_location = $invalid_path;
- new FileCache();
- }
-
- /**
- * @param $input
- * @param $output
- *
- * @dataProvider providerTestFileCacheSafePathValues
- */
- public function testFileCacheSafePathValues($input, $output)
- {
-
- $result = $this->file_cache->safePath($input);
-
- $this->assertEquals($output, $result);
- }
-
- /**
- * @return array
- */
- public function providerTestFileCacheSafePathValues()
- {
-
- return [
- ['A/B/C', 'A/B/C'],
- ['\'A/B/C', 'A/B/C'],
- ['`A/B/C`', 'A/B/C'],
- ['|&*A%/$B!/C', 'A/B/C'],
- ];
- }
-
-}
diff --git a/vendor/eveseat/eseye/tests/Cache/HashesStringsTest.php b/vendor/eveseat/eseye/tests/Cache/HashesStringsTest.php
deleted file mode 100644
index f269e824d..000000000
--- a/vendor/eveseat/eseye/tests/Cache/HashesStringsTest.php
+++ /dev/null
@@ -1,43 +0,0 @@
-assertEquals('a94a8fe5ccb19ba61c4c0873d391e987982fbbd3',
- $this->hashString('test'));
- }
-
- public function testHashesStringsToUnexpectedValue()
- {
-
- $this->assertNotEquals('nope', $this->hashString('test'));
- }
-
-}
diff --git a/vendor/eveseat/eseye/tests/Cache/MemcachedCacheTest.php b/vendor/eveseat/eseye/tests/Cache/MemcachedCacheTest.php
deleted file mode 100644
index 05a255162..000000000
--- a/vendor/eveseat/eseye/tests/Cache/MemcachedCacheTest.php
+++ /dev/null
@@ -1,75 +0,0 @@
-createMock(\Memcached::class);
- else
- $instance = $this->createMock(\Memcache::class);
-
- // Set the cache
- $this->memcached_cache = new MemcachedCache($instance);
-
- $this->esi_response_object = new EsiResponse('', [], 'now', 200);
- }
-
- public function testMemcachedCacheInstantiates()
- {
-
- $this->assertInstanceOf(MemcachedCache::class, $this->memcached_cache);
- }
-
- public function testMemcachedCacheBuildsCacheKey()
- {
-
- $key = $this->memcached_cache->buildCacheKey('/test', 'foo=bar');
- $this->assertEquals('eseye:b0f071c288f528954cddef0e1aa24df41de874aa', $key);
- }
-
- public function testMemcachedCacheSetsKey()
- {
-
- $this->memcached_cache->set('/foo', 'foo=bar', $this->esi_response_object);
- }
-
- public function testMemcachedCacheForgetsKey()
- {
-
- $this->memcached_cache->forget('/foo', 'foo=bar');
- }
-}
diff --git a/vendor/eveseat/eseye/tests/Cache/NullCacheTest.php b/vendor/eveseat/eseye/tests/Cache/NullCacheTest.php
deleted file mode 100644
index a564e89fd..000000000
--- a/vendor/eveseat/eseye/tests/Cache/NullCacheTest.php
+++ /dev/null
@@ -1,70 +0,0 @@
-null_cache = new NullCache;
- }
-
- public function testNullCacheInstantiates()
- {
-
- $this->assertInstanceOf(NullCache::class, $this->null_cache);
- }
-
- public function testNullCacheSetsValue()
- {
-
- $esi_response = $this->createMock(EsiResponse::class);
- $return = $this->null_cache->set('/test', 'foo=bar', $esi_response);
-
- $this->assertNull($return);
- }
-
- public function testNullCacheGetsValue()
- {
-
- $this->assertFalse($this->null_cache->get('/test', 'foo=bar'));
- }
-
- public function testNullCacheForgetsValues()
- {
-
- $this->assertNull($this->null_cache->forget('/test', 'foo=bar'));
- }
-
- public function testNullCacheHasValue()
- {
-
- $this->assertFalse($this->null_cache->has('/test', 'foo=bar'));
- }
-
-}
diff --git a/vendor/eveseat/eseye/tests/Cache/RedisCacheTest.php b/vendor/eveseat/eseye/tests/Cache/RedisCacheTest.php
deleted file mode 100644
index a311f6a2a..000000000
--- a/vendor/eveseat/eseye/tests/Cache/RedisCacheTest.php
+++ /dev/null
@@ -1,78 +0,0 @@
-createMock(Client::class);
-
- // Set the cache
- $this->redis_cache = new RedisCache($redis);
- $this->esi_response_object = new EsiResponse('', [], 'now', 200);
- }
-
- public function testRedisCacheInstantiates()
- {
-
- $this->assertInstanceOf(RedisCache::class, $this->redis_cache);
- }
-
- public function testRedisCacheInstantiatesWithoutArgument()
- {
-
- $this->assertInstanceOf(RedisCache::class, new RedisCache);
- }
-
- public function testRedisCacheBuildsCacheKey()
- {
-
- $key = $this->redis_cache->buildCacheKey('/test', 'foo=bar');
- $this->assertEquals('b0f071c288f528954cddef0e1aa24df41de874aa', $key);
- }
-
- public function testRedisCacheSetsKey()
- {
-
- $this->redis_cache->set('/foo', 'foo=bar', $this->esi_response_object);
- }
-
- public function testRedisCacheForgetsKey()
- {
-
- $this->redis_cache->forget('/foo', 'foo=bar');
- }
-
-}
diff --git a/vendor/eveseat/eseye/tests/ConfigurationTest.php b/vendor/eveseat/eseye/tests/ConfigurationTest.php
deleted file mode 100644
index 73d4e8376..000000000
--- a/vendor/eveseat/eseye/tests/ConfigurationTest.php
+++ /dev/null
@@ -1,102 +0,0 @@
-assertInstanceOf(Configuration::class, Configuration::getInstance());
- }
-
- public function testConfigurationSingleton()
- {
-
- $instance1 = Configuration::getInstance();
- $instance2 = Configuration::getInstance();
-
- $instance1->setConfiguration(new EsiConfiguration([
- 'datasource' => 'test',
- ]));
-
- // Got a feeling this assert is wrong
- $this->assertNotEquals('', $instance2->getConfiguration()->datasource);
- }
-
- public function testConfigurationGetConfigurationValuesContainer()
- {
-
- $this->assertInstanceOf(EsiConfiguration::class, Configuration::getInstance()->getConfiguration());
- }
-
- public function testConfigurationSetsNewConfigurationContainerWithValidData()
- {
-
- $configuration = new EsiConfiguration(['http_user_agent' => 'Eseye Library']);
- $this->assertInstanceOf(EsiConfiguration::class, $configuration);
- }
-
- public function testConfigurationSetsNewConfigurationsContainerWithInvalidData()
- {
-
- $this->expectException(InvalidContainerDataException::class);
- new EsiConfiguration(['invalid' => 'invalid']);
- }
-
- public function testConfigurationSetsNewConfigurationContainerWithNullData()
- {
-
- $this->expectException(InvalidContainerDataException::class);
- new EsiConfiguration(['value' => null]);
- }
-
- public function testConfigurationGetsLogger()
- {
-
- $logger = Configuration::getInstance()->getLogger();
- $this->assertInstanceOf(LogInterface::class, $logger);
- }
-
- public function testConfigurationGetsCache()
- {
-
- $cache = Configuration::getInstance()->getCache();
- $this->assertInstanceOf(CacheInterface::class, $cache);
- }
-
- public function testConfigurationSetsNewValue()
- {
-
- $configuration = Configuration::getInstance();
- $configuration->test = 'test';
-
- $this->assertEquals('test', $configuration->test);
- $this->assertEquals('test', $configuration->getConfiguration()->test);
- }
-}
diff --git a/vendor/eveseat/eseye/tests/Containers/EsiAuthenticationTest.php b/vendor/eveseat/eseye/tests/Containers/EsiAuthenticationTest.php
deleted file mode 100644
index d38bddb05..000000000
--- a/vendor/eveseat/eseye/tests/Containers/EsiAuthenticationTest.php
+++ /dev/null
@@ -1,139 +0,0 @@
-esi_authentication = new EsiAuthentication;
- }
-
- public function testEsiAuthenticationInstantiation()
- {
-
- $this->assertInstanceOf(EsiAuthentication::class, $this->esi_authentication);
- }
-
- public function testFreshEsiAuthenticationInstanceIsNotValid()
- {
-
- $this->assertFalse($this->esi_authentication->valid());
- }
-
- public function testEsiAuthenticationCanAccessAsArrayKey()
- {
-
- $this->assertArrayHasKey('client_id', $this->esi_authentication);
- }
-
- public function testEsiAuthenticationCanAccessAsObjectProperty()
- {
-
- $client_id = $this->esi_authentication->client_id;
- $this->assertNull($client_id);
- }
-
- public function testCanSetAndAccessConfigurationValueAsArrayKey()
- {
-
- $authentication = new EsiAuthentication;
- $authentication['test'] = 'test';
-
- $this->assertEquals('test', $authentication['test']);
- }
-
- public function testCanSetAndAccessConfigurationValueAsObjectProperty()
- {
-
- $authentication = new EsiAuthentication;
- $authentication->test = 'test';
-
- $this->assertEquals('test', $authentication->test);
- }
-
- public function testEsiAuthenticationContainerConstructWithValuePasses()
- {
-
- $authentication = new EsiAuthentication([
- 'client_id' => '123',
- ]);
-
- $this->assertInstanceOf(EsiAuthentication::class, $authentication);
- }
-
- public function testEsiAuthenticationContainerConstructWithUnknownKeyFails()
- {
-
- $this->expectException(InvalidContainerDataException::class);
-
- new EsiAuthentication([
- 'foo' => 'bar',
- ]);
- }
-
- /**
- * @param $key The key to check for existence
- *
- * @dataProvider providerTestRequiredKeysExists
- */
- public function testRequiredKeysExists($key)
- {
-
- $authentication = new EsiAuthentication;
- $this->assertArrayHasKey($key, $authentication);
- }
-
- /**
- * Keys that _should_ exists in a new Configuration instance
- *
- * @return array
- */
- public function providerTestRequiredKeysExists()
- {
-
- return [
- ['client_id'],
- ['secret'],
- ['access_token'],
- ['refresh_token'],
- ['token_expires'],
- ['scopes'],
- ];
- }
-
- public function testEsiAuthenticationContainerSetRefreshToken()
- {
-
- $authentication = new EsiAuthentication;
- $authentication->setRefreshToken('REFRESH_TOKEN');
-
- $this->assertEquals('REFRESH_TOKEN', $authentication->refresh_token);
- }
-
-}
diff --git a/vendor/eveseat/eseye/tests/Containers/EsiConfigurationTest.php b/vendor/eveseat/eseye/tests/Containers/EsiConfigurationTest.php
deleted file mode 100644
index a6c4f9901..000000000
--- a/vendor/eveseat/eseye/tests/Containers/EsiConfigurationTest.php
+++ /dev/null
@@ -1,133 +0,0 @@
-esi_configuration = new EsiConfiguration;
- }
-
- public function testEsiConfigurationInstantiation()
- {
-
- $instance = new EsiConfiguration;
- $this->assertInstanceOf(EsiConfiguration::class, $instance);
- }
-
- public function testFreshEsiConfigurationInstanceIsValid()
- {
-
- $this->assertTrue($this->esi_configuration->valid());
- }
-
- public function testEsiConfigurationCanAccessAsArrayKey()
- {
-
- $this->assertArrayHasKey('datasource', $this->esi_configuration);
- }
-
- public function testEsiConfigurationCanAccessAsObjectProperty()
- {
-
- $datasource = $this->esi_configuration->datasource;
- $this->assertEquals('tranquility', $datasource);
- }
-
- public function testCanSetAndAccessConfigurationValueAsArrayKey()
- {
-
- $configuration = new EsiConfiguration;
- $configuration['test'] = 'test';
-
- $this->assertEquals('test', $configuration['test']);
- }
-
- public function testCanSetAndAccessConfigurationValueAsObjectProperty()
- {
-
- $configuration = new EsiConfiguration;
- $configuration->test = 'test';
-
- $this->assertEquals('test', $configuration->test);
- }
-
- public function testEsiConfigurationContainerConstructWithValuePasses()
- {
-
- $configuration = new EsiConfiguration([
- 'datasource' => 'tranquility',
- ]);
-
- $this->assertInstanceOf(EsiConfiguration::class, $configuration);
- }
-
- public function testEsiConfigurationContainerConstructWithUnknownKeyFails()
- {
-
- $this->expectException(InvalidContainerDataException::class);
-
- new EsiConfiguration([
- 'foo' => 'bar',
- ]);
- }
-
- /**
- * @param $key The key to check for existence
- *
- * @dataProvider providerTestRequiredKeysExists
- */
- public function testRequiredKeysExists($key)
- {
-
- $configuration = new EsiConfiguration;
- $this->assertArrayHasKey($key, $configuration);
- }
-
- /**
- * Keys that _should_ exists in a new Configuration instance
- *
- * @return array
- */
- public function providerTestRequiredKeysExists()
- {
-
- return [
- ['http_user_agent'],
- ['datasource'],
- ['logger'],
- ['logger_level'],
- ['logfile_location'],
- ['cache'],
- ];
- }
-}
diff --git a/vendor/eveseat/eseye/tests/Containers/EsiResponseTest.php b/vendor/eveseat/eseye/tests/Containers/EsiResponseTest.php
deleted file mode 100644
index 8ccaa6f3b..000000000
--- a/vendor/eveseat/eseye/tests/Containers/EsiResponseTest.php
+++ /dev/null
@@ -1,186 +0,0 @@
- 'Foo',
- 'details' => [
- 'age' => 40,
- 'human' => 'yes',
- ],
- ]);
-
- // Sample response headers
- $this->headers = $headers = [
- "Access-Control-Allow-Credentials" => [
- 0 => "true",
- ],
- "Access-Control-Allow-Headers" => [
- 0 => "Content-Type,Authorization,X-User-Agent",
- ],
- "Content-Type" => [
- 0 => "application/json",
- ],
- "Expires" => [
- 0 => "Sat, 30 Dec 2017 09:00:32 GMT",
- ],
-
- "Strict-Transport-Security" => [
- 0 => "max-age=31536000",
- ],
- "X-Esi-Error-Limit-Remain" => [
- 0 => "64",
- ],
- "X-Esi-Error-Limit-Reset" => [
- 0 => "52",
- ],
- "X-Pages" => [
- 0 => "4",
- ],
- "Date" => [
- 0 => "Sat, 30 Dec 2017 08:23:08 GMT",
- ],
- ];
-
- $this->esi_response = new EsiResponse($data, $headers, 'now', 200);
- }
-
- public function testEsiResponseInstantiation()
- {
-
- $this->assertInstanceOf(EsiResponse::class, $this->esi_response);
- }
-
- public function testEsiResponseTestPayloadIsExpired()
- {
-
- $this->assertTrue($this->esi_response->expired());
- }
-
- public function testEsiResponseTestPayloadIsNotExpired()
- {
-
- $data = json_encode(['foo' => 'bar']);
- $esi = new EsiResponse($data, [], '3000-01-01 00:00:00', 200);
-
- $this->assertFalse($esi->expired());
- }
-
- public function testEsiResponseDoesNotHaveError()
- {
-
- $this->assertNull($this->esi_response->error());
- }
-
- public function testEsiResponseDoesHaveError()
- {
-
- $data = json_encode(['error' => 'Test Error']);
- $esi = new EsiResponse($data, [], 'now', 500);
-
- $this->assertEquals('Test Error', $esi->error());
- }
-
- public function testEsiResponseDoesHaveErrorAndDescription()
- {
-
- $data = json_encode(['error' => 'Test Error', 'error_description' => 'Test Description']);
- $esi = new EsiResponse($data, [], 'now', 500);
-
- $this->assertEquals('Test Error: Test Description', $esi->error());
- }
-
- public function testEsiResponseCanGetErrorCode()
- {
-
- $this->assertEquals(200, $this->esi_response->getErrorCode());
- }
-
- public function testEsiResponseCanGetDataValue()
- {
-
- $this->assertEquals('Foo', $this->esi_response->name);
- }
-
- public function testEsiResponseCanGetNestedDataValue()
- {
-
- $this->assertEquals('yes', $this->esi_response->details->human);
- }
-
- public function testEsiResponseCanGetRawDataFromContainer()
- {
-
- $this->assertEquals('{"name":"Foo","details":{"age":40,"human":"yes"}}',
- $this->esi_response->raw);
- }
-
- public function testEsiResponseCanGetRawResponseHeaders()
- {
-
- $this->assertEquals($this->headers, $this->esi_response->raw_headers);
- }
-
- public function testEsiResponseCanGetParseHeaderValue()
- {
-
- $this->assertEquals('Content-Type,Authorization,X-User-Agent',
- $this->esi_response->headers['Access-Control-Allow-Headers']);
- }
-
- public function testEsiResponseCanGetParsedPagesFromHeaders()
- {
-
- $this->assertEquals(4, $this->esi_response->pages);
- }
-
- public function testEsiResponseCanGetParsedErrorLomitFromHeaders()
- {
-
- $this->assertEquals(64, $this->esi_response->error_limit);
- }
-
- public function testEsiResponseIsNotCachedByDefault()
- {
-
- $this->assertFalse($this->esi_response->isCachedLoad());
- }
-
- public function testEsiResponseMarksResponseAsCached()
- {
-
- $this->esi_response->setIsCachedload();
- $this->assertTrue($this->esi_response->isCachedLoad());
- }
-}
diff --git a/vendor/eveseat/eseye/tests/EseyeTest.php b/vendor/eveseat/eseye/tests/EseyeTest.php
deleted file mode 100644
index 3d53610f4..000000000
--- a/vendor/eveseat/eseye/tests/EseyeTest.php
+++ /dev/null
@@ -1,354 +0,0 @@
-logger = NullLogger::class;
-
- // Remove caching
- $configuration->cache = NullCache::class;
-
- $this->esi = new Eseye;
- }
-
- public function testEseyeInstantiation()
- {
-
- $this->assertInstanceOf(Eseye::class, $this->esi);
- }
-
- public function testEseyeInstantiateWithInvalidAuthenticationData()
- {
-
- $this->expectException(InvalidContainerDataException::class);
-
- $authentication = new EsiAuthentication([
- 'foo' => 'bar',
- ]);
- new Eseye($authentication);
- }
-
- public function testEseyeInstantiateWithValidAuthenticationData()
- {
-
- $authentication = new EsiAuthentication([
- 'client_id' => 'SSO_CLIENT_ID',
- 'secret' => 'SSO_SECRET',
- 'refresh_token' => 'CHARACTER_REFRESH_TOKEN',
- ]);
- new Eseye($authentication);
- }
-
- public function testEseyeSetNewInvalidAuthenticationData()
- {
-
- $this->expectException(InvalidContainerDataException::class);
-
- $authentication = new EsiAuthentication([
- 'foo' => 'bar',
- 'baz' => null,
- ]);
- $this->esi->setAuthentication($authentication);
- }
-
- public function testEseyeSetNewValidAuthenticationData()
- {
-
- $authentication = new EsiAuthentication([
- 'client_id' => 'SSO_CLIENT_ID',
- 'secret' => 'SSO_SECRET',
- 'access_token' => 'ACCESS_TOKEN',
- 'refresh_token' => 'CHARACTER_REFRESH_TOKEN',
- 'token_expires' => '1970-01-01 00:00:00',
- 'scopes' => ['public'],
- ]);
- $this->esi->setAuthentication($authentication);
- }
-
- public function testEseyeGetAuthenticationBeforeSet()
- {
-
- $this->expectException(InvalidAuthenticationException::class);
-
- $this->esi->getAuthentication();
- }
-
- public function testEseyeGetAuthenticationAfterSet()
- {
-
- $authentication = new EsiAuthentication([
- 'client_id' => 'SSO_CLIENT_ID',
- 'secret' => 'SSO_SECRET',
- 'access_token' => 'ACCESS_TOKEN',
- 'refresh_token' => 'CHARACTER_REFRESH_TOKEN',
- 'token_expires' => '1970-01-01 00:00:00',
- 'scopes' => ['public'],
- ]);
- $this->esi->setAuthentication($authentication);
-
- $this->assertInstanceOf(EsiAuthentication::class, $this->esi->getAuthentication());
- }
-
- public function testEseyeGetConfigurationInstance()
- {
-
- $this->assertInstanceOf(Configuration::class, $this->esi->getConfiguration());
- }
-
- public function testEseyeGetLogger()
- {
-
- $this->assertInstanceOf(LogInterface::class, $this->esi->getLogger());
- }
-
- public function testEseyeSetAccessChecker()
- {
-
- $access = $this->createMock(CheckAccess::class);
-
- $this->assertInstanceOf(Eseye::class, $this->esi->setAccessChecker($access));
- }
-
- public function testEseyeGetAccessChecker()
- {
-
- $this->assertInstanceOf(CheckAccess::class, $this->esi->getAccessChecker());
- }
-
- public function testEseyeGetsFetcher()
- {
-
- $get_fetcher = self::getMethod('getFetcher');
- $return = $get_fetcher->invokeArgs(new Eseye, []);
-
- $this->assertInstanceOf(FetcherInterface::class, $return);
- }
-
- /**
- * Helper method to set private methods public.
- *
- * @param $name
- *
- * @return \ReflectionMethod
- */
- protected static function getMethod($name)
- {
-
- $class = new ReflectionClass('Seat\Eseye\Eseye');
- $method = $class->getMethod($name);
- $method->setAccessible(true);
-
- return $method;
- }
-
- public function testEseyeGetsCache()
- {
-
- $get_fetcher = self::getMethod('getCache');
- $return = $get_fetcher->invokeArgs(new Eseye, []);
-
- $this->assertInstanceOf(CacheInterface::class, $return);
- }
-
- public function testEseyeGetAndSetQueryString()
- {
-
- $object = $this->esi->setQueryString([
- 'foo' => 'bar',
- 'foobar' => ['foo', 'bar'],
- ]);
-
- $this->assertInstanceOf(Eseye::class, $object);
- $this->assertEquals([
- 'foo' => 'bar',
- 'foobar' => 'foo,bar',
- ], $this->esi->getQueryString());
- }
-
- public function testEseyeGetAndSetBody()
- {
-
- $object = $this->esi->setBody(['foo']);
-
- $this->assertInstanceOf(Eseye::class, $object);
- $this->assertEquals(['foo'], $this->esi->getBody());
- }
-
- public function testEseyeGetDefaultVersionString()
- {
-
- $version = $this->esi->getVersion();
-
- $this->assertEquals('/latest', $version);
- }
-
- public function testEseyeSetIncompleteVersionStringAndGetsCompleteVersionString()
- {
-
- $this->esi->setVersion('v1');
-
- $this->assertEquals('/v1', $this->esi->getVersion());
- }
-
- public function testEseyeReturnsEseyeAfterSettingEsiApiVersion()
- {
-
- $esi = $this->esi->setVersion('v4');
-
- $this->assertInstanceOf(Eseye::class, $esi);
- }
-
- public function testEseyeBuildValidDataUri()
- {
-
- $uri = $this->esi->buildDataUri('/{foo}/', ['foo' => 'bar']);
-
- $this->assertEquals('https://esi.evetech.net/latest/bar/?datasource=test',
- $uri->__toString());
- }
-
- public function testEseyeBuildDataUriFailsOnEmptyDataArray()
- {
-
- $this->expectException(UriDataMissingException::class);
-
- $this->esi->buildDataUri('/{foo}/', []);
- }
-
- public function testEseyeBuildDataUriFailsOnIncompleteDataArray()
- {
-
- $this->expectException(UriDataMissingException::class);
-
- $this->esi->buildDataUri('/{foo}/', ['bar' => 'baz']);
- }
-
- public function testEseyeMakesEsiApiCallWithCachedResponse()
- {
-
- $mock = new MockHandler([
- new Response(200, ['Expires' => 'Sat, 28 Jan 4017 05:46:49 GMT'], json_encode(['foo' => 'bar'])),
- ]);
-
- $fetcher = new GuzzleFetcher;
- $fetcher->setClient(new Client([
- 'handler' => HandlerStack::create($mock),
- ]));
-
- // Update the fetchers client
- $this->esi->setFetcher($fetcher);
-
- $response = $this->esi->invoke('get', '/foo');
-
- $this->assertEquals('bar', $response->foo);
-
- }
-
- public function testEseyeMakesEsiApiCallWithoutCachedResponse()
- {
-
- $mock = new MockHandler([
- new Response(200, ['Foo' => 'Bar'], json_encode(['foo' => 'bar'])),
- ]);
-
- $fetcher = new GuzzleFetcher;
- $fetcher->setClient(new Client([
- 'handler' => HandlerStack::create($mock),
- ]));
-
- // Update the fetchers client
- $this->esi->setFetcher($fetcher);
-
- $response = $this->esi->invoke('post', '/foo');
-
- $this->assertEquals('bar', $response->foo);
-
- }
-
- public function testEseyeMakesEsiApiCallToAuthenticatedEndpointWithoutAccess()
- {
-
- $this->expectException(EsiScopeAccessDeniedException::class);
-
- $mock = new MockHandler([
- new Response(401),
- ]);
-
- // Update the fetchers client
- $this->esi->setFetcher(new GuzzleFetcher(null, new Client([
- 'handler' => HandlerStack::create($mock),
- ])));
-
- $this->esi->invoke('get', '/characters/{character_id}/assets/', [
- 'character_id' => 123,
- ]);
- }
-
- public function testEseyeSetRefreshToken()
- {
-
- $authentication = new EsiAuthentication([
- 'client_id' => 'SSO_CLIENT_ID',
- 'secret' => 'SSO_SECRET',
- 'access_token' => 'ACCESS_TOKEN',
- 'refresh_token' => 'CHARACTER_REFRESH_TOKEN',
- 'token_expires' => '1970-01-01 00:00:00',
- 'scopes' => ['public'],
- ]);
- $this->esi->setAuthentication($authentication);
-
- $this->esi->setRefreshToken('ALTERNATE_REFRESH_TOKEN');
-
- $this->assertEquals('ALTERNATE_REFRESH_TOKEN', $this->esi->getAuthentication()->refresh_token);
- }
-
-}
diff --git a/vendor/eveseat/eseye/tests/Exceptions/RequestFailedExceptionTest.php b/vendor/eveseat/eseye/tests/Exceptions/RequestFailedExceptionTest.php
deleted file mode 100644
index cdf3b3f12..000000000
--- a/vendor/eveseat/eseye/tests/Exceptions/RequestFailedExceptionTest.php
+++ /dev/null
@@ -1,69 +0,0 @@
-exception = new RequestFailedException(new Exception('Foo'), new EsiResponse(
- json_encode(['error' => 'test']),
- [],
- 'now',
- 500
- ));
- }
-
- public function testRequestFailedGetsErrors()
- {
-
- $error = $this->exception->getError();
-
- $this->assertEquals('test', $error);
- }
-
- public function testRequestFailedGetsEsiResponse()
- {
-
- $response = $this->exception->getEsiResponse();
-
- $this->assertInstanceOf(EsiResponse::class, $response);
- }
-
- public function testRequestFailedGetsOriginalException()
- {
-
- $response = $this->exception->getOriginalException();
-
- $this->assertInstanceOf(Exception::class, $response);
- }
-
-}
diff --git a/vendor/eveseat/eseye/tests/Fetchers/GuzzleFetcherTest.php b/vendor/eveseat/eseye/tests/Fetchers/GuzzleFetcherTest.php
deleted file mode 100644
index 289278c72..000000000
--- a/vendor/eveseat/eseye/tests/Fetchers/GuzzleFetcherTest.php
+++ /dev/null
@@ -1,300 +0,0 @@
-logger = NullLogger::class;
-
- $this->fetcher = new GuzzleFetcher;
- }
-
- public function testGuzzleFetcherInstantiation()
- {
-
- $this->assertInstanceOf(GuzzleFetcher::class, $this->fetcher);
- }
-
- public function testGuzzleGetsClientIfNoneSet()
- {
-
- $fetcher = new GuzzleFetcher;
- $client = $fetcher->getClient();
-
- $this->assertInstanceOf(Client::class, $client);
- }
-
- public function testGuzzleFetcherStripRefreshTokenFromUrl()
- {
-
- $url = 'https://esi.url/oauth?type=refresh_token&refresh_token=foo';
- $stripped = $this->fetcher->stripRefreshTokenValue($url);
-
- $this->assertEquals('https://esi.url/oauth?type=refresh_token', $stripped);
- }
-
- public function testGuzzleFetcherStripRefreshTokenFromUrlWithoutRefreshToken()
- {
-
- $url = 'https://esi.url/type=refresh_token';
- $stripped = $this->fetcher->stripRefreshTokenValue($url);
-
- $this->assertEquals('https://esi.url/type=refresh_token', $stripped);
- }
-
- public function testGuzzleFetcherStripRefreshTokenNoTokenMention()
- {
-
- $url = 'https://esi.url/foo=bar';
- $stripped = $this->fetcher->stripRefreshTokenValue($url);
-
- $this->assertEquals($url, $stripped);
- }
-
- public function testGuzzleFetcherMakeEsiResponseContainer()
- {
-
- $response = json_encode(['response' => 'ok']);
-
- $container = $this->fetcher->makeEsiResponse($response, [], 'now', 200);
-
- $this->assertInstanceOf(EsiResponse::class, $container);
- }
-
- public function testGuzzleFetcherGetAuthenticationWhenNoneSet()
- {
-
- $authentication = $this->fetcher->getAuthentication();
-
- $this->assertNull($authentication);
- }
-
- public function testGuzzleFetcherGetAuthenticationWhenSettingAuthentication()
- {
-
- $fetcher = new GuzzleFetcher(new EsiAuthentication([
- 'client_id' => 'foo',
- ]));
-
- $this->assertInstanceOf(EsiAuthentication::class, $fetcher->getAuthentication());
- }
-
- public function testGuzzleSetsAuthentication()
- {
-
- $this->fetcher->setAuthentication(new EsiAuthentication([
- 'client_id' => 'foo',
- 'secret' => 'bar',
- 'access_token' => '_',
- 'refresh_token' => 'baz',
- 'token_expires' => '1970-01-01 00:00:00',
- 'scopes' => ['public'],
- ]));
-
- $this->assertInstanceOf(EsiAuthentication::class, $this->fetcher->getAuthentication());
- }
-
- public function testGuzzleFailsSettingInvalidAuthentication()
- {
-
- $this->expectException(InvalidAuthenticationException::class);
-
- $this->fetcher->setAuthentication(new EsiAuthentication([
- 'client_id' => null,
- ]));
- }
-
- public function testGuzzleShouldFailGettingTokenWithoutAuthentication()
- {
-
- $this->expectException(InvalidAuthenticationException::class);
-
- $get_token = self::getMethod('getToken');
- $get_token->invokeArgs(new GuzzleFetcher, []);
- }
-
- /**
- * Helper method to set private methods public.
- *
- * @param $name
- *
- * @return \ReflectionMethod
- */
- protected static function getMethod($name)
- {
-
- $class = new ReflectionClass('Seat\Eseye\Fetchers\GuzzleFetcher');
- $method = $class->getMethod($name);
- $method->setAccessible(true);
-
- return $method;
- }
-
- public function testGuzzleFetcherGetPublicScopeWithoutAuthentication()
- {
-
- $scopes = $this->fetcher->getAuthenticationScopes();
-
- $this->assertEquals(1, count($scopes));
- }
-
- public function testGuzzleCallingWithoutAuthentication()
- {
-
- $mock = new MockHandler([
- new Response(200, ['X-Foo' => 'Bar'], json_encode(['foo' => 'var'])),
- ]);
-
- // Update the fetchers client
- $this->fetcher->setClient(new Client([
- 'handler' => HandlerStack::create($mock),
- ]));
-
- $response = $this->fetcher->call('get', '/foo', ['foo' => 'bar']);
-
- $this->assertInstanceOf(EsiResponse::class, $response);
- }
-
- public function testGuzzleCallingWithAuthentication()
- {
-
- $mock = new MockHandler([
- // RefreshToken response
- new Response(200, ['X-Foo' => 'Bar'], json_encode([
- 'access_token' => 'foo', 'expires_in' => 1200, 'refresh_token' => 'bar',
- ])),
- new Response(200, ['X-Foo' => 'Bar'], json_encode(['foo' => 'var'])),
- ]);
-
- // Update the fetchers client
- $this->fetcher->setClient(new Client([
- 'handler' => HandlerStack::create($mock),
- ]));
-
- // Update the fetchers authentication
- $this->fetcher->setAuthentication(new EsiAuthentication([
- 'client_id' => 'foo',
- 'secret' => 'bar',
- 'access_token' => '_',
- 'refresh_token' => 'baz',
- 'token_expires' => '1970-01-01 00:00:00',
- 'scopes' => ['public'],
- ]));
-
- $response = $this->fetcher->call('get', '/foo', ['foo' => 'bar']);
-
- $this->assertInstanceOf(EsiResponse::class, $response);
- }
-
- public function testGuzzleCallingCatchesRequestAuthenticationFailure()
- {
-
- $this->expectException(RequestFailedException::class);
-
- $mock = new MockHandler([
- new Response(401),
- ]);
-
- // Update the fetchers client
- $this->fetcher->setClient(new Client([
- 'handler' => HandlerStack::create($mock),
- ]));
-
- $this->fetcher->call('get', '/foo', ['foo' => 'bar']);
- }
-
- public function testGuzzleFetcherMakesHttpRequest()
- {
-
- $mock = new MockHandler([
- new Response(200, ['X-Foo' => 'Bar'], json_encode(['foo' => 'var'])),
- ]);
-
- // Update the fetchers client
- $this->fetcher->setClient(new Client([
- 'handler' => HandlerStack::create($mock),
- ]));
-
- $response = $this->fetcher->httpRequest('get', '/foo');
-
- $this->assertInstanceOf(EsiResponse::class, $response);
-
- }
-
- public function testGuzzleConstructsWithClientAndGetsAuthenticationScopes()
- {
-
- $mock = new MockHandler([
- // RefreshToken response
- new Response(200, ['X-Foo' => 'Bar'], json_encode([
- 'access_token' => 'foo', 'expires_in' => 1200, 'refresh_token' => 'bar',
- ])),
- new Response(200, ['X-Foo' => 'Bar'], json_encode([
- 'Scopes' => 'foo bar baz',
- ])),
- ]);
-
- // Update the fetchers client
- $client = new Client([
- 'handler' => HandlerStack::create($mock),
- ]);
-
- // Update the fetchers authentication
- $authentication = new EsiAuthentication([
- 'client_id' => 'foo',
- 'secret' => 'bar',
- 'access_token' => '_',
- 'refresh_token' => 'baz',
- 'token_expires' => '1970-01-01 00:00:00',
- ]);
-
- $fetcher = new GuzzleFetcher($authentication);
- $fetcher->setClient($client);
-
- $scopes = $fetcher->getAuthenticationScopes();
-
- $this->assertEquals(['foo', 'bar', 'baz', 'public'], $scopes);
- }
-}
diff --git a/vendor/eveseat/eseye/tests/Log/FileLoggerTest.php b/vendor/eveseat/eseye/tests/Log/FileLoggerTest.php
deleted file mode 100644
index 222d2c82c..000000000
--- a/vendor/eveseat/eseye/tests/Log/FileLoggerTest.php
+++ /dev/null
@@ -1,95 +0,0 @@
-root = vfsStream::setup('logs/');
- Configuration::getInstance()->logfile_location = vfsStream::url('logs/');
-
- $this->logger = new FileLogger;
- }
-
- public function testFileLoggerWritesLogInfo()
- {
-
- $this->logger->log('foo');
- $logfile_content = $this->root->getChild('eseye.log')->getContent();
-
- $this->assertContains('eseye.INFO: foo', $logfile_content);
- }
-
- public function testFileLoggerSkipWritesLogDebugWithoutRequiredLevel()
- {
-
- $this->logger->debug('foo');
- $logfile_content = $this->root->getChild('eseye.log');
-
- $this->assertNull($logfile_content);
- }
-
- public function testFileLoggerWritesLogDebug()
- {
-
- Configuration::getInstance()->logger_level = Logger::DEBUG;
-
- // Init a new logger with the updated config
- $logger = new FileLogger;
-
- $logger->debug('foo');
- $logfile_content = $this->root->getChild('eseye.log')->getContent();
-
- $this->assertContains('eseye.DEBUG: foo', $logfile_content);
- }
-
- public function testFileLoggerWritesLogWarning()
- {
-
- $this->logger->warning('foo');
- $logfile_content = $this->root->getChild('eseye.log')->getContent();
-
- $this->assertContains('eseye.WARNING: foo', $logfile_content);
- }
-
- public function testFileLoggerWritesLogError()
- {
-
- $this->logger->error('foo');
- $logfile_content = $this->root->getChild('eseye.log')->getContent();
-
- $this->assertContains('eseye.ERROR: foo', $logfile_content);
- }
-
-}
diff --git a/vendor/eveseat/eseye/tests/Log/NullLoggerTest.php b/vendor/eveseat/eseye/tests/Log/NullLoggerTest.php
deleted file mode 100644
index ef28b3043..000000000
--- a/vendor/eveseat/eseye/tests/Log/NullLoggerTest.php
+++ /dev/null
@@ -1,61 +0,0 @@
-logger = new NullLogger;
- }
-
- public function testNullLoggerIgnoresInfo()
- {
-
- $this->assertNull($this->logger->log('foo'));
- }
-
- public function testNullLoggerIgnoresDebug()
- {
-
- $this->assertNull($this->logger->debug('foo'));
- }
-
- public function testNullLoggerIgnoresWarning()
- {
-
- $this->assertNull($this->logger->warning('foo'));
- }
-
- public function testNullLoggerIgnoresErro()
- {
-
- $this->assertNull($this->logger->error('foo'));
- }
-
-}
diff --git a/vendor/eveseat/eseye/tests/Log/RotatingFileLoggerTest.php b/vendor/eveseat/eseye/tests/Log/RotatingFileLoggerTest.php
deleted file mode 100644
index fd5076826..000000000
--- a/vendor/eveseat/eseye/tests/Log/RotatingFileLoggerTest.php
+++ /dev/null
@@ -1,101 +0,0 @@
-root = vfsStream::setup('logs');
- Configuration::getInstance()->logfile_location = $this->root->url();
- Configuration::getInstance()->logger_level = 'info';
-
- $this->logger = new RotatingFileLogger;
-
- # Shitty hack to get the filename to expect. Format: eseye-2018-05-06.log
- $this->logfile_name = 'eseye-' . date('Y-m-d') . '.log';
- }
-
- public function testFileLoggerWritesLogInfo()
- {
-
- $this->logger->log('foo');
- $logfile_content = $this->root->getChild($this->logfile_name)->getContent();
-
- $this->assertContains('eseye.INFO: foo', $logfile_content);
- }
-
- public function testFileLoggerSkipWritesLogDebugWithoutRequiredLevel()
- {
-
- $this->logger->debug('foo');
- $logfile_content = $this->root->getChild($this->logfile_name);
-
- $this->assertNull($logfile_content);
- }
-
- public function testFileLoggerWritesLogDebug()
- {
-
- Configuration::getInstance()->logger_level = Logger::DEBUG;
-
- // Init a new logger with the updated config
- $logger = new RotatingFileLogger;
-
- $logger->debug('foo');
- $logfile_content = $this->root->getChild($this->logfile_name)->getContent();
-
- $this->assertContains('eseye.DEBUG: foo', $logfile_content);
- }
-
- public function testFileLoggerWritesLogWarning()
- {
-
- $this->logger->warning('foo');
- $logfile_content = $this->root->getChild($this->logfile_name)->getContent();
-
- $this->assertContains('eseye.WARNING: foo', $logfile_content);
- }
-
- public function testFileLoggerWritesLogError()
- {
-
- $this->logger->error('foo');
- $logfile_content = $this->root->getChild($this->logfile_name)->getContent();
-
- $this->assertContains('eseye.ERROR: foo', $logfile_content);
- }
-
-}
diff --git a/vendor/eveseat/eseye/tools/esi.json b/vendor/eveseat/eseye/tools/esi.json
deleted file mode 100644
index 35c369a88..000000000
--- a/vendor/eveseat/eseye/tools/esi.json
+++ /dev/null
@@ -1 +0,0 @@
-{"swagger":"2.0","info":{"title":"EVE Swagger Interface","description":"An OpenAPI for EVE Online","version":"0.7.3"},"host":"esi.tech.ccp.is","basePath":"/latest","schemes":["https"],"produces":["application/json"],"paths":{"/alliances/{alliance_id}/":{"get":{"description":"Public information about an alliance\n\n---\nAlternate route: `/v2/alliances/{alliance_id}/`\n\n---\nThis route is cached for up to 3600 seconds\n\n---\n[This route has an available update](https://esi.tech.ccp.is/diff/latest/dev/#GET-/alliances/{alliance_id}/)","summary":"Get alliance information","tags":["Alliance"],"parameters":[{"$ref":"#/parameters/alliance_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Public data about an alliance","examples":{"application/json":{"alliance_name":"C C P Alliance","ticker":"","executor_corp":98356193,"date_founded":"2016-06-26T21:00:00Z"}},"schema":{"type":"object","required":["alliance_name","ticker","date_founded"],"properties":{"alliance_name":{"type":"string","description":"the full name of the alliance","title":"get_alliances_alliance_id_alliance_name"},"ticker":{"type":"string","description":"the short name of the alliance","title":"get_alliances_alliance_id_ticker"},"executor_corp":{"type":"integer","format":"int32","description":"the executor corporation ID, if this alliance is not closed","title":"get_alliances_alliance_id_executor_corp"},"date_founded":{"type":"string","format":"date-time","title":"get_alliances_alliance_id_date_founded","description":"date_founded string"}},"title":"get_alliances_alliance_id_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"404":{"description":"Alliance not found","examples":{"application/json":{"error":"Alliance not found"}},"schema":{"type":"object","description":"Alliance not found","properties":{"error":{"type":"string","description":"error message","title":"get_alliances_alliance_id_error"}},"title":"get_alliances_alliance_id_not_found"}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_alliances_alliance_id","x-cached-seconds":3600,"x-alternate-versions":["v2"]}},"/alliances/{alliance_id}/corporations/":{"get":{"description":"List all current member corporations of an alliance\n\n---\nAlternate route: `/dev/alliances/{alliance_id}/corporations/`\n\nAlternate route: `/legacy/alliances/{alliance_id}/corporations/`\n\nAlternate route: `/v1/alliances/{alliance_id}/corporations/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"List alliance's corporations","tags":["Alliance"],"parameters":[{"$ref":"#/parameters/alliance_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"List of corporation IDs","examples":{"application/json":[98000001]},"schema":{"type":"array","maxItems":1000,"items":{"type":"integer","format":"int32","minimum":0,"uniqueItems":true,"title":"get_alliances_alliance_id_corporations_200_ok","description":"200 ok integer"},"title":"get_alliances_alliance_id_corporations_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_alliances_alliance_id_corporations","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/alliances/names/":{"get":{"description":"Resolve a set of alliance IDs to alliance names\n\n---\nAlternate route: `/legacy/alliances/names/`\n\nAlternate route: `/v1/alliances/names/`\n\n---\nThis route is cached for up to 3600 seconds\n\n---\n[This route has an available update](https://esi.tech.ccp.is/diff/latest/dev/#GET-/alliances/names/)","summary":"Get alliance names","tags":["Alliance"],"parameters":[{"name":"alliance_ids","in":"query","description":"A comma separated list of alliance IDs","required":true,"type":"array","minItems":1,"maxItems":100,"items":{"type":"integer","format":"int64"}},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"List of id/name associations","examples":{"application/json":[{"alliance_id":1000171,"alliance_name":"Republic University"}]},"schema":{"type":"array","maxItems":100,"items":{"type":"object","required":["alliance_id","alliance_name"],"properties":{"alliance_id":{"type":"integer","format":"int32","title":"get_alliances_names_alliance_id","description":"alliance_id integer"},"alliance_name":{"type":"string","title":"get_alliances_names_alliance_name","description":"alliance_name string"}},"title":"get_alliances_names_200_ok","description":"200 ok object"},"title":"get_alliances_names_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_alliances_names","x-cached-seconds":3600,"x-alternate-versions":["legacy","v1"]}},"/alliances/{alliance_id}/icons/":{"get":{"description":"Get the icon urls for a alliance\n\n---\nAlternate route: `/dev/alliances/{alliance_id}/icons/`\n\nAlternate route: `/legacy/alliances/{alliance_id}/icons/`\n\nAlternate route: `/v1/alliances/{alliance_id}/icons/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"Get alliance icon","tags":["Alliance"],"parameters":[{"$ref":"#/parameters/alliance_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Icon URLs for the given alliance id and server","examples":{"application/json":{"px64x64":"https://imageserver.eveonline.com/Alliance/503818424_64.png","px128x128":"https://imageserver.eveonline.com/Alliance/503818424_128.png"}},"schema":{"type":"object","properties":{"px64x64":{"type":"string","title":"get_alliances_alliance_id_icons_px64x64","description":"px64x64 string"},"px128x128":{"type":"string","title":"get_alliances_alliance_id_icons_px128x128","description":"px128x128 string"}},"title":"get_alliances_alliance_id_icons_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"404":{"description":"No image server for this datasource","examples":{"application/json":{"error":"No image server for this datasource"}},"schema":{"type":"object","description":"No image server for this datasource","properties":{"error":{"type":"string","description":"error message","title":"get_alliances_alliance_id_icons_error"}},"title":"get_alliances_alliance_id_icons_not_found"}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_alliances_alliance_id_icons","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/alliances/":{"get":{"description":"List all active player alliances\n\n---\nAlternate route: `/dev/alliances/`\n\nAlternate route: `/legacy/alliances/`\n\nAlternate route: `/v1/alliances/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"List all alliances","tags":["Alliance"],"responses":{"200":{"description":"List of Alliance IDs","examples":{"application/json":[99000001,99000002]},"schema":{"type":"array","maxItems":5000,"items":{"type":"integer","format":"int32","minimum":0,"uniqueItems":true,"title":"get_alliances_200_ok","description":"200 ok integer"},"title":"get_alliances_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"operationId":"get_alliances","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/assets/":{"get":{"description":"Return a list of the characters assets\n\n---\nAlternate route: `/v2/characters/{character_id}/assets/`\n\n---\nThis route is cached for up to 3600 seconds\n\n---\n[This route has an available update](https://esi.tech.ccp.is/diff/latest/dev/#GET-/characters/{character_id}/assets/)","summary":"Get character assets","tags":["Assets"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/page"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A flat list of the users assets","examples":{"application/json":[{"location_flag":"Hangar","location_id":60002959,"is_singleton":true,"type_id":3516,"item_id":1000000016835,"location_type":"station"}]},"schema":{"type":"array","maxItems":5000,"items":{"type":"object","required":["type_id","location_id","location_type","item_id","location_flag","is_singleton"],"properties":{"type_id":{"type":"integer","format":"int32","title":"get_characters_character_id_assets_type_id","description":"type_id integer"},"quantity":{"type":"integer","format":"int32","title":"get_characters_character_id_assets_quantity","description":"quantity integer"},"location_id":{"type":"integer","format":"int64","title":"get_characters_character_id_assets_location_id","description":"location_id integer"},"location_type":{"type":"string","enum":["station","solar_system","other"],"title":"get_characters_character_id_assets_location_type","description":"location_type string"},"item_id":{"type":"integer","format":"int64","title":"get_characters_character_id_assets_item_id","description":"item_id integer"},"location_flag":{"type":"string","enum":["AssetSafety","AutoFit","Cargo","CorpseBay","Deliveries","DroneBay","FighterBay","FighterTube0","FighterTube1","FighterTube2","FighterTube3","FighterTube4","FleetHangar","Hangar","HangarAll","HiSlot0","HiSlot1","HiSlot2","HiSlot3","HiSlot4","HiSlot5","HiSlot6","HiSlot7","HiddenModifiers","Implant","LoSlot0","LoSlot1","LoSlot2","LoSlot3","LoSlot4","LoSlot5","LoSlot6","LoSlot7","Locked","MedSlot0","MedSlot1","MedSlot2","MedSlot3","MedSlot4","MedSlot5","MedSlot6","MedSlot7","QuafeBay","RigSlot0","RigSlot1","RigSlot2","RigSlot3","RigSlot4","RigSlot5","RigSlot6","RigSlot7","ShipHangar","Skill","SpecializedAmmoHold","SpecializedCommandCenterHold","SpecializedFuelBay","SpecializedGasHold","SpecializedIndustrialShipHold","SpecializedLargeShipHold","SpecializedMaterialBay","SpecializedMediumShipHold","SpecializedMineralHold","SpecializedOreHold","SpecializedPlanetaryCommoditiesHold","SpecializedSalvageHold","SpecializedShipHold","SpecializedSmallShipHold","SubSystemBay","SubSystemSlot0","SubSystemSlot1","SubSystemSlot2","SubSystemSlot3","SubSystemSlot4","SubSystemSlot5","SubSystemSlot6","SubSystemSlot7","Unlocked","Wardrobe"],"title":"get_characters_character_id_assets_location_flag","description":"location_flag string"},"is_singleton":{"type":"boolean","title":"get_characters_character_id_assets_is_singleton","description":"is_singleton boolean"}},"title":"get_characters_character_id_assets_200_ok","description":"200 ok object"},"title":"get_characters_character_id_assets_ok","description":"200 ok array"},"headers":{"X-Pages":{"description":"Maximum page number","type":"integer","format":"int32","default":1},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-assets.read_assets.v1"]}],"operationId":"get_characters_character_id_assets","x-cached-seconds":3600,"x-alternate-versions":["v2"]}},"/corporations/{corporation_id}/assets/":{"get":{"description":"Return a list of the corporation assets\n\n---\nAlternate route: `/legacy/corporations/{corporation_id}/assets/`\n\nAlternate route: `/v1/corporations/{corporation_id}/assets/`\n\n---\nThis route is cached for up to 3600 seconds\n\n---\nRequires one of the following EVE corporation role(s): Director\n\n\n---\n[This route has an available update](https://esi.tech.ccp.is/diff/latest/dev/#GET-/corporations/{corporation_id}/assets/)","summary":"Get corporation assets","tags":["Assets"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/page"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of assets","examples":{"application/json":[{"location_flag":"Hangar","location_id":60002959,"is_singleton":true,"type_id":3516,"item_id":1000000016835,"location_type":"station"}]},"schema":{"type":"array","maxItems":5000,"items":{"type":"object","required":["type_id","location_id","location_type","item_id","location_flag","is_singleton"],"properties":{"type_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_assets_type_id","description":"type_id integer"},"quantity":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_assets_quantity","description":"quantity integer"},"location_id":{"type":"integer","format":"int64","title":"get_corporations_corporation_id_assets_location_id","description":"location_id integer"},"location_type":{"type":"string","enum":["station","solar_system","other"],"title":"get_corporations_corporation_id_assets_location_type","description":"location_type string"},"item_id":{"type":"integer","format":"int64","title":"get_corporations_corporation_id_assets_item_id","description":"item_id integer"},"location_flag":{"type":"string","enum":["AssetSafety","AutoFit","Bonus","Booster","BoosterBay","Capsule","Cargo","CorpDeliveries","CorpSAG1","CorpSAG2","CorpSAG3","CorpSAG4","CorpSAG5","CorpSAG6","CorpSAG7","CrateLoot","Deliveries","DroneBay","DustBattle","DustDatabank","FighterBay","FighterTube0","FighterTube1","FighterTube2","FighterTube3","FighterTube4","FleetHangar","Hangar","HangarAll","HiSlot0","HiSlot1","HiSlot2","HiSlot3","HiSlot4","HiSlot5","HiSlot6","HiSlot7","HiddenModifers","Implant","Impounded","JunkyardReprocessed","JunkyardTrashed","LoSlot0","LoSlot1","LoSlot2","LoSlot3","LoSlot4","LoSlot5","LoSlot6","LoSlot7","Locked","MedSlot0","MedSlot1","MedSlot2","MedSlot3","MedSlot4","MedSlot5","MedSlot6","MedSlot7","OfficeFolder","Pilot","PlanetSurface","QuafeBay","Reward","RigSlot0","RigSlot1","RigSlot2","RigSlot3","RigSlot4","RigSlot5","RigSlot6","RigSlot7","SecondaryStorage","ServiceSlot0","ServiceSlot1","ServiceSlot2","ServiceSlot3","ServiceSlot4","ServiceSlot5","ServiceSlot6","ServiceSlot7","ShipHangar","ShipOffline","Skill","SkillInTraining","SpecializedAmmoHold","SpecializedCommandCenterHold","SpecializedFuelBay","SpecializedGasHold","SpecializedIndustrialShipHold","SpecializedLargeShipHold","SpecializedMaterialBay","SpecializedMediumShipHold","SpecializedMineralHold","SpecializedOreHold","SpecializedPlanetaryCommoditiesHold","SpecializedSalvageHold","SpecializedShipHold","SpecializedSmallShipHold","StructureActive","StructureFuel","StructureInactive","StructureOffline","SubSystemSlot0","SubSystemSlot1","SubSystemSlot2","SubSystemSlot3","SubSystemSlot4","SubSystemSlot5","SubSystemSlot6","SubSystemSlot7","SubsystemBay","Unlocked","Wallet","Wardrobe"],"title":"get_corporations_corporation_id_assets_location_flag","description":"location_flag string"},"is_singleton":{"type":"boolean","title":"get_corporations_corporation_id_assets_is_singleton","description":"is_singleton boolean"}},"title":"get_corporations_corporation_id_assets_200_ok","description":"200 ok object"},"title":"get_corporations_corporation_id_assets_ok","description":"200 ok array"},"headers":{"X-Pages":{"description":"Maximum page number","type":"integer","format":"int32","default":1},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"x-required-roles":["Director"],"security":[{"evesso":["esi-assets.read_corporation_assets.v1"]}],"operationId":"get_corporations_corporation_id_assets","x-cached-seconds":3600,"x-alternate-versions":["legacy","v1"]}},"/characters/{character_id}/assets/names/":{"post":{"description":"Return names for a set of item ids, which you can get from character assets endpoint. Typically used for items that can customize names, like containers or ships.\n\n---\nAlternate route: `/dev/characters/{character_id}/assets/names/`\n\nAlternate route: `/legacy/characters/{character_id}/assets/names/`\n\nAlternate route: `/v1/characters/{character_id}/assets/names/`\n","summary":"Get character asset names","tags":["Assets"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"name":"item_ids","in":"body","description":"A list of item ids","required":true,"schema":{"type":"array","minItems":1,"maxItems":1000,"uniqueItems":true,"items":{"type":"integer","format":"int64","title":"post_characters_character_id_assets_names_item_id","description":"item_id integer"},"title":"post_characters_character_id_assets_names_item_ids","description":"item_ids array"}},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"List of asset names","examples":{"application/json":[{"item_id":12345,"name":"Awesome Name"}]},"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["item_id","name"],"properties":{"item_id":{"type":"integer","format":"int64","title":"post_characters_character_id_assets_names_item_id","description":"item_id integer"},"name":{"type":"string","title":"post_characters_character_id_assets_names_name","description":"name string"}},"title":"post_characters_character_id_assets_names_200_ok","description":"200 ok object"},"title":"post_characters_character_id_assets_names_ok","description":"200 ok array"}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-assets.read_assets.v1"]}],"operationId":"post_characters_character_id_assets_names","x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/assets/locations/":{"post":{"description":"Return locations for a set of item ids, which you can get from character assets endpoint. Coordinates for items in hangars or stations are set to (0,0,0)\n\n---\nAlternate route: `/legacy/characters/{character_id}/assets/locations/`\n\nAlternate route: `/v1/characters/{character_id}/assets/locations/`\n\n\n---\n[This route has an available update](https://esi.tech.ccp.is/diff/latest/dev/#POST-/characters/{character_id}/assets/locations/)","summary":"Get character asset locations","tags":["Assets"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"name":"item_ids","in":"body","description":"A list of item ids","required":true,"schema":{"type":"array","minItems":1,"maxItems":1000,"uniqueItems":true,"items":{"type":"integer","format":"int64","title":"post_characters_character_id_assets_locations_item_id","description":"item_id integer"},"title":"post_characters_character_id_assets_locations_item_ids","description":"item_ids array"}},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"List of asset locations","examples":{"application/json":[{"item_id":12345,"x":1.2,"y":2.3,"z":-3.4}]},"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["item_id","x","y","z"],"properties":{"item_id":{"type":"integer","format":"int64","title":"post_characters_character_id_assets_locations_item_id","description":"item_id integer"},"x":{"type":"number","format":"double","title":"post_characters_character_id_assets_locations_x","description":"x number"},"y":{"type":"number","format":"double","title":"post_characters_character_id_assets_locations_y","description":"y number"},"z":{"type":"number","format":"double","title":"post_characters_character_id_assets_locations_z","description":"z number"}},"title":"post_characters_character_id_assets_locations_200_ok","description":"200 ok object"},"title":"post_characters_character_id_assets_locations_ok","description":"200 ok array"}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-assets.read_assets.v1"]}],"operationId":"post_characters_character_id_assets_locations","x-alternate-versions":["legacy","v1"]}},"/corporations/{corporation_id}/assets/names/":{"post":{"description":"Return names for a set of item ids, which you can get from corporation assets endpoint. Only valid for items that can customize names, like containers or ships.\n\n---\nAlternate route: `/dev/corporations/{corporation_id}/assets/names/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/assets/names/`\n\nAlternate route: `/v1/corporations/{corporation_id}/assets/names/`\n\n\n---\nRequires one of the following EVE corporation role(s): Director\n","summary":"Get coporation asset names","tags":["Assets"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"name":"item_ids","in":"body","description":"A list of item ids","required":true,"schema":{"type":"array","minItems":1,"maxItems":1000,"uniqueItems":true,"items":{"type":"integer","format":"int64","title":"post_corporations_corporation_id_assets_names_item_id","description":"item_id integer"},"title":"post_corporations_corporation_id_assets_names_item_ids","description":"item_ids array"}},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"List of asset names","examples":{"application/json":[{"item_id":12345,"name":"Awesome Name"}]},"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["item_id","name"],"properties":{"item_id":{"type":"integer","format":"int64","title":"post_corporations_corporation_id_assets_names_item_id","description":"item_id integer"},"name":{"type":"string","title":"post_corporations_corporation_id_assets_names_name","description":"name string"}},"title":"post_corporations_corporation_id_assets_names_200_ok","description":"200 ok object"},"title":"post_corporations_corporation_id_assets_names_ok","description":"200 ok array"}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"x-required-roles":["Director"],"security":[{"evesso":["esi-assets.read_corporation_assets.v1"]}],"operationId":"post_corporations_corporation_id_assets_names","x-alternate-versions":["dev","legacy","v1"]}},"/corporations/{corporation_id}/assets/locations/":{"post":{"description":"Return locations for a set of item ids, which you can get from corporation assets endpoint. Coordinates for items in hangars or stations are set to (0,0,0)\n\n---\nAlternate route: `/legacy/corporations/{corporation_id}/assets/locations/`\n\nAlternate route: `/v1/corporations/{corporation_id}/assets/locations/`\n\n\n---\nRequires one of the following EVE corporation role(s): Director\n\n\n---\n[This route has an available update](https://esi.tech.ccp.is/diff/latest/dev/#POST-/corporations/{corporation_id}/assets/locations/)","summary":"Get corporation asset locations","tags":["Assets"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"name":"item_ids","in":"body","description":"A list of item ids","required":true,"schema":{"type":"array","minItems":1,"maxItems":1000,"uniqueItems":true,"items":{"type":"integer","format":"int64","title":"post_corporations_corporation_id_assets_locations_item_id","description":"item_id integer"},"title":"post_corporations_corporation_id_assets_locations_item_ids","description":"item_ids array"}},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"List of asset locations","examples":{"application/json":[{"item_id":12345,"x":1.2,"y":2.3,"z":-3.4}]},"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["item_id","x","y","z"],"properties":{"item_id":{"type":"integer","format":"int64","title":"post_corporations_corporation_id_assets_locations_item_id","description":"item_id integer"},"x":{"type":"number","format":"double","title":"post_corporations_corporation_id_assets_locations_x","description":"x number"},"y":{"type":"number","format":"double","title":"post_corporations_corporation_id_assets_locations_y","description":"y number"},"z":{"type":"number","format":"double","title":"post_corporations_corporation_id_assets_locations_z","description":"z number"}},"title":"post_corporations_corporation_id_assets_locations_200_ok","description":"200 ok object"},"title":"post_corporations_corporation_id_assets_locations_ok","description":"200 ok array"}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"x-required-roles":["Director"],"security":[{"evesso":["esi-assets.read_corporation_assets.v1"]}],"operationId":"post_corporations_corporation_id_assets_locations","x-alternate-versions":["legacy","v1"]}},"/characters/{character_id}/bookmarks/":{"get":{"description":"A list of your character's personal bookmarks\n\n---\nAlternate route: `/dev/characters/{character_id}/bookmarks/`\n\nAlternate route: `/v2/characters/{character_id}/bookmarks/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"List bookmarks","tags":["Bookmarks"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/page"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of bookmarks","examples":{"application/json":[{"bookmark_id":4,"location_id":30003430,"item":{"type_id":29633,"item_id":50006722},"folder_id":5,"label":"Stargate","notes":"This is a stargate","created":"2016-08-09T11:57:47Z","creator_id":2112625428},{"bookmark_id":5,"location_id":30003430,"coordinates":{"x":-2958928814000,"y":-338367275823,"z":2114538075090},"folder_id":5,"label":"Random location","notes":"This is a random location in space","created":"2016-08-09T11:57:47Z","creator_id":2112625428}]},"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["bookmark_id","created","label","notes","location_id","creator_id"],"properties":{"bookmark_id":{"type":"integer","format":"int32","title":"get_characters_character_id_bookmarks_bookmark_id","description":"bookmark_id integer"},"folder_id":{"type":"integer","format":"int32","title":"get_characters_character_id_bookmarks_folder_id","description":"folder_id integer"},"created":{"type":"string","format":"date-time","title":"get_characters_character_id_bookmarks_created","description":"created string"},"label":{"type":"string","title":"get_characters_character_id_bookmarks_label","description":"label string"},"notes":{"type":"string","title":"get_characters_character_id_bookmarks_notes","description":"notes string"},"location_id":{"type":"integer","format":"int32","title":"get_characters_character_id_bookmarks_location_id","description":"location_id integer"},"creator_id":{"type":"integer","format":"int32","title":"get_characters_character_id_bookmarks_creator_id","description":"creator_id integer"},"item":{"type":"object","description":"Optional object that is returned if a bookmark was made on a particular item.","required":["item_id","type_id"],"properties":{"item_id":{"type":"integer","format":"int64","title":"get_characters_character_id_bookmarks_item_id","description":"item_id integer"},"type_id":{"type":"integer","format":"int32","title":"get_characters_character_id_bookmarks_type_id","description":"type_id integer"}},"title":"get_characters_character_id_bookmarks_item"},"coordinates":{"type":"object","description":"Optional object that is returned if a bookmark was made on a planet or a random location in space.","required":["x","y","z"],"properties":{"x":{"type":"number","format":"double","title":"get_characters_character_id_bookmarks_x","description":"x number"},"y":{"type":"number","format":"double","title":"get_characters_character_id_bookmarks_y","description":"y number"},"z":{"type":"number","format":"double","title":"get_characters_character_id_bookmarks_z","description":"z number"}},"title":"get_characters_character_id_bookmarks_coordinates"}},"title":"get_characters_character_id_bookmarks_200_ok","description":"200 ok object"},"title":"get_characters_character_id_bookmarks_ok","description":"200 ok array"},"headers":{"X-Pages":{"description":"Maximum page number","type":"integer","format":"int32","default":1},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-bookmarks.read_character_bookmarks.v1"]}],"operationId":"get_characters_character_id_bookmarks","x-cached-seconds":3600,"x-alternate-versions":["dev","v2"]}},"/characters/{character_id}/bookmarks/folders/":{"get":{"description":"A list of your character's personal bookmark folders\n\n---\nAlternate route: `/dev/characters/{character_id}/bookmarks/folders/`\n\nAlternate route: `/v2/characters/{character_id}/bookmarks/folders/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"List bookmark folders","tags":["Bookmarks"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/page"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"List of bookmark folders","examples":{"application/json":[{"folder_id":5,"name":"Icecream"}]},"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["folder_id","name"],"properties":{"folder_id":{"type":"integer","format":"int32","title":"get_characters_character_id_bookmarks_folders_folder_id","description":"folder_id integer"},"name":{"type":"string","title":"get_characters_character_id_bookmarks_folders_name","description":"name string"}},"title":"get_characters_character_id_bookmarks_folders_200_ok","description":"200 ok object"},"title":"get_characters_character_id_bookmarks_folders_ok","description":"200 ok array"},"headers":{"X-Pages":{"description":"Maximum page number","type":"integer","format":"int32","default":1},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-bookmarks.read_character_bookmarks.v1"]}],"operationId":"get_characters_character_id_bookmarks_folders","x-cached-seconds":3600,"x-alternate-versions":["dev","v2"]}},"/corporations/{corporation_id}/bookmarks/":{"get":{"description":"A list of your corporation's bookmarks\n\n---\nAlternate route: `/dev/corporations/{corporation_id}/bookmarks/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/bookmarks/`\n\nAlternate route: `/v1/corporations/{corporation_id}/bookmarks/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"List corporation bookmarks","tags":["Bookmarks"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/page"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"List of corporation owned bookmarks","examples":{"application/json":[{"bookmark_id":4,"location_id":30003430,"item":{"type_id":29633,"item_id":50006722},"creator_id":2112625428,"folder_id":5,"label":"Stargate","notes":"This is a stargate","created":"2016-08-09T11:57:47Z"},{"bookmark_id":5,"location_id":30003430,"coordinates":{"x":-2958928814000,"y":-338367275823,"z":2114538075090},"creator_id":2112625428,"folder_id":5,"label":"Random location","notes":"This is a random location in space","created":"2016-08-09T11:57:47Z"}]},"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["bookmark_id","creator_id","created","label","notes","location_id"],"properties":{"bookmark_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_bookmarks_bookmark_id","description":"bookmark_id integer"},"creator_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_bookmarks_creator_id","description":"creator_id integer"},"folder_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_bookmarks_folder_id","description":"folder_id integer"},"created":{"type":"string","format":"date-time","title":"get_corporations_corporation_id_bookmarks_created","description":"created string"},"label":{"type":"string","title":"get_corporations_corporation_id_bookmarks_label","description":"label string"},"notes":{"type":"string","title":"get_corporations_corporation_id_bookmarks_notes","description":"notes string"},"location_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_bookmarks_location_id","description":"location_id integer"},"item":{"type":"object","description":"Optional object that is returned if a bookmark was made on a particular item.","required":["item_id","type_id"],"properties":{"item_id":{"type":"integer","format":"int64","title":"get_corporations_corporation_id_bookmarks_item_id","description":"item_id integer"},"type_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_bookmarks_type_id","description":"type_id integer"}},"title":"get_corporations_corporation_id_bookmarks_item"},"coordinates":{"type":"object","description":"Optional object that is returned if a bookmark was made on a planet or a random location in space.","required":["x","y","z"],"properties":{"x":{"type":"number","format":"double","title":"get_corporations_corporation_id_bookmarks_x","description":"x number"},"y":{"type":"number","format":"double","title":"get_corporations_corporation_id_bookmarks_y","description":"y number"},"z":{"type":"number","format":"double","title":"get_corporations_corporation_id_bookmarks_z","description":"z number"}},"title":"get_corporations_corporation_id_bookmarks_coordinates"}},"title":"get_corporations_corporation_id_bookmarks_200_ok","description":"200 ok object"},"title":"get_corporations_corporation_id_bookmarks_ok","description":"200 ok array"},"headers":{"X-Pages":{"description":"Maximum page number","type":"integer","format":"int32","default":1},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-bookmarks.read_corporation_bookmarks.v1"]}],"operationId":"get_corporations_corporation_id_bookmarks","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/corporations/{corporation_id}/bookmarks/folders/":{"get":{"description":"A list of your corporation's bookmark folders\n\n---\nAlternate route: `/dev/corporations/{corporation_id}/bookmarks/folders/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/bookmarks/folders/`\n\nAlternate route: `/v1/corporations/{corporation_id}/bookmarks/folders/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"List corporation bookmark folders","tags":["Bookmarks"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/page"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"List of corporation owned bookmark folders","examples":{"application/json":[{"folder_id":5,"name":"Important Locations"}]},"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["folder_id","name"],"properties":{"folder_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_bookmarks_folders_folder_id","description":"folder_id integer"},"name":{"type":"string","title":"get_corporations_corporation_id_bookmarks_folders_name","description":"name string"},"creator_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_bookmarks_folders_creator_id","description":"creator_id integer"}},"title":"get_corporations_corporation_id_bookmarks_folders_200_ok","description":"200 ok object"},"title":"get_corporations_corporation_id_bookmarks_folders_ok","description":"200 ok array"},"headers":{"X-Pages":{"description":"Maximum page number","type":"integer","format":"int32","default":1},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-bookmarks.read_corporation_bookmarks.v1"]}],"operationId":"get_corporations_corporation_id_bookmarks_folders","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/calendar/":{"get":{"description":"Get 50 event summaries from the calendar. If no from_event ID is given, the resource will return the next 50 chronological event summaries from now. If a from_event ID is specified, it will return the next 50 chronological event summaries from after that event.\n\n---\nAlternate route: `/dev/characters/{character_id}/calendar/`\n\nAlternate route: `/legacy/characters/{character_id}/calendar/`\n\nAlternate route: `/v1/characters/{character_id}/calendar/`\n\n---\nThis route is cached for up to 5 seconds","summary":"List calendar event summaries","tags":["Calendar"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"name":"from_event","in":"query","description":"The event ID to retrieve events from","required":false,"type":"integer","format":"int32"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A collection of event summaries","examples":{"application/json":[{"event_id":1386435,"event_date":"2016-06-26T20:00:00Z","title":"o7 The EVE Online Show","importance":0,"event_response":"accepted"}]},"schema":{"type":"array","description":"Up to 50 events from now or the event you requested","maxItems":50,"items":{"description":"event","type":"object","properties":{"event_id":{"type":"integer","format":"int32","title":"get_characters_character_id_calendar_event_id","description":"event_id integer"},"event_date":{"type":"string","format":"date-time","title":"get_characters_character_id_calendar_event_date","description":"event_date string"},"title":{"type":"string","title":"get_characters_character_id_calendar_title","description":"title string"},"importance":{"type":"integer","format":"int32","title":"get_characters_character_id_calendar_importance","description":"importance integer"},"event_response":{"type":"string","enum":["declined","not_responded","accepted","tentative"],"title":"get_characters_character_id_calendar_event_response","description":"event_response string"}},"title":"get_characters_character_id_calendar_200_ok"},"title":"get_characters_character_id_calendar_ok"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-calendar.read_calendar_events.v1"]}],"operationId":"get_characters_character_id_calendar","x-cached-seconds":5,"x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/calendar/{event_id}/":{"get":{"description":"Get all the information for a specific event\n\n---\nAlternate route: `/dev/characters/{character_id}/calendar/{event_id}/`\n\nAlternate route: `/v3/characters/{character_id}/calendar/{event_id}/`\n\n---\nThis route is cached for up to 5 seconds","summary":"Get an event","tags":["Calendar"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"name":"event_id","in":"path","description":"The id of the event requested","required":true,"type":"integer","format":"int32"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Full details of a specific event","examples":{"application/json":{"event_id":1386435,"owner_id":1,"owner_name":"EVE System","date":"2016-06-26T21:00:00Z","title":"o7 The EVE Online Show","duration":60,"importance":1,"response":"Undecided","text":"o7: The EVE Online Show features latest developer news, fast paced action, community overviews and a lot more with CCP Guard and CCP Mimic. Join the thrilling o7 live broadcast at 20:00 EVE time (=UTC) on EVE TV. Don't miss it!","owner_type":"eve_server"}},"schema":{"type":"object","description":"Full details of a specific event","required":["event_id","owner_id","owner_name","date","title","duration","importance","response","text","owner_type"],"properties":{"event_id":{"type":"integer","format":"int32","title":"get_characters_character_id_calendar_event_id_event_id","description":"event_id integer"},"owner_id":{"type":"integer","format":"int32","title":"get_characters_character_id_calendar_event_id_owner_id","description":"owner_id integer"},"owner_name":{"type":"string","title":"get_characters_character_id_calendar_event_id_owner_name","description":"owner_name string"},"date":{"type":"string","format":"date-time","title":"get_characters_character_id_calendar_event_id_date","description":"date string"},"title":{"type":"string","title":"get_characters_character_id_calendar_event_id_title","description":"title string"},"duration":{"type":"integer","format":"int32","description":"Length in minutes","title":"get_characters_character_id_calendar_event_id_duration"},"importance":{"type":"integer","format":"int32","title":"get_characters_character_id_calendar_event_id_importance","description":"importance integer"},"response":{"type":"string","title":"get_characters_character_id_calendar_event_id_response","description":"response string"},"text":{"type":"string","title":"get_characters_character_id_calendar_event_id_text","description":"text string"},"owner_type":{"type":"string","enum":["eve_server","corporation","faction","character","alliance"],"title":"get_characters_character_id_calendar_event_id_owner_type","description":"owner_type string"}},"title":"get_characters_character_id_calendar_event_id_ok"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-calendar.read_calendar_events.v1"]}],"operationId":"get_characters_character_id_calendar_event_id","x-cached-seconds":5,"x-alternate-versions":["dev","v3"]},"put":{"description":"Set your response status to an event\n\n---\nAlternate route: `/dev/characters/{character_id}/calendar/{event_id}/`\n\nAlternate route: `/v3/characters/{character_id}/calendar/{event_id}/`\n","summary":"Respond to an event","tags":["Calendar"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"name":"event_id","in":"path","description":"The ID of the event requested","required":true,"type":"integer","format":"int32"},{"name":"response","in":"body","description":"The response value to set, overriding current value.","required":true,"schema":{"required":["response"],"properties":{"response":{"type":"string","enum":["accepted","declined","tentative"],"title":"put_characters_character_id_calendar_event_id_response","description":"response string"}},"title":"put_characters_character_id_calendar_event_id_response","description":"response schema"}},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"204":{"description":"Event updated"},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-calendar.respond_calendar_events.v1"]}],"operationId":"put_characters_character_id_calendar_event_id","x-alternate-versions":["dev","v3"]}},"/characters/{character_id}/calendar/{event_id}/attendees/":{"get":{"description":"Get all invited attendees for a given event\n\n---\nAlternate route: `/dev/characters/{character_id}/calendar/{event_id}/attendees/`\n\nAlternate route: `/legacy/characters/{character_id}/calendar/{event_id}/attendees/`\n\nAlternate route: `/v1/characters/{character_id}/calendar/{event_id}/attendees/`\n\n---\nThis route is cached for up to 600 seconds","summary":"Get attendees","tags":["Calendar"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"name":"event_id","in":"path","description":"The id of the event requested","required":true,"type":"integer","format":"int32"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"List of attendees","examples":{"application/json":[{"character_id":2112625428,"event_response":"accepted"},{"character_id":95465499,"event_response":"tentative"}]},"schema":{"type":"array","description":"List of attendees for a given event","maxItems":100,"items":{"type":"object","description":"character_id and response of an attendee","properties":{"character_id":{"type":"integer","format":"int32","title":"get_characters_character_id_calendar_event_id_attendees_character_id","description":"character_id integer"},"event_response":{"type":"string","enum":["declined","not_responded","accepted","tentative"],"title":"get_characters_character_id_calendar_event_id_attendees_event_response","description":"event_response string"}},"title":"get_characters_character_id_calendar_event_id_attendees_200_ok"},"title":"get_characters_character_id_calendar_event_id_attendees_ok"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-calendar.read_calendar_events.v1"]}],"operationId":"get_characters_character_id_calendar_event_id_attendees","x-cached-seconds":600,"x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/stats/":{"get":{"description":"Returns aggregate yearly stats for a character\n\n---\nAlternate route: `/legacy/characters/{character_id}/stats/`\n\nAlternate route: `/v1/characters/{character_id}/stats/`\n\n---\nThis route is cached for up to 86400 seconds\n\n---\n[This route has an available update](https://esi.tech.ccp.is/diff/latest/dev/#GET-/characters/{character_id}/stats/)","summary":"Yearly aggregate stats","tags":["Character"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Character stats","examples":{"application/json":[{"year":2014,"combat_kills_low_sec":42},{"year":2015,"combat_kills_null_sec":1337}]},"schema":{"type":"array","description":"List of character aggregate stats","maxItems":1000,"items":{"type":"object","description":"Aggregate stats for a year","required":["year"],"properties":{"year":{"type":"integer","format":"int32","description":"Gregorian year for this set of aggregates","title":"get_characters_character_id_stats_year"},"character_minutes":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_character_minutes","description":"character_minutes integer"},"character_sessions_started":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_character_sessions_started","description":"character_sessions_started integer"},"combat_cap_drainedby_npc":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_cap_drainedby_npc","description":"combat_cap_drainedby_npc integer"},"combat_cap_drainedby_pc":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_cap_drainedby_pc","description":"combat_cap_drainedby_pc integer"},"combat_cap_draining_pc":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_cap_draining_pc","description":"combat_cap_draining_pc integer"},"combat_criminal_flag_set":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_criminal_flag_set","description":"combat_criminal_flag_set integer"},"combat_damage_from_np_cs_amount":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_from_np_cs_amount","description":"combat_damage_from_np_cs_amount integer"},"combat_damage_from_np_cs_num_shots":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_from_np_cs_num_shots","description":"combat_damage_from_np_cs_num_shots integer"},"combat_damage_from_players_bomb_amount":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_from_players_bomb_amount","description":"combat_damage_from_players_bomb_amount integer"},"combat_damage_from_players_bomb_num_shots":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_from_players_bomb_num_shots","description":"combat_damage_from_players_bomb_num_shots integer"},"combat_damage_from_players_combat_drone_amount":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_from_players_combat_drone_amount","description":"combat_damage_from_players_combat_drone_amount integer"},"combat_damage_from_players_combat_drone_num_shots":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_from_players_combat_drone_num_shots","description":"combat_damage_from_players_combat_drone_num_shots integer"},"combat_damage_from_players_energy_amount":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_from_players_energy_amount","description":"combat_damage_from_players_energy_amount integer"},"combat_damage_from_players_energy_num_shots":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_from_players_energy_num_shots","description":"combat_damage_from_players_energy_num_shots integer"},"combat_damage_from_players_fighter_bomber_amount":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_from_players_fighter_bomber_amount","description":"combat_damage_from_players_fighter_bomber_amount integer"},"combat_damage_from_players_fighter_bomber_num_shots":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_from_players_fighter_bomber_num_shots","description":"combat_damage_from_players_fighter_bomber_num_shots integer"},"combat_damage_from_players_fighter_drone_amount":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_from_players_fighter_drone_amount","description":"combat_damage_from_players_fighter_drone_amount integer"},"combat_damage_from_players_fighter_drone_num_shots":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_from_players_fighter_drone_num_shots","description":"combat_damage_from_players_fighter_drone_num_shots integer"},"combat_damage_from_players_hybrid_amount":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_from_players_hybrid_amount","description":"combat_damage_from_players_hybrid_amount integer"},"combat_damage_from_players_hybrid_num_shots":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_from_players_hybrid_num_shots","description":"combat_damage_from_players_hybrid_num_shots integer"},"combat_damage_from_players_missile_amount":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_from_players_missile_amount","description":"combat_damage_from_players_missile_amount integer"},"combat_damage_from_players_missile_num_shots":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_from_players_missile_num_shots","description":"combat_damage_from_players_missile_num_shots integer"},"combat_damage_from_players_projectile_amount":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_from_players_projectile_amount","description":"combat_damage_from_players_projectile_amount integer"},"combat_damage_from_players_projectile_num_shots":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_from_players_projectile_num_shots","description":"combat_damage_from_players_projectile_num_shots integer"},"combat_damage_from_players_smart_bomb_amount":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_from_players_smart_bomb_amount","description":"combat_damage_from_players_smart_bomb_amount integer"},"combat_damage_from_players_smart_bomb_num_shots":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_from_players_smart_bomb_num_shots","description":"combat_damage_from_players_smart_bomb_num_shots integer"},"combat_damage_from_players_super_amount":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_from_players_super_amount","description":"combat_damage_from_players_super_amount integer"},"combat_damage_from_players_super_num_shots":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_from_players_super_num_shots","description":"combat_damage_from_players_super_num_shots integer"},"combat_damage_from_structures_total_amount":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_from_structures_total_amount","description":"combat_damage_from_structures_total_amount integer"},"combat_damage_from_structures_total_num_shots":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_from_structures_total_num_shots","description":"combat_damage_from_structures_total_num_shots integer"},"combat_damage_to_players_bomb_amount":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_to_players_bomb_amount","description":"combat_damage_to_players_bomb_amount integer"},"combat_damage_to_players_bomb_num_shots":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_to_players_bomb_num_shots","description":"combat_damage_to_players_bomb_num_shots integer"},"combat_damage_to_players_combat_drone_amount":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_to_players_combat_drone_amount","description":"combat_damage_to_players_combat_drone_amount integer"},"combat_damage_to_players_combat_drone_num_shots":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_to_players_combat_drone_num_shots","description":"combat_damage_to_players_combat_drone_num_shots integer"},"combat_damage_to_players_energy_amount":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_to_players_energy_amount","description":"combat_damage_to_players_energy_amount integer"},"combat_damage_to_players_energy_num_shots":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_to_players_energy_num_shots","description":"combat_damage_to_players_energy_num_shots integer"},"combat_damage_to_players_fighter_bomber_amount":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_to_players_fighter_bomber_amount","description":"combat_damage_to_players_fighter_bomber_amount integer"},"combat_damage_to_players_fighter_bomber_num_shots":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_to_players_fighter_bomber_num_shots","description":"combat_damage_to_players_fighter_bomber_num_shots integer"},"combat_damage_to_players_fighter_drone_amount":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_to_players_fighter_drone_amount","description":"combat_damage_to_players_fighter_drone_amount integer"},"combat_damage_to_players_fighter_drone_num_shots":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_to_players_fighter_drone_num_shots","description":"combat_damage_to_players_fighter_drone_num_shots integer"},"combat_damage_to_players_hybrid_amount":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_to_players_hybrid_amount","description":"combat_damage_to_players_hybrid_amount integer"},"combat_damage_to_players_hybrid_num_shots":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_to_players_hybrid_num_shots","description":"combat_damage_to_players_hybrid_num_shots integer"},"combat_damage_to_players_missile_amount":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_to_players_missile_amount","description":"combat_damage_to_players_missile_amount integer"},"combat_damage_to_players_missile_num_shots":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_to_players_missile_num_shots","description":"combat_damage_to_players_missile_num_shots integer"},"combat_damage_to_players_projectile_amount":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_to_players_projectile_amount","description":"combat_damage_to_players_projectile_amount integer"},"combat_damage_to_players_projectile_num_shots":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_to_players_projectile_num_shots","description":"combat_damage_to_players_projectile_num_shots integer"},"combat_damage_to_players_smart_bomb_amount":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_to_players_smart_bomb_amount","description":"combat_damage_to_players_smart_bomb_amount integer"},"combat_damage_to_players_smart_bomb_num_shots":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_to_players_smart_bomb_num_shots","description":"combat_damage_to_players_smart_bomb_num_shots integer"},"combat_damage_to_players_super_amount":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_to_players_super_amount","description":"combat_damage_to_players_super_amount integer"},"combat_damage_to_players_super_num_shots":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_to_players_super_num_shots","description":"combat_damage_to_players_super_num_shots integer"},"combat_damage_to_structures_total_amount":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_to_structures_total_amount","description":"combat_damage_to_structures_total_amount integer"},"combat_damage_to_structures_total_num_shots":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_damage_to_structures_total_num_shots","description":"combat_damage_to_structures_total_num_shots integer"},"combat_deaths_high_sec":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_deaths_high_sec","description":"combat_deaths_high_sec integer"},"combat_deaths_low_sec":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_deaths_low_sec","description":"combat_deaths_low_sec integer"},"combat_deaths_null_sec":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_deaths_null_sec","description":"combat_deaths_null_sec integer"},"combat_deaths_pod_high_sec":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_deaths_pod_high_sec","description":"combat_deaths_pod_high_sec integer"},"combat_deaths_pod_low_sec":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_deaths_pod_low_sec","description":"combat_deaths_pod_low_sec integer"},"combat_deaths_pod_null_sec":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_deaths_pod_null_sec","description":"combat_deaths_pod_null_sec integer"},"combat_deaths_pod_wormhole":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_deaths_pod_wormhole","description":"combat_deaths_pod_wormhole integer"},"combat_deaths_wormhole":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_deaths_wormhole","description":"combat_deaths_wormhole integer"},"combat_drone_engage":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_drone_engage","description":"combat_drone_engage integer"},"combat_duel_requested":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_duel_requested","description":"combat_duel_requested integer"},"combat_engagement_register":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_engagement_register","description":"combat_engagement_register integer"},"combat_kills_assists":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_kills_assists","description":"combat_kills_assists integer"},"combat_kills_high_sec":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_kills_high_sec","description":"combat_kills_high_sec integer"},"combat_kills_low_sec":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_kills_low_sec","description":"combat_kills_low_sec integer"},"combat_kills_null_sec":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_kills_null_sec","description":"combat_kills_null_sec integer"},"combat_kills_pod_high_sec":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_kills_pod_high_sec","description":"combat_kills_pod_high_sec integer"},"combat_kills_pod_low_sec":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_kills_pod_low_sec","description":"combat_kills_pod_low_sec integer"},"combat_kills_pod_null_sec":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_kills_pod_null_sec","description":"combat_kills_pod_null_sec integer"},"combat_kills_pod_wormhole":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_kills_pod_wormhole","description":"combat_kills_pod_wormhole integer"},"combat_kills_wormhole":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_kills_wormhole","description":"combat_kills_wormhole integer"},"combat_npc_flag_set":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_npc_flag_set","description":"combat_npc_flag_set integer"},"combat_pvp_flag_set":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_pvp_flag_set","description":"combat_pvp_flag_set integer"},"combat_repair_armor_by_remote_amount":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_repair_armor_by_remote_amount","description":"combat_repair_armor_by_remote_amount integer"},"combat_repair_armor_remote_amount":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_repair_armor_remote_amount","description":"combat_repair_armor_remote_amount integer"},"combat_repair_armor_self_amount":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_repair_armor_self_amount","description":"combat_repair_armor_self_amount integer"},"combat_repair_capacitor_by_remote_amount":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_repair_capacitor_by_remote_amount","description":"combat_repair_capacitor_by_remote_amount integer"},"combat_repair_capacitor_remote_amount":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_repair_capacitor_remote_amount","description":"combat_repair_capacitor_remote_amount integer"},"combat_repair_capacitor_self_amount":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_repair_capacitor_self_amount","description":"combat_repair_capacitor_self_amount integer"},"combat_repair_hull_by_remote_amount":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_repair_hull_by_remote_amount","description":"combat_repair_hull_by_remote_amount integer"},"combat_repair_hull_remote_amount":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_repair_hull_remote_amount","description":"combat_repair_hull_remote_amount integer"},"combat_repair_hull_self_amount":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_repair_hull_self_amount","description":"combat_repair_hull_self_amount integer"},"combat_repair_shield_by_remote_amount":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_repair_shield_by_remote_amount","description":"combat_repair_shield_by_remote_amount integer"},"combat_repair_shield_remote_amount":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_repair_shield_remote_amount","description":"combat_repair_shield_remote_amount integer"},"combat_repair_shield_self_amount":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_repair_shield_self_amount","description":"combat_repair_shield_self_amount integer"},"combat_self_destructs":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_self_destructs","description":"combat_self_destructs integer"},"combat_warp_scramble_pc":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_warp_scramble_pc","description":"combat_warp_scramble_pc integer"},"combat_warp_scrambledby_npc":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_warp_scrambledby_npc","description":"combat_warp_scrambledby_npc integer"},"combat_warp_scrambledby_pc":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_warp_scrambledby_pc","description":"combat_warp_scrambledby_pc integer"},"combat_weapon_flag_set":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_weapon_flag_set","description":"combat_weapon_flag_set integer"},"combat_webifiedby_npc":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_webifiedby_npc","description":"combat_webifiedby_npc integer"},"combat_webifiedby_pc":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_webifiedby_pc","description":"combat_webifiedby_pc integer"},"combat_webifying_pc":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_combat_webifying_pc","description":"combat_webifying_pc integer"},"days_of_activity":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_days_of_activity","description":"days_of_activity integer"},"generic_cone_scans":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_generic_cone_scans","description":"generic_cone_scans integer"},"generic_request_scans":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_generic_request_scans","description":"generic_request_scans integer"},"industry_hacking_successes":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_industry_hacking_successes","description":"industry_hacking_successes integer"},"industry_jobs_cancelled":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_industry_jobs_cancelled","description":"industry_jobs_cancelled integer"},"industry_jobs_completed_copy_blueprint":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_industry_jobs_completed_copy_blueprint","description":"industry_jobs_completed_copy_blueprint integer"},"industry_jobs_completed_invention":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_industry_jobs_completed_invention","description":"industry_jobs_completed_invention integer"},"industry_jobs_completed_manufacture":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_industry_jobs_completed_manufacture","description":"industry_jobs_completed_manufacture integer"},"industry_jobs_completed_manufacture_asteroid":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_industry_jobs_completed_manufacture_asteroid","description":"industry_jobs_completed_manufacture_asteroid integer"},"industry_jobs_completed_manufacture_asteroid_quantity":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_industry_jobs_completed_manufacture_asteroid_quantity","description":"industry_jobs_completed_manufacture_asteroid_quantity integer"},"industry_jobs_completed_manufacture_charge":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_industry_jobs_completed_manufacture_charge","description":"industry_jobs_completed_manufacture_charge integer"},"industry_jobs_completed_manufacture_charge_quantity":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_industry_jobs_completed_manufacture_charge_quantity","description":"industry_jobs_completed_manufacture_charge_quantity integer"},"industry_jobs_completed_manufacture_commodity":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_industry_jobs_completed_manufacture_commodity","description":"industry_jobs_completed_manufacture_commodity integer"},"industry_jobs_completed_manufacture_commodity_quantity":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_industry_jobs_completed_manufacture_commodity_quantity","description":"industry_jobs_completed_manufacture_commodity_quantity integer"},"industry_jobs_completed_manufacture_deployable":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_industry_jobs_completed_manufacture_deployable","description":"industry_jobs_completed_manufacture_deployable integer"},"industry_jobs_completed_manufacture_deployable_quantity":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_industry_jobs_completed_manufacture_deployable_quantity","description":"industry_jobs_completed_manufacture_deployable_quantity integer"},"industry_jobs_completed_manufacture_drone":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_industry_jobs_completed_manufacture_drone","description":"industry_jobs_completed_manufacture_drone integer"},"industry_jobs_completed_manufacture_drone_quantity":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_industry_jobs_completed_manufacture_drone_quantity","description":"industry_jobs_completed_manufacture_drone_quantity integer"},"industry_jobs_completed_manufacture_implant":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_industry_jobs_completed_manufacture_implant","description":"industry_jobs_completed_manufacture_implant integer"},"industry_jobs_completed_manufacture_implant_quantity":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_industry_jobs_completed_manufacture_implant_quantity","description":"industry_jobs_completed_manufacture_implant_quantity integer"},"industry_jobs_completed_manufacture_module":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_industry_jobs_completed_manufacture_module","description":"industry_jobs_completed_manufacture_module integer"},"industry_jobs_completed_manufacture_module_quantity":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_industry_jobs_completed_manufacture_module_quantity","description":"industry_jobs_completed_manufacture_module_quantity integer"},"industry_jobs_completed_manufacture_other":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_industry_jobs_completed_manufacture_other","description":"industry_jobs_completed_manufacture_other integer"},"industry_jobs_completed_manufacture_other_quantity":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_industry_jobs_completed_manufacture_other_quantity","description":"industry_jobs_completed_manufacture_other_quantity integer"},"industry_jobs_completed_manufacture_ship":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_industry_jobs_completed_manufacture_ship","description":"industry_jobs_completed_manufacture_ship integer"},"industry_jobs_completed_manufacture_ship_quantity":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_industry_jobs_completed_manufacture_ship_quantity","description":"industry_jobs_completed_manufacture_ship_quantity integer"},"industry_jobs_completed_manufacture_structure":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_industry_jobs_completed_manufacture_structure","description":"industry_jobs_completed_manufacture_structure integer"},"industry_jobs_completed_manufacture_structure_quantity":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_industry_jobs_completed_manufacture_structure_quantity","description":"industry_jobs_completed_manufacture_structure_quantity integer"},"industry_jobs_completed_manufacture_subsystem":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_industry_jobs_completed_manufacture_subsystem","description":"industry_jobs_completed_manufacture_subsystem integer"},"industry_jobs_completed_manufacture_subsystem_quantity":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_industry_jobs_completed_manufacture_subsystem_quantity","description":"industry_jobs_completed_manufacture_subsystem_quantity integer"},"industry_jobs_completed_material_productivity":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_industry_jobs_completed_material_productivity","description":"industry_jobs_completed_material_productivity integer"},"industry_jobs_completed_time_productivity":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_industry_jobs_completed_time_productivity","description":"industry_jobs_completed_time_productivity integer"},"industry_jobs_started_copy_blueprint":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_industry_jobs_started_copy_blueprint","description":"industry_jobs_started_copy_blueprint integer"},"industry_jobs_started_invention":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_industry_jobs_started_invention","description":"industry_jobs_started_invention integer"},"industry_jobs_started_manufacture":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_industry_jobs_started_manufacture","description":"industry_jobs_started_manufacture integer"},"industry_jobs_started_material_productivity":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_industry_jobs_started_material_productivity","description":"industry_jobs_started_material_productivity integer"},"industry_jobs_started_time_productivity":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_industry_jobs_started_time_productivity","description":"industry_jobs_started_time_productivity integer"},"industry_reprocess_item":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_industry_reprocess_item","description":"industry_reprocess_item integer"},"industry_reprocess_item_quantity":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_industry_reprocess_item_quantity","description":"industry_reprocess_item_quantity integer"},"inventory_abandon_loot_quantity":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_inventory_abandon_loot_quantity","description":"inventory_abandon_loot_quantity integer"},"inventory_trash_item_quantity":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_inventory_trash_item_quantity","description":"inventory_trash_item_quantity integer"},"isk_in":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_isk_in","description":"isk_in integer"},"isk_out":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_isk_out","description":"isk_out integer"},"market_accept_contracts_courier":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_market_accept_contracts_courier","description":"market_accept_contracts_courier integer"},"market_accept_contracts_item_exchange":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_market_accept_contracts_item_exchange","description":"market_accept_contracts_item_exchange integer"},"market_buy_orders_placed":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_market_buy_orders_placed","description":"market_buy_orders_placed integer"},"market_cancel_market_order":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_market_cancel_market_order","description":"market_cancel_market_order integer"},"market_create_contracts_auction":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_market_create_contracts_auction","description":"market_create_contracts_auction integer"},"market_create_contracts_courier":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_market_create_contracts_courier","description":"market_create_contracts_courier integer"},"market_create_contracts_item_exchange":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_market_create_contracts_item_exchange","description":"market_create_contracts_item_exchange integer"},"market_deliver_courier_contract":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_market_deliver_courier_contract","description":"market_deliver_courier_contract integer"},"market_isk_gained":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_market_isk_gained","description":"market_isk_gained integer"},"market_isk_spent":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_market_isk_spent","description":"market_isk_spent integer"},"market_modify_market_order":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_market_modify_market_order","description":"market_modify_market_order integer"},"market_search_contracts":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_market_search_contracts","description":"market_search_contracts integer"},"market_sell_orders_placed":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_market_sell_orders_placed","description":"market_sell_orders_placed integer"},"mining_drone_mine":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_mining_drone_mine","description":"mining_drone_mine integer"},"mining_ore_arkonor":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_mining_ore_arkonor","description":"mining_ore_arkonor integer"},"mining_ore_bistot":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_mining_ore_bistot","description":"mining_ore_bistot integer"},"mining_ore_crokite":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_mining_ore_crokite","description":"mining_ore_crokite integer"},"mining_ore_dark_ochre":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_mining_ore_dark_ochre","description":"mining_ore_dark_ochre integer"},"mining_ore_gneiss":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_mining_ore_gneiss","description":"mining_ore_gneiss integer"},"mining_ore_harvestable_cloud":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_mining_ore_harvestable_cloud","description":"mining_ore_harvestable_cloud integer"},"mining_ore_hedbergite":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_mining_ore_hedbergite","description":"mining_ore_hedbergite integer"},"mining_ore_hemorphite":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_mining_ore_hemorphite","description":"mining_ore_hemorphite integer"},"mining_ore_ice":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_mining_ore_ice","description":"mining_ore_ice integer"},"mining_ore_jaspet":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_mining_ore_jaspet","description":"mining_ore_jaspet integer"},"mining_ore_kernite":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_mining_ore_kernite","description":"mining_ore_kernite integer"},"mining_ore_mercoxit":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_mining_ore_mercoxit","description":"mining_ore_mercoxit integer"},"mining_ore_omber":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_mining_ore_omber","description":"mining_ore_omber integer"},"mining_ore_plagioclase":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_mining_ore_plagioclase","description":"mining_ore_plagioclase integer"},"mining_ore_pyroxeres":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_mining_ore_pyroxeres","description":"mining_ore_pyroxeres integer"},"mining_ore_scordite":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_mining_ore_scordite","description":"mining_ore_scordite integer"},"mining_ore_spodumain":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_mining_ore_spodumain","description":"mining_ore_spodumain integer"},"mining_ore_veldspar":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_mining_ore_veldspar","description":"mining_ore_veldspar integer"},"module_activations_armor_hardener":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_armor_hardener","description":"module_activations_armor_hardener integer"},"module_activations_armor_repair_unit":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_armor_repair_unit","description":"module_activations_armor_repair_unit integer"},"module_activations_armor_resistance_shift_hardener":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_armor_resistance_shift_hardener","description":"module_activations_armor_resistance_shift_hardener integer"},"module_activations_automated_targeting_system":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_automated_targeting_system","description":"module_activations_automated_targeting_system integer"},"module_activations_bastion":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_bastion","description":"module_activations_bastion integer"},"module_activations_bomb_launcher":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_bomb_launcher","description":"module_activations_bomb_launcher integer"},"module_activations_capacitor_booster":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_capacitor_booster","description":"module_activations_capacitor_booster integer"},"module_activations_cargo_scanner":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_cargo_scanner","description":"module_activations_cargo_scanner integer"},"module_activations_cloaking_device":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_cloaking_device","description":"module_activations_cloaking_device integer"},"module_activations_clone_vat_bay":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_clone_vat_bay","description":"module_activations_clone_vat_bay integer"},"module_activations_cynosural_field":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_cynosural_field","description":"module_activations_cynosural_field integer"},"module_activations_damage_control":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_damage_control","description":"module_activations_damage_control integer"},"module_activations_data_miners":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_data_miners","description":"module_activations_data_miners integer"},"module_activations_drone_control_unit":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_drone_control_unit","description":"module_activations_drone_control_unit integer"},"module_activations_drone_tracking_modules":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_drone_tracking_modules","description":"module_activations_drone_tracking_modules integer"},"module_activations_eccm":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_eccm","description":"module_activations_eccm integer"},"module_activations_ecm":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_ecm","description":"module_activations_ecm integer"},"module_activations_ecm_burst":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_ecm_burst","description":"module_activations_ecm_burst integer"},"module_activations_energy_destabilizer":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_energy_destabilizer","description":"module_activations_energy_destabilizer integer"},"module_activations_energy_vampire":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_energy_vampire","description":"module_activations_energy_vampire integer"},"module_activations_energy_weapon":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_energy_weapon","description":"module_activations_energy_weapon integer"},"module_activations_festival_launcher":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_festival_launcher","description":"module_activations_festival_launcher integer"},"module_activations_frequency_mining_laser":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_frequency_mining_laser","description":"module_activations_frequency_mining_laser integer"},"module_activations_fueled_armor_repairer":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_fueled_armor_repairer","description":"module_activations_fueled_armor_repairer integer"},"module_activations_fueled_shield_booster":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_fueled_shield_booster","description":"module_activations_fueled_shield_booster integer"},"module_activations_gang_coordinator":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_gang_coordinator","description":"module_activations_gang_coordinator integer"},"module_activations_gas_cloud_harvester":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_gas_cloud_harvester","description":"module_activations_gas_cloud_harvester integer"},"module_activations_hull_repair_unit":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_hull_repair_unit","description":"module_activations_hull_repair_unit integer"},"module_activations_hybrid_weapon":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_hybrid_weapon","description":"module_activations_hybrid_weapon integer"},"module_activations_industrial_core":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_industrial_core","description":"module_activations_industrial_core integer"},"module_activations_interdiction_sphere_launcher":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_interdiction_sphere_launcher","description":"module_activations_interdiction_sphere_launcher integer"},"module_activations_micro_jump_drive":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_micro_jump_drive","description":"module_activations_micro_jump_drive integer"},"module_activations_mining_laser":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_mining_laser","description":"module_activations_mining_laser integer"},"module_activations_missile_launcher":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_missile_launcher","description":"module_activations_missile_launcher integer"},"module_activations_passive_targeting_system":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_passive_targeting_system","description":"module_activations_passive_targeting_system integer"},"module_activations_probe_launcher":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_probe_launcher","description":"module_activations_probe_launcher integer"},"module_activations_projected_eccm":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_projected_eccm","description":"module_activations_projected_eccm integer"},"module_activations_projectile_weapon":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_projectile_weapon","description":"module_activations_projectile_weapon integer"},"module_activations_propulsion_module":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_propulsion_module","description":"module_activations_propulsion_module integer"},"module_activations_remote_armor_repairer":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_remote_armor_repairer","description":"module_activations_remote_armor_repairer integer"},"module_activations_remote_capacitor_transmitter":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_remote_capacitor_transmitter","description":"module_activations_remote_capacitor_transmitter integer"},"module_activations_remote_ecm_burst":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_remote_ecm_burst","description":"module_activations_remote_ecm_burst integer"},"module_activations_remote_hull_repairer":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_remote_hull_repairer","description":"module_activations_remote_hull_repairer integer"},"module_activations_remote_sensor_booster":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_remote_sensor_booster","description":"module_activations_remote_sensor_booster integer"},"module_activations_remote_sensor_damper":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_remote_sensor_damper","description":"module_activations_remote_sensor_damper integer"},"module_activations_remote_shield_booster":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_remote_shield_booster","description":"module_activations_remote_shield_booster integer"},"module_activations_remote_tracking_computer":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_remote_tracking_computer","description":"module_activations_remote_tracking_computer integer"},"module_activations_salvager":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_salvager","description":"module_activations_salvager integer"},"module_activations_sensor_booster":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_sensor_booster","description":"module_activations_sensor_booster integer"},"module_activations_shield_booster":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_shield_booster","description":"module_activations_shield_booster integer"},"module_activations_shield_hardener":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_shield_hardener","description":"module_activations_shield_hardener integer"},"module_activations_ship_scanner":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_ship_scanner","description":"module_activations_ship_scanner integer"},"module_activations_siege":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_siege","description":"module_activations_siege integer"},"module_activations_smart_bomb":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_smart_bomb","description":"module_activations_smart_bomb integer"},"module_activations_stasis_web":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_stasis_web","description":"module_activations_stasis_web integer"},"module_activations_strip_miner":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_strip_miner","description":"module_activations_strip_miner integer"},"module_activations_super_weapon":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_super_weapon","description":"module_activations_super_weapon integer"},"module_activations_survey_scanner":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_survey_scanner","description":"module_activations_survey_scanner integer"},"module_activations_target_breaker":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_target_breaker","description":"module_activations_target_breaker integer"},"module_activations_target_painter":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_target_painter","description":"module_activations_target_painter integer"},"module_activations_tracking_computer":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_tracking_computer","description":"module_activations_tracking_computer integer"},"module_activations_tracking_disruptor":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_tracking_disruptor","description":"module_activations_tracking_disruptor integer"},"module_activations_tractor_beam":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_tractor_beam","description":"module_activations_tractor_beam integer"},"module_activations_triage":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_triage","description":"module_activations_triage integer"},"module_activations_warp_disrupt_field_generator":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_warp_disrupt_field_generator","description":"module_activations_warp_disrupt_field_generator integer"},"module_activations_warp_scrambler":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_activations_warp_scrambler","description":"module_activations_warp_scrambler integer"},"module_link_weapons":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_link_weapons","description":"module_link_weapons integer"},"module_overload":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_overload","description":"module_overload integer"},"module_repairs":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_module_repairs","description":"module_repairs integer"},"orbital_strike_characters_killed":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_orbital_strike_characters_killed","description":"orbital_strike_characters_killed integer"},"orbital_strike_damage_to_players_armor_amount":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_orbital_strike_damage_to_players_armor_amount","description":"orbital_strike_damage_to_players_armor_amount integer"},"orbital_strike_damage_to_players_shield_amount":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_orbital_strike_damage_to_players_shield_amount","description":"orbital_strike_damage_to_players_shield_amount integer"},"pve_dungeons_completed_agent":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_pve_dungeons_completed_agent","description":"pve_dungeons_completed_agent integer"},"pve_dungeons_completed_distribution":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_pve_dungeons_completed_distribution","description":"pve_dungeons_completed_distribution integer"},"pve_missions_succeeded":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_pve_missions_succeeded","description":"pve_missions_succeeded integer"},"pve_missions_succeeded_epic_arc":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_pve_missions_succeeded_epic_arc","description":"pve_missions_succeeded_epic_arc integer"},"social_add_contact_bad":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_social_add_contact_bad","description":"social_add_contact_bad integer"},"social_add_contact_good":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_social_add_contact_good","description":"social_add_contact_good integer"},"social_add_contact_high":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_social_add_contact_high","description":"social_add_contact_high integer"},"social_add_contact_horrible":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_social_add_contact_horrible","description":"social_add_contact_horrible integer"},"social_add_contact_neutral":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_social_add_contact_neutral","description":"social_add_contact_neutral integer"},"social_add_note":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_social_add_note","description":"social_add_note integer"},"social_added_as_contact_bad":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_social_added_as_contact_bad","description":"social_added_as_contact_bad integer"},"social_added_as_contact_good":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_social_added_as_contact_good","description":"social_added_as_contact_good integer"},"social_added_as_contact_high":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_social_added_as_contact_high","description":"social_added_as_contact_high integer"},"social_added_as_contact_horrible":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_social_added_as_contact_horrible","description":"social_added_as_contact_horrible integer"},"social_added_as_contact_neutral":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_social_added_as_contact_neutral","description":"social_added_as_contact_neutral integer"},"social_calendar_event_created":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_social_calendar_event_created","description":"social_calendar_event_created integer"},"social_chat_messages_alliance":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_social_chat_messages_alliance","description":"social_chat_messages_alliance integer"},"social_chat_messages_constellation":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_social_chat_messages_constellation","description":"social_chat_messages_constellation integer"},"social_chat_messages_corporation":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_social_chat_messages_corporation","description":"social_chat_messages_corporation integer"},"social_chat_messages_fleet":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_social_chat_messages_fleet","description":"social_chat_messages_fleet integer"},"social_chat_messages_region":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_social_chat_messages_region","description":"social_chat_messages_region integer"},"social_chat_messages_solarsystem":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_social_chat_messages_solarsystem","description":"social_chat_messages_solarsystem integer"},"social_chat_messages_warfaction":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_social_chat_messages_warfaction","description":"social_chat_messages_warfaction integer"},"social_chat_total_message_length":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_social_chat_total_message_length","description":"social_chat_total_message_length integer"},"social_direct_trades":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_social_direct_trades","description":"social_direct_trades integer"},"social_fleet_broadcasts":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_social_fleet_broadcasts","description":"social_fleet_broadcasts integer"},"social_fleet_joins":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_social_fleet_joins","description":"social_fleet_joins integer"},"social_mails_received":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_social_mails_received","description":"social_mails_received integer"},"social_mails_sent":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_social_mails_sent","description":"social_mails_sent integer"},"travel_acceleration_gate_activations":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_travel_acceleration_gate_activations","description":"travel_acceleration_gate_activations integer"},"travel_align_to":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_travel_align_to","description":"travel_align_to integer"},"travel_distance_warped_high_sec":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_travel_distance_warped_high_sec","description":"travel_distance_warped_high_sec integer"},"travel_distance_warped_low_sec":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_travel_distance_warped_low_sec","description":"travel_distance_warped_low_sec integer"},"travel_distance_warped_null_sec":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_travel_distance_warped_null_sec","description":"travel_distance_warped_null_sec integer"},"travel_distance_warped_wormhole":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_travel_distance_warped_wormhole","description":"travel_distance_warped_wormhole integer"},"travel_docks_high_sec":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_travel_docks_high_sec","description":"travel_docks_high_sec integer"},"travel_docks_low_sec":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_travel_docks_low_sec","description":"travel_docks_low_sec integer"},"travel_docks_null_sec":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_travel_docks_null_sec","description":"travel_docks_null_sec integer"},"travel_jumps_stargate_high_sec":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_travel_jumps_stargate_high_sec","description":"travel_jumps_stargate_high_sec integer"},"travel_jumps_stargate_low_sec":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_travel_jumps_stargate_low_sec","description":"travel_jumps_stargate_low_sec integer"},"travel_jumps_stargate_null_sec":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_travel_jumps_stargate_null_sec","description":"travel_jumps_stargate_null_sec integer"},"travel_jumps_wormhole":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_travel_jumps_wormhole","description":"travel_jumps_wormhole integer"},"travel_warps_high_sec":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_travel_warps_high_sec","description":"travel_warps_high_sec integer"},"travel_warps_low_sec":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_travel_warps_low_sec","description":"travel_warps_low_sec integer"},"travel_warps_null_sec":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_travel_warps_null_sec","description":"travel_warps_null_sec integer"},"travel_warps_to_bookmark":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_travel_warps_to_bookmark","description":"travel_warps_to_bookmark integer"},"travel_warps_to_celestial":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_travel_warps_to_celestial","description":"travel_warps_to_celestial integer"},"travel_warps_to_fleet_member":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_travel_warps_to_fleet_member","description":"travel_warps_to_fleet_member integer"},"travel_warps_to_scan_result":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_travel_warps_to_scan_result","description":"travel_warps_to_scan_result integer"},"travel_warps_wormhole":{"type":"integer","format":"int64","title":"get_characters_character_id_stats_travel_warps_wormhole","description":"travel_warps_wormhole integer"}},"title":"get_characters_character_id_stats_200_ok"},"title":"get_characters_character_id_stats_ok"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-characterstats.read.v1"]}],"operationId":"get_characters_character_id_stats","x-cached-seconds":86400,"x-alternate-versions":["legacy","v1"]}},"/characters/{character_id}/":{"get":{"description":"Public information about a character\n\n---\nAlternate route: `/dev/characters/{character_id}/`\n\nAlternate route: `/v4/characters/{character_id}/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"Get character's public information","tags":["Character"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Public data for the given character","examples":{"application/json":{"corporation_id":109299958,"birthday":"2015-03-24T11:37:00Z","name":"CCP Bartender","gender":"male","race_id":2,"description":"","bloodline_id":3,"ancestry_id":19}},"schema":{"type":"object","required":["corporation_id","birthday","name","gender","race_id","bloodline_id"],"properties":{"name":{"type":"string","title":"get_characters_character_id_name","description":"name string"},"description":{"type":"string","title":"get_characters_character_id_description","description":"description string"},"corporation_id":{"type":"integer","format":"int32","description":"The character's corporation ID","title":"get_characters_character_id_corporation_id"},"alliance_id":{"type":"integer","format":"int32","description":"The character's alliance ID","title":"get_characters_character_id_alliance_id"},"birthday":{"type":"string","format":"date-time","description":"Creation date of the character","title":"get_characters_character_id_birthday"},"gender":{"type":"string","enum":["female","male"],"title":"get_characters_character_id_gender","description":"gender string"},"race_id":{"type":"integer","format":"int32","title":"get_characters_character_id_race_id","description":"race_id integer"},"bloodline_id":{"type":"integer","format":"int32","title":"get_characters_character_id_bloodline_id","description":"bloodline_id integer"},"ancestry_id":{"type":"integer","format":"int32","title":"get_characters_character_id_ancestry_id","description":"ancestry_id integer"},"security_status":{"type":"number","format":"float","minimum":-10,"maximum":10,"title":"get_characters_character_id_security_status","description":"security_status number"},"faction_id":{"type":"integer","format":"int32","description":"ID of the faction the character is fighting for, if the character is enlisted in Factional Warfare","title":"get_characters_character_id_faction_id"}},"title":"get_characters_character_id_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"404":{"description":"Character not found","schema":{"type":"object","title":"get_characters_character_id_not_found","description":"Not found","properties":{"error":{"type":"string","description":"Not found message","title":"get_characters_character_id_404_not_found"}}},"examples":{"application/json":{"error":"Not found message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_characters_character_id","x-cached-seconds":3600,"x-alternate-versions":["dev","v4"]}},"/characters/affiliation/":{"post":{"description":"Bulk lookup of character IDs to corporation, alliance and faction\n\n---\nAlternate route: `/dev/characters/affiliation/`\n\nAlternate route: `/legacy/characters/affiliation/`\n\nAlternate route: `/v1/characters/affiliation/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"Character affiliation","tags":["Character"],"parameters":[{"name":"characters","in":"body","description":"The character IDs to fetch affiliations for. All characters must exist, or none will be returned.","required":true,"schema":{"type":"array","minItems":1,"maxItems":1000,"uniqueItems":true,"items":{"type":"integer","format":"int32","title":"post_characters_affiliation_character","description":"character integer"},"title":"post_characters_affiliation_characters","description":"characters array"}},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Character corporation, alliance and faction IDs","examples":{"application/json":[{"character_id":95538921,"corporation_id":109299958,"alliance_id":434243723}]},"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["character_id","corporation_id"],"properties":{"character_id":{"type":"integer","format":"int32","description":"The character's ID","title":"post_characters_affiliation_character_id"},"corporation_id":{"type":"integer","format":"int32","description":"The character's corporation ID","title":"post_characters_affiliation_corporation_id"},"alliance_id":{"type":"integer","format":"int32","description":"The character's alliance ID, if their corporation is in an alliance","title":"post_characters_affiliation_alliance_id"},"faction_id":{"type":"integer","format":"int32","description":"The character's faction ID, if their corporation is in a faction","title":"post_characters_affiliation_faction_id"}},"title":"post_characters_affiliation_200_ok","description":"200 ok object"},"title":"post_characters_affiliation_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"404":{"description":"No characters found!","schema":{"type":"object","title":"post_characters_affiliation_not_found","description":"Not found","properties":{"error":{"type":"string","description":"Not found message","title":"post_characters_affiliation_404_not_found"}}},"examples":{"application/json":{"error":"Not found message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"post_characters_affiliation","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/cspa/":{"post":{"description":"Takes a source character ID in the url and a set of target character ID's in the body, returns a CSPA charge cost\n\n---\nAlternate route: `/legacy/characters/{character_id}/cspa/`\n\nAlternate route: `/v3/characters/{character_id}/cspa/`\n\n\n---\n[This route has an available update](https://esi.tech.ccp.is/diff/latest/dev/#POST-/characters/{character_id}/cspa/)","summary":"Calculate a CSPA charge cost","tags":["Character"],"parameters":[{"$ref":"#/parameters/character_id"},{"name":"characters","in":"body","description":"The target characters to calculate the charge for","required":true,"schema":{"type":"object","required":["characters"],"properties":{"characters":{"type":"array","minItems":1,"uniqueItems":true,"maxItems":100,"items":{"type":"integer","format":"int32","title":"post_characters_character_id_cspa_character","description":"character integer"},"title":"post_characters_character_id_cspa_characters","description":"characters array"}},"title":"post_characters_character_id_cspa_characters","description":"characters object"}},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"201":{"description":"Aggregate cost of sending a mail from the source character to the target characters, in ISK hundredths","examples":{"application/json":{"cost":295000}},"schema":{"type":"object","properties":{"cost":{"type":"integer","format":"int64","title":"post_characters_character_id_cspa_cost","description":"cost integer"}},"title":"post_characters_character_id_cspa_created","description":"201 created object"}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-characters.read_contacts.v1"]}],"operationId":"post_characters_character_id_cspa","x-alternate-versions":["legacy","v3"]}},"/characters/names/":{"get":{"description":"Resolve a set of character IDs to character names\n\n---\nAlternate route: `/dev/characters/names/`\n\nAlternate route: `/legacy/characters/names/`\n\nAlternate route: `/v1/characters/names/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"Get character names","tags":["Character"],"parameters":[{"name":"character_ids","in":"query","description":"A comma separated list of character IDs","required":true,"type":"array","maxItems":1000,"minItems":1,"items":{"type":"integer","format":"int64"}},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"List of id/name associations","examples":{"application/json":[{"character_id":95465499,"character_name":"CCP Bartender"}]},"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["character_id","character_name"],"properties":{"character_id":{"type":"integer","format":"int64","title":"get_characters_names_character_id","description":"character_id integer"},"character_name":{"type":"string","title":"get_characters_names_character_name","description":"character_name string"}},"title":"get_characters_names_200_ok","description":"200 ok object"},"title":"get_characters_names_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_characters_names","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/portrait/":{"get":{"description":"Get portrait urls for a character\n\n---\nAlternate route: `/dev/characters/{character_id}/portrait/`\n\nAlternate route: `/v2/characters/{character_id}/portrait/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"Get character portraits","tags":["Character"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Public data for the given character","examples":{"application/json":{"px64x64":"https://imageserver.eveonline.com/Character/95465499_64.jpg","px128x128":"https://imageserver.eveonline.com/Character/95465499_128.jpg","px256x256":"https://imageserver.eveonline.com/Character/95465499_256.jpg","px512x512":"https://imageserver.eveonline.com/Character/95465499_512.jpg"}},"schema":{"type":"object","properties":{"px64x64":{"type":"string","title":"get_characters_character_id_portrait_px64x64","description":"px64x64 string"},"px128x128":{"type":"string","title":"get_characters_character_id_portrait_px128x128","description":"px128x128 string"},"px256x256":{"type":"string","title":"get_characters_character_id_portrait_px256x256","description":"px256x256 string"},"px512x512":{"type":"string","title":"get_characters_character_id_portrait_px512x512","description":"px512x512 string"}},"title":"get_characters_character_id_portrait_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"404":{"description":"No image server for this datasource","examples":{"application/json":{"error":"No image server for this datasource"}},"schema":{"type":"object","description":"No image server for this datasource","properties":{"error":{"type":"string","description":"error message","title":"get_characters_character_id_portrait_error"}},"title":"get_characters_character_id_portrait_not_found"}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_characters_character_id_portrait","x-cached-seconds":3600,"x-alternate-versions":["dev","v2"]}},"/characters/{character_id}/corporationhistory/":{"get":{"description":"Get a list of all the corporations a character has been a member of\n\n---\nAlternate route: `/dev/characters/{character_id}/corporationhistory/`\n\nAlternate route: `/legacy/characters/{character_id}/corporationhistory/`\n\nAlternate route: `/v1/characters/{character_id}/corporationhistory/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"Get corporation history","tags":["Character"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Corporation history for the given character","examples":{"application/json":[{"start_date":"2016-06-26T20:00:00Z","corporation_id":90000001,"is_deleted":true,"record_id":500},{"start_date":"2016-07-26T20:00:00Z","corporation_id":90000002,"record_id":501}]},"schema":{"type":"array","maxItems":10000,"items":{"type":"object","required":["start_date","corporation_id","record_id"],"properties":{"start_date":{"type":"string","format":"date-time","title":"get_characters_character_id_corporationhistory_start_date","description":"start_date string"},"corporation_id":{"type":"integer","format":"int32","title":"get_characters_character_id_corporationhistory_corporation_id","description":"corporation_id integer"},"is_deleted":{"type":"boolean","description":"True if the corporation has been deleted","title":"get_characters_character_id_corporationhistory_is_deleted"},"record_id":{"type":"integer","format":"int32","description":"An incrementing ID that can be used to canonically establish order of records in cases where dates may be ambiguous","title":"get_characters_character_id_corporationhistory_record_id"}},"title":"get_characters_character_id_corporationhistory_200_ok","description":"200 ok object"},"title":"get_characters_character_id_corporationhistory_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_characters_character_id_corporationhistory","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/chat_channels/":{"get":{"description":"Return chat channels that a character is the owner or operator of\n\n---\nAlternate route: `/dev/characters/{character_id}/chat_channels/`\n\nAlternate route: `/legacy/characters/{character_id}/chat_channels/`\n\nAlternate route: `/v1/characters/{character_id}/chat_channels/`\n\n---\nThis route is cached for up to 300 seconds","summary":"Get chat channels","tags":["Character"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of chat channels","examples":{"application/json":[{"channel_id":-69329950,"name":"Players' Haven","owner_id":95578451,"comparison_key":"players'haven","has_password":false,"motd":"Feed pineapples to the cats!","allowed":[],"operators":[],"blocked":[],"muted":[]}]},"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["channel_id","name","owner_id","comparison_key","has_password","motd","allowed","operators","blocked","muted"],"properties":{"channel_id":{"type":"integer","format":"int32","description":"Unique channel ID. Always negative for player-created channels. Permanent (CCP created) channels have a positive ID, but don't appear in the API","title":"get_characters_character_id_chat_channels_channel_id"},"name":{"type":"string","description":"Displayed name of channel","title":"get_characters_character_id_chat_channels_name"},"owner_id":{"type":"integer","format":"int32","title":"get_characters_character_id_chat_channels_owner_id","description":"owner_id integer"},"comparison_key":{"type":"string","description":"Normalized, unique string used to compare channel names","title":"get_characters_character_id_chat_channels_comparison_key"},"has_password":{"type":"boolean","description":"If this is a password protected channel","title":"get_characters_character_id_chat_channels_has_password"},"motd":{"type":"string","description":"Message of the day for this channel","title":"get_characters_character_id_chat_channels_motd"},"allowed":{"type":"array","maxItems":1000,"items":{"type":"object","required":["accessor_id","accessor_type"],"properties":{"accessor_id":{"type":"integer","format":"int32","description":"ID of an allowed channel member","title":"get_characters_character_id_chat_channels_accessor_id"},"accessor_type":{"type":"string","enum":["character","corporation","alliance"],"title":"get_characters_character_id_chat_channels_accessor_type","description":"accessor_type string"}},"title":"get_characters_character_id_chat_channels_allowed","description":"allowed object"},"title":"get_characters_character_id_chat_channels_allowed","description":"allowed array"},"operators":{"type":"array","maxItems":1000,"items":{"type":"object","required":["accessor_id","accessor_type"],"properties":{"accessor_id":{"type":"integer","format":"int32","description":"ID of a channel operator","title":"get_characters_character_id_chat_channels_accessor_id"},"accessor_type":{"type":"string","enum":["character","corporation","alliance"],"title":"get_characters_character_id_chat_channels_accessor_type","description":"accessor_type string"}},"title":"get_characters_character_id_chat_channels_operator","description":"operator object"},"title":"get_characters_character_id_chat_channels_operators","description":"operators array"},"blocked":{"type":"array","maxItems":1000,"items":{"type":"object","required":["accessor_id","accessor_type"],"properties":{"accessor_id":{"type":"integer","format":"int32","description":"ID of a blocked channel member","title":"get_characters_character_id_chat_channels_accessor_id"},"accessor_type":{"type":"string","enum":["character","corporation","alliance"],"title":"get_characters_character_id_chat_channels_accessor_type","description":"accessor_type string"},"reason":{"type":"string","description":"Reason this accessor is blocked","title":"get_characters_character_id_chat_channels_reason"},"end_at":{"type":"string","format":"date-time","description":"Time at which this accessor will no longer be blocked","title":"get_characters_character_id_chat_channels_end_at"}},"title":"get_characters_character_id_chat_channels_blocked","description":"blocked object"},"title":"get_characters_character_id_chat_channels_blocked","description":"blocked array"},"muted":{"type":"array","maxItems":1000,"items":{"type":"object","required":["accessor_id","accessor_type"],"properties":{"accessor_id":{"type":"integer","format":"int32","description":"ID of a muted channel member","title":"get_characters_character_id_chat_channels_accessor_id"},"accessor_type":{"type":"string","enum":["character","corporation","alliance"],"title":"get_characters_character_id_chat_channels_accessor_type","description":"accessor_type string"},"reason":{"type":"string","description":"Reason this accessor is muted","title":"get_characters_character_id_chat_channels_reason"},"end_at":{"type":"string","format":"date-time","description":"Time at which this accessor will no longer be muted","title":"get_characters_character_id_chat_channels_end_at"}},"title":"get_characters_character_id_chat_channels_muted","description":"muted object"},"title":"get_characters_character_id_chat_channels_muted","description":"muted array"}},"title":"get_characters_character_id_chat_channels_200_ok","description":"200 ok object"},"title":"get_characters_character_id_chat_channels_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-characters.read_chat_channels.v1"]}],"operationId":"get_characters_character_id_chat_channels","x-cached-seconds":300,"x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/medals/":{"get":{"description":"Return a list of medals the character has\n\n---\nAlternate route: `/dev/characters/{character_id}/medals/`\n\nAlternate route: `/legacy/characters/{character_id}/medals/`\n\nAlternate route: `/v1/characters/{character_id}/medals/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"Get medals","tags":["Character"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of medals","examples":{"application/json":[{"medal_id":3,"title":"33 tester medal","description":"For 33 corp!","corporation_id":98000001,"issuer_id":2112000002,"date":"2017-03-16T15:01:45Z","reason":"Thanks!","status":"private","graphics":[{"part":1,"layer":0,"graphic":"gallente.1_1","color":-1}]}]},"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["medal_id","title","description","corporation_id","issuer_id","date","reason","status","graphics"],"properties":{"medal_id":{"type":"integer","format":"int32","title":"get_characters_character_id_medals_medal_id","description":"medal_id integer"},"title":{"type":"string","title":"get_characters_character_id_medals_title","description":"title string"},"description":{"type":"string","title":"get_characters_character_id_medals_description","description":"description string"},"corporation_id":{"type":"integer","format":"int32","title":"get_characters_character_id_medals_corporation_id","description":"corporation_id integer"},"issuer_id":{"type":"integer","format":"int32","title":"get_characters_character_id_medals_issuer_id","description":"issuer_id integer"},"date":{"type":"string","format":"date-time","title":"get_characters_character_id_medals_date","description":"date string"},"reason":{"type":"string","title":"get_characters_character_id_medals_reason","description":"reason string"},"status":{"type":"string","enum":["public","private"],"title":"get_characters_character_id_medals_status","description":"status string"},"graphics":{"type":"array","maxItems":10,"items":{"type":"object","required":["part","layer","graphic"],"properties":{"part":{"type":"integer","format":"int32","title":"get_characters_character_id_medals_part","description":"part integer"},"layer":{"type":"integer","format":"int32","title":"get_characters_character_id_medals_layer","description":"layer integer"},"graphic":{"type":"string","title":"get_characters_character_id_medals_graphic","description":"graphic string"},"color":{"type":"integer","format":"int32","title":"get_characters_character_id_medals_color","description":"color integer"}},"title":"get_characters_character_id_medals_graphic","description":"graphic object"},"title":"get_characters_character_id_medals_graphics","description":"graphics array"}},"title":"get_characters_character_id_medals_200_ok","description":"200 ok object"},"title":"get_characters_character_id_medals_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-characters.read_medals.v1"]}],"operationId":"get_characters_character_id_medals","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/standings/":{"get":{"description":"Return character standings from agents, NPC corporations, and factions\n\n---\nAlternate route: `/dev/characters/{character_id}/standings/`\n\nAlternate route: `/legacy/characters/{character_id}/standings/`\n\nAlternate route: `/v1/characters/{character_id}/standings/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"Get standings","tags":["Character"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of standings","examples":{"application/json":[{"from_id":3009841,"from_type":"agent","standing":0.1},{"from_id":1000061,"from_type":"npc_corp","standing":0},{"from_id":500003,"from_type":"faction","standing":-1}]},"schema":{"type":"array","maxItems":10000,"items":{"type":"object","required":["from_id","from_type","standing"],"properties":{"from_id":{"type":"integer","format":"int32","title":"get_characters_character_id_standings_from_id","description":"from_id integer"},"from_type":{"type":"string","enum":["agent","npc_corp","faction"],"title":"get_characters_character_id_standings_from_type","description":"from_type string"},"standing":{"type":"number","format":"float","minimum":-10,"maximum":10,"title":"get_characters_character_id_standings_standing","description":"standing number"}},"title":"get_characters_character_id_standings_200_ok","description":"200 ok object"},"title":"get_characters_character_id_standings_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-characters.read_standings.v1"]}],"operationId":"get_characters_character_id_standings","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/agents_research/":{"get":{"description":"Return a list of agents research information for a character. The formula for finding the current research points with an agent is: currentPoints = remainderPoints + pointsPerDay * days(currentTime - researchStartDate)\n\n---\nAlternate route: `/dev/characters/{character_id}/agents_research/`\n\nAlternate route: `/legacy/characters/{character_id}/agents_research/`\n\nAlternate route: `/v1/characters/{character_id}/agents_research/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"Get agents research","tags":["Character"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of agents research information","examples":{"application/json":[{"agent_id":3009358,"skill_type_id":11450,"started_at":"2017-03-23T14:47:00Z","points_per_day":53.5346162146776,"remainder_points":53604.0634303189}]},"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["agent_id","skill_type_id","started_at","points_per_day","remainder_points"],"properties":{"agent_id":{"type":"integer","format":"int32","title":"get_characters_character_id_agents_research_agent_id","description":"agent_id integer"},"skill_type_id":{"type":"integer","format":"int32","title":"get_characters_character_id_agents_research_skill_type_id","description":"skill_type_id integer"},"started_at":{"type":"string","format":"date-time","title":"get_characters_character_id_agents_research_started_at","description":"started_at string"},"points_per_day":{"type":"number","format":"float","title":"get_characters_character_id_agents_research_points_per_day","description":"points_per_day number"},"remainder_points":{"type":"number","format":"float","title":"get_characters_character_id_agents_research_remainder_points","description":"remainder_points number"}},"title":"get_characters_character_id_agents_research_200_ok","description":"200 ok object"},"title":"get_characters_character_id_agents_research_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-characters.read_agents_research.v1"]}],"operationId":"get_characters_character_id_agents_research","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/blueprints/":{"get":{"description":"Return a list of blueprints the character owns\n\n---\nAlternate route: `/dev/characters/{character_id}/blueprints/`\n\nAlternate route: `/v2/characters/{character_id}/blueprints/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"Get blueprints","tags":["Character"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/page"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of blueprints","examples":{"application/json":[{"item_id":1000000010495,"type_id":691,"location_id":60014719,"location_flag":"Hangar","quantity":1,"time_efficiency":0,"material_efficiency":0,"runs":-1}]},"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["item_id","type_id","location_id","location_flag","quantity","time_efficiency","material_efficiency","runs"],"properties":{"item_id":{"type":"integer","format":"int64","description":"Unique ID for this item.","title":"get_characters_character_id_blueprints_item_id"},"type_id":{"type":"integer","format":"int32","title":"get_characters_character_id_blueprints_type_id","description":"type_id integer"},"location_id":{"type":"integer","format":"int64","description":"References a solar system, station or item_id if this blueprint is located within a container. If the return value is an item_id, then the Character AssetList API must be queried to find the container using the given item_id to determine the correct location of the Blueprint.","title":"get_characters_character_id_blueprints_location_id"},"location_flag":{"type":"string","description":"Type of the location_id","enum":["AutoFit","Cargo","CorpseBay","DroneBay","FleetHangar","Deliveries","HiddenModifiers","Hangar","HangarAll","LoSlot0","LoSlot1","LoSlot2","LoSlot3","LoSlot4","LoSlot5","LoSlot6","LoSlot7","MedSlot0","MedSlot1","MedSlot2","MedSlot3","MedSlot4","MedSlot5","MedSlot6","MedSlot7","HiSlot0","HiSlot1","HiSlot2","HiSlot3","HiSlot4","HiSlot5","HiSlot6","HiSlot7","AssetSafety","Locked","Unlocked","Implant","QuafeBay","RigSlot0","RigSlot1","RigSlot2","RigSlot3","RigSlot4","RigSlot5","RigSlot6","RigSlot7","ShipHangar","SpecializedFuelBay","SpecializedOreHold","SpecializedGasHold","SpecializedMineralHold","SpecializedSalvageHold","SpecializedShipHold","SpecializedSmallShipHold","SpecializedMediumShipHold","SpecializedLargeShipHold","SpecializedIndustrialShipHold","SpecializedAmmoHold","SpecializedCommandCenterHold","SpecializedPlanetaryCommoditiesHold","SpecializedMaterialBay","SubSystemSlot0","SubSystemSlot1","SubSystemSlot2","SubSystemSlot3","SubSystemSlot4","SubSystemSlot5","SubSystemSlot6","SubSystemSlot7","FighterBay","FighterTube0","FighterTube1","FighterTube2","FighterTube3","FighterTube4","Module"],"title":"get_characters_character_id_blueprints_location_flag"},"quantity":{"type":"integer","format":"int32","description":"A range of numbers with a minimum of -2 and no maximum value where -1 is an original and -2 is a copy. It can be a positive integer if it is a stack of blueprint originals fresh from the market (e.g. no activities performed on them yet).","minimum":-2,"title":"get_characters_character_id_blueprints_quantity"},"time_efficiency":{"type":"integer","format":"int32","description":"Time Efficiency Level of the blueprint.","minimum":0,"maximum":20,"title":"get_characters_character_id_blueprints_time_efficiency"},"material_efficiency":{"type":"integer","format":"int32","description":"Material Efficiency Level of the blueprint.","minimum":0,"maximum":25,"title":"get_characters_character_id_blueprints_material_efficiency"},"runs":{"type":"integer","format":"int32","description":"Number of runs remaining if the blueprint is a copy, -1 if it is an original.","minimum":-1,"title":"get_characters_character_id_blueprints_runs"}},"title":"get_characters_character_id_blueprints_200_ok","description":"200 ok object"},"title":"get_characters_character_id_blueprints_ok","description":"200 ok array"},"headers":{"X-Pages":{"description":"Maximum page number","type":"integer","format":"int32","default":1},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-characters.read_blueprints.v1"]}],"operationId":"get_characters_character_id_blueprints","x-cached-seconds":3600,"x-alternate-versions":["dev","v2"]}},"/characters/{character_id}/fatigue/":{"get":{"description":"Return a character's jump activation and fatigue information\n\n---\nAlternate route: `/dev/characters/{character_id}/fatigue/`\n\nAlternate route: `/legacy/characters/{character_id}/fatigue/`\n\nAlternate route: `/v1/characters/{character_id}/fatigue/`\n\n---\nThis route is cached for up to 300 seconds","summary":"Get jump fatigue","tags":["Character"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Jump activation and fatigue information","examples":{"application/json":{"last_jump_date":"2017-07-05T15:47:00Z","jump_fatigue_expire_date":"2017-07-06T15:47:00Z","last_update_date":"2017-07-05T15:42:00Z"}},"schema":{"type":"object","properties":{"last_jump_date":{"type":"string","format":"date-time","description":"Character's last jump activation","title":"get_characters_character_id_fatigue_last_jump_date"},"jump_fatigue_expire_date":{"type":"string","format":"date-time","description":"Character's jump fatigue expiry","title":"get_characters_character_id_fatigue_jump_fatigue_expire_date"},"last_update_date":{"type":"string","format":"date-time","description":"Character's last jump update","title":"get_characters_character_id_fatigue_last_update_date"}},"title":"get_characters_character_id_fatigue_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-characters.read_fatigue.v1"]}],"operationId":"get_characters_character_id_fatigue","x-cached-seconds":300,"x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/notifications/contacts/":{"get":{"description":"Return notifications about having been added to someone's contact list\n\n---\nAlternate route: `/dev/characters/{character_id}/notifications/contacts/`\n\nAlternate route: `/legacy/characters/{character_id}/notifications/contacts/`\n\nAlternate route: `/v1/characters/{character_id}/notifications/contacts/`\n\n---\nThis route is cached for up to 600 seconds","summary":"Get new contact notifications","tags":["Character"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of contact notifications","examples":{"application/json":[{"notification_id":1,"sender_character_id":95465499,"send_date":"2017-08-16T10:08:00Z","standing_level":1.5,"message":"hello friend :3"}]},"schema":{"type":"array","maxItems":50,"items":{"type":"object","required":["notification_id","send_date","standing_level","message","sender_character_id"],"properties":{"notification_id":{"type":"integer","format":"int32","title":"get_characters_character_id_notifications_contacts_notification_id","description":"notification_id integer"},"send_date":{"type":"string","format":"date-time","title":"get_characters_character_id_notifications_contacts_send_date","description":"send_date string"},"standing_level":{"description":"A number representing the standing level the receiver has been added at by the sender. The standing levels are as follows: -10 -> Terrible | -5 -> Bad | 0 -> Neutral | 5 -> Good | 10 -> Excellent","type":"number","format":"float","title":"get_characters_character_id_notifications_contacts_standing_level"},"message":{"type":"string","title":"get_characters_character_id_notifications_contacts_message","description":"message string"},"sender_character_id":{"type":"integer","format":"int32","title":"get_characters_character_id_notifications_contacts_sender_character_id","description":"sender_character_id integer"}},"title":"get_characters_character_id_notifications_contacts_200_ok","description":"200 ok object"},"title":"get_characters_character_id_notifications_contacts_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-characters.read_notifications.v1"]}],"operationId":"get_characters_character_id_notifications_contacts","x-cached-seconds":600,"x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/notifications/":{"get":{"description":"Return character notifications\n\n---\nAlternate route: `/dev/characters/{character_id}/notifications/`\n\nAlternate route: `/legacy/characters/{character_id}/notifications/`\n\nAlternate route: `/v1/characters/{character_id}/notifications/`\n\n---\nThis route is cached for up to 600 seconds","summary":"Get character notifications","tags":["Character"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Returns your recent notifications","examples":{"application/json":[{"notification_id":1,"type":"InsurancePayoutMsg","sender_id":1000132,"sender_type":"corporation","timestamp":"2017-08-16T10:08:00Z","is_read":true,"text":"amount: 3731016.4000000004\\nitemID: 1024881021663\\npayout: 1\\n"}]},"schema":{"type":"array","maxItems":500,"items":{"type":"object","required":["notification_id","type","sender_id","sender_type","timestamp"],"properties":{"notification_id":{"type":"integer","format":"int64","title":"get_characters_character_id_notifications_notification_id","description":"notification_id integer"},"type":{"type":"string","enum":["AcceptedAlly","AcceptedSurrender","AllAnchoringMsg","AllMaintenanceBillMsg","AllStrucInvulnerableMsg","AllStructVulnerableMsg","AllWarCorpJoinedAllianceMsg","AllWarDeclaredMsg","AllWarInvalidatedMsg","AllWarRetractedMsg","AllWarSurrenderMsg","AllianceCapitalChanged","AllyContractCancelled","AllyJoinedWarAggressorMsg","AllyJoinedWarAllyMsg","AllyJoinedWarDefenderMsg","BattlePunishFriendlyFire","BillOutOfMoneyMsg","BillPaidCorpAllMsg","BountyClaimMsg","BountyESSShared","BountyESSTaken","BountyPlacedAlliance","BountyPlacedChar","BountyPlacedCorp","BountyYourBountyClaimed","BuddyConnectContactAdd","CharAppAcceptMsg","CharAppRejectMsg","CharAppWithdrawMsg","CharLeftCorpMsg","CharMedalMsg","CharTerminationMsg","CloneActivationMsg","CloneActivationMsg2","CloneMovedMsg","CloneRevokedMsg1","CloneRevokedMsg2","ContactAdd","ContactEdit","ContainerPasswordMsg","CorpAllBillMsg","CorpAppAcceptMsg","CorpAppInvitedMsg","CorpAppNewMsg","CorpAppRejectCustomMsg","CorpAppRejectMsg","CorpDividendMsg","CorpFriendlyFireDisableTimerCompleted","CorpFriendlyFireDisableTimerStarted","CorpFriendlyFireEnableTimerCompleted","CorpFriendlyFireEnableTimerStarted","CorpKicked","CorpLiquidationMsg","CorpNewCEOMsg","CorpNewsMsg","CorpOfficeExpirationMsg","CorpStructLostMsg","CorpTaxChangeMsg","CorpVoteCEORevokedMsg","CorpVoteMsg","CorpWarDeclaredMsg","CorpWarFightingLegalMsg","CorpWarInvalidatedMsg","CorpWarRetractedMsg","CorpWarSurrenderMsg","CustomsMsg","DeclareWar","DistrictAttacked","DustAppAcceptedMsg","EntosisCaptureStarted","FWAllianceKickMsg","FWAllianceWarningMsg","FWCharKickMsg","FWCharRankGainMsg","FWCharRankLossMsg","FWCharWarningMsg","FWCorpJoinMsg","FWCorpKickMsg","FWCorpLeaveMsg","FWCorpWarningMsg","FacWarCorpJoinRequestMsg","FacWarCorpJoinWithdrawMsg","FacWarCorpLeaveRequestMsg","FacWarCorpLeaveWithdrawMsg","FacWarLPDisqualifiedEvent","FacWarLPDisqualifiedKill","FacWarLPPayoutEvent","FacWarLPPayoutKill","GameTimeAdded","GameTimeReceived","GameTimeSent","GiftReceived","IHubDestroyedByBillFailure","IncursionCompletedMsg","IndustryTeamAuctionLost","IndustryTeamAuctionWon","InfrastructureHubBillAboutToExpire","InsuranceExpirationMsg","InsuranceFirstShipMsg","InsuranceInvalidatedMsg","InsuranceIssuedMsg","InsurancePayoutMsg","JumpCloneDeletedMsg1","JumpCloneDeletedMsg2","KillReportFinalBlow","KillReportVictim","KillRightAvailable","KillRightAvailableOpen","KillRightEarned","KillRightUnavailable","KillRightUnavailableOpen","KillRightUsed","LocateCharMsg","MadeWarMutual","MercOfferedNegotiationMsg","MissionOfferExpirationMsg","MissionTimeoutMsg","MoonminingAutomaticFracture","MoonminingExtractionCancelled","MoonminingExtractionFinished","MoonminingLaserFired","NPCStandingsGained","NPCStandingsLost","OfferedSurrender","OfferedToAlly","OldLscMessages","OperationFinished","OrbitalAttacked","OrbitalReinforced","OwnershipTransferred","ReimbursementMsg","ResearchMissionAvailableMsg","RetractsWar","SeasonalChallengeCompleted","SovAllClaimAquiredMsg","SovAllClaimLostMsg","SovCommandNodeEventStarted","SovCorpBillLateMsg","SovCorpClaimFailMsg","SovDisruptorMsg","SovStationEnteredFreeport","SovStructureDestroyed","SovStructureReinforced","SovStructureSelfDestructCancel","SovStructureSelfDestructFinished","SovStructureSelfDestructRequested","SovereigntyIHDamageMsg","SovereigntySBUDamageMsg","SovereigntyTCUDamageMsg","StationAggressionMsg1","StationAggressionMsg2","StationConquerMsg","StationServiceDisabled","StationServiceEnabled","StationStateChangeMsg","StoryLineMissionAvailableMsg","StructureAnchoring","StructureCourierContractChanged","StructureDestroyed","StructureFuelAlert","StructureItemsDelivered","StructureLostArmor","StructureLostShields","StructureOnline","StructureServicesOffline","StructureUnanchoring","StructureUnderAttack","TowerAlertMsg","TowerResourceAlertMsg","TransactionReversalMsg","TutorialMsg","WarAllyOfferDeclinedMsg","WarSurrenderDeclinedMsg","WarSurrenderOfferMsg","notificationTypeMoonminingExtractionStarted"],"title":"get_characters_character_id_notifications_type","description":"type string"},"sender_id":{"type":"integer","format":"int32","title":"get_characters_character_id_notifications_sender_id","description":"sender_id integer"},"sender_type":{"type":"string","enum":["character","corporation","alliance","faction","other"],"title":"get_characters_character_id_notifications_sender_type","description":"sender_type string"},"timestamp":{"type":"string","format":"date-time","title":"get_characters_character_id_notifications_timestamp","description":"timestamp string"},"is_read":{"type":"boolean","title":"get_characters_character_id_notifications_is_read","description":"is_read boolean"},"text":{"type":"string","title":"get_characters_character_id_notifications_text","description":"text string"}},"title":"get_characters_character_id_notifications_200_ok","description":"200 ok object"},"title":"get_characters_character_id_notifications_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-characters.read_notifications.v1"]}],"operationId":"get_characters_character_id_notifications","x-cached-seconds":600,"x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/roles/":{"get":{"description":"Returns a character's corporation roles\n\n---\nAlternate route: `/legacy/characters/{character_id}/roles/`\n\nAlternate route: `/v1/characters/{character_id}/roles/`\n\n---\nThis route is cached for up to 3600 seconds\n\n---\n[This route has an available update](https://esi.tech.ccp.is/diff/latest/dev/#GET-/characters/{character_id}/roles/)","summary":"Get character corporation roles","tags":["Character"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"The character's roles in thier corporation","examples":{"application/json":["Director","Station_Manager"]},"schema":{"type":"array","maxItems":50,"uniqueItems":true,"items":{"type":"string","enum":["Account_Take_1","Account_Take_2","Account_Take_3","Account_Take_4","Account_Take_5","Account_Take_6","Account_Take_7","Accountant","Auditor","Communications_Officer","Config_Equipment","Config_Starbase_Equipment","Container_Take_1","Container_Take_2","Container_Take_3","Container_Take_4","Container_Take_5","Container_Take_6","Container_Take_7","Contract_Manager","Diplomat","Director","Factory_Manager","Fitting_Manager","Hangar_Query_1","Hangar_Query_2","Hangar_Query_3","Hangar_Query_4","Hangar_Query_5","Hangar_Query_6","Hangar_Query_7","Hangar_Take_1","Hangar_Take_2","Hangar_Take_3","Hangar_Take_4","Hangar_Take_5","Hangar_Take_6","Hangar_Take_7","Junior_Accountant","Personnel_Manager","Rent_Factory_Facility","Rent_Office","Rent_Research_Facility","Security_Officer","Starbase_Defense_Operator","Starbase_Fuel_Technician","Station_Manager","Terrestrial_Combat_Officer","Terrestrial_Logistics_Officer","Trader"],"title":"get_characters_character_id_roles_200_ok","description":"200 ok string"},"title":"get_characters_character_id_roles_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-characters.read_corporation_roles.v1"]}],"operationId":"get_characters_character_id_roles","x-cached-seconds":3600,"x-alternate-versions":["legacy","v1"]}},"/characters/{character_id}/titles/":{"get":{"description":"Returns a character's titles\n\n---\nAlternate route: `/dev/characters/{character_id}/titles/`\n\nAlternate route: `/legacy/characters/{character_id}/titles/`\n\nAlternate route: `/v1/characters/{character_id}/titles/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"Get character corporation titles","tags":["Character"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of titles","examples":{"application/json":[{"title_id":1,"name":"Awesome Title"}]},"schema":{"type":"array","maxItems":16,"items":{"type":"object","properties":{"title_id":{"type":"integer","format":"int32","title":"get_characters_character_id_titles_title_id","description":"title_id integer"},"name":{"type":"string","title":"get_characters_character_id_titles_name","description":"name string"}},"title":"get_characters_character_id_titles_200_ok","description":"200 ok object"},"title":"get_characters_character_id_titles_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-characters.read_titles.v1"]}],"operationId":"get_characters_character_id_titles","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/clones/":{"get":{"description":"A list of the character's clones\n\n---\nAlternate route: `/legacy/characters/{character_id}/clones/`\n\nAlternate route: `/v2/characters/{character_id}/clones/`\n\n---\nThis route is cached for up to 120 seconds\n\n---\n[This route has an available update](https://esi.tech.ccp.is/diff/latest/dev/#GET-/characters/{character_id}/clones/)","summary":"Get clones","tags":["Clones"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Clone information for the given character","examples":{"application/json":{"home_location":{"location_id":1021348135816,"location_type":"structure"},"jump_clones":[{"location_id":60003463,"location_type":"station","implants":[22118]},{"location_id":1021348135816,"location_type":"structure","implants":[]}]}},"schema":{"type":"object","required":["jump_clones"],"properties":{"last_jump_date":{"type":"string","format":"date-time","title":"get_characters_character_id_clones_last_jump_date","description":"last_jump_date string"},"home_location":{"type":"object","properties":{"location_id":{"type":"integer","format":"int64","title":"get_characters_character_id_clones_location_id","description":"location_id integer"},"location_type":{"type":"string","enum":["station","structure"],"title":"get_characters_character_id_clones_location_type","description":"location_type string"}},"title":"get_characters_character_id_clones_home_location","description":"home_location object"},"jump_clones":{"type":"array","maxItems":10,"items":{"type":"object","properties":{"location_id":{"type":"integer","format":"int64","title":"get_characters_character_id_clones_location_id","description":"location_id integer"},"location_type":{"type":"string","enum":["station","structure"],"title":"get_characters_character_id_clones_location_type","description":"location_type string"},"implants":{"type":"array","maxItems":11,"items":{"type":"integer","format":"int32","title":"get_characters_character_id_clones_implant","description":"implant integer"},"title":"get_characters_character_id_clones_implants","description":"implants array"}},"title":"get_characters_character_id_clones_jump_clone","description":"jump_clone object"},"title":"get_characters_character_id_clones_jump_clones","description":"jump_clones array"}},"title":"get_characters_character_id_clones_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-clones.read_clones.v1"]}],"operationId":"get_characters_character_id_clones","x-cached-seconds":120,"x-alternate-versions":["legacy","v2"]}},"/characters/{character_id}/implants/":{"get":{"description":"Return implants on the active clone of a character\n\n---\nAlternate route: `/dev/characters/{character_id}/implants/`\n\nAlternate route: `/legacy/characters/{character_id}/implants/`\n\nAlternate route: `/v1/characters/{character_id}/implants/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"Get active implants","tags":["Clones"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of implant type ids","examples":{"application/json":[1,2,3]},"schema":{"type":"array","maxItems":11,"items":{"type":"integer","format":"int32","title":"get_characters_character_id_implants_200_ok","description":"200 ok integer"},"title":"get_characters_character_id_implants_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-clones.read_implants.v1"]}],"operationId":"get_characters_character_id_implants","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/contacts/":{"delete":{"description":"Bulk delete contacts\n\n---\nAlternate route: `/legacy/characters/{character_id}/contacts/`\n\nAlternate route: `/v1/characters/{character_id}/contacts/`\n\n\n---\n[This route has an available update](https://esi.tech.ccp.is/diff/latest/dev/#DELETE-/characters/{character_id}/contacts/)","summary":"Delete contacts","tags":["Contacts"],"parameters":[{"$ref":"#/parameters/character_id"},{"name":"contact_ids","in":"body","description":"A list of contacts to delete","required":true,"schema":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"integer","format":"int32","description":"ID of the contact to delete","title":"delete_characters_character_id_contacts_contact_id"},"title":"delete_characters_character_id_contacts_contact_ids","description":"contact_ids array"}},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"204":{"description":"Contacts deleted"},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-characters.write_contacts.v1"]}],"operationId":"delete_characters_character_id_contacts","x-alternate-versions":["legacy","v1"]},"get":{"description":"Return contacts of a character\n\n---\nAlternate route: `/dev/characters/{character_id}/contacts/`\n\nAlternate route: `/legacy/characters/{character_id}/contacts/`\n\nAlternate route: `/v1/characters/{character_id}/contacts/`\n\n---\nThis route is cached for up to 300 seconds","summary":"Get contacts","tags":["Contacts"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/page"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of contacts","examples":{"application/json":[{"standing":9.9,"contact_type":"character","contact_id":123,"is_watched":true,"is_blocked":true}]},"schema":{"type":"array","maxItems":1024,"items":{"type":"object","required":["standing","contact_type","contact_id"],"properties":{"standing":{"type":"number","format":"float","description":"Standing of the contact","title":"get_characters_character_id_contacts_standing"},"contact_type":{"type":"string","enum":["character","corporation","alliance","faction"],"title":"get_characters_character_id_contacts_contact_type","description":"contact_type string"},"contact_id":{"type":"integer","format":"int32","title":"get_characters_character_id_contacts_contact_id","description":"contact_id integer"},"is_watched":{"type":"boolean","description":"Whether this contact is being watched","title":"get_characters_character_id_contacts_is_watched"},"is_blocked":{"type":"boolean","description":"Whether this contact is in the blocked list. Note a missing value denotes unknown, not true or false","title":"get_characters_character_id_contacts_is_blocked"},"label_id":{"type":"integer","format":"int64","description":"Custom label of the contact","title":"get_characters_character_id_contacts_label_id"}},"title":"get_characters_character_id_contacts_200_ok","description":"200 ok object"},"title":"get_characters_character_id_contacts_ok","description":"200 ok array"},"headers":{"X-Pages":{"description":"Maximum page number","type":"integer","format":"int32","default":1},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-characters.read_contacts.v1"]}],"operationId":"get_characters_character_id_contacts","x-cached-seconds":300,"x-alternate-versions":["dev","legacy","v1"]},"post":{"description":"Bulk add contacts with same settings\n\n---\nAlternate route: `/dev/characters/{character_id}/contacts/`\n\nAlternate route: `/legacy/characters/{character_id}/contacts/`\n\nAlternate route: `/v1/characters/{character_id}/contacts/`\n","summary":"Add contacts","tags":["Contacts"],"parameters":[{"$ref":"#/parameters/character_id"},{"name":"contact_ids","in":"body","description":"A list of contacts to add","required":true,"schema":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"integer","format":"int32","description":"ID of the contact to add","title":"post_characters_character_id_contacts_contact_id"},"title":"post_characters_character_id_contacts_contact_ids","description":"contact_ids array"}},{"$ref":"#/parameters/datasource"},{"name":"label_id","in":"query","description":"Add a custom label to the new contact","required":false,"type":"integer","format":"int64","default":0},{"name":"standing","in":"query","description":"Standing for the new contact","required":true,"type":"number","format":"float","minimum":-10,"maximum":10},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"name":"watched","in":"query","description":"Whether the new contact should be watched, note this is only effective on characters","required":false,"type":"boolean","default":false},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"201":{"description":"A list of contact ids that successfully created","examples":{"application/json":[123,456]},"schema":{"type":"array","maxItems":100,"items":{"type":"integer","format":"int32","title":"post_characters_character_id_contacts_201_created","description":"201 created integer"},"title":"post_characters_character_id_contacts_created","description":"201 created array"}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-characters.write_contacts.v1"]}],"operationId":"post_characters_character_id_contacts","x-alternate-versions":["dev","legacy","v1"]},"put":{"description":"Bulk edit contacts with same settings\n\n---\nAlternate route: `/dev/characters/{character_id}/contacts/`\n\nAlternate route: `/legacy/characters/{character_id}/contacts/`\n\nAlternate route: `/v1/characters/{character_id}/contacts/`\n","summary":"Edit contacts","tags":["Contacts"],"parameters":[{"$ref":"#/parameters/character_id"},{"name":"contact_ids","in":"body","description":"A list of contacts to edit","required":true,"schema":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"integer","format":"int32","description":"ID of the contact to edit","title":"put_characters_character_id_contacts_contact_id"},"title":"put_characters_character_id_contacts_contact_ids","description":"contact_ids array"}},{"$ref":"#/parameters/datasource"},{"name":"label_id","in":"query","description":"Add a custom label to the contact, use 0 for clearing label","required":false,"type":"integer","format":"int64","default":0},{"name":"standing","in":"query","description":"Standing for the contact","required":true,"type":"number","format":"float","minimum":-10,"maximum":10},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"name":"watched","in":"query","description":"Whether the contact should be watched, note this is only effective on characters","required":false,"type":"boolean","default":false},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"204":{"description":"Contacts updated"},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-characters.write_contacts.v1"]}],"operationId":"put_characters_character_id_contacts","x-alternate-versions":["dev","legacy","v1"]}},"/corporations/{corporation_id}/contacts/":{"get":{"description":"Return contacts of a corporation\n\n---\nAlternate route: `/dev/corporations/{corporation_id}/contacts/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/contacts/`\n\nAlternate route: `/v1/corporations/{corporation_id}/contacts/`\n\n---\nThis route is cached for up to 300 seconds","summary":"Get corporation contacts","tags":["Contacts"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/page"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of contacts","examples":{"application/json":[{"standing":9.9,"contact_type":"character","contact_id":123,"is_watched":true}]},"schema":{"type":"array","maxItems":200,"items":{"type":"object","required":["standing","contact_type","contact_id"],"properties":{"standing":{"type":"number","format":"float","description":"Standing of the contact","title":"get_corporations_corporation_id_contacts_standing"},"contact_type":{"type":"string","enum":["character","corporation","alliance","faction"],"title":"get_corporations_corporation_id_contacts_contact_type","description":"contact_type string"},"contact_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_contacts_contact_id","description":"contact_id integer"},"is_watched":{"type":"boolean","description":"Whether this contact is being watched","title":"get_corporations_corporation_id_contacts_is_watched"},"label_id":{"type":"integer","format":"int64","description":"Custom label of the contact","title":"get_corporations_corporation_id_contacts_label_id"}},"title":"get_corporations_corporation_id_contacts_200_ok","description":"200 ok object"},"title":"get_corporations_corporation_id_contacts_ok","description":"200 ok array"},"headers":{"X-Pages":{"description":"Maximum page number","type":"integer","format":"int32","default":1},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"x-required-roles":[],"security":[{"evesso":["esi-corporations.read_contacts.v1"]}],"operationId":"get_corporations_corporation_id_contacts","x-cached-seconds":300,"x-alternate-versions":["dev","legacy","v1"]}},"/alliances/{alliance_id}/contacts/":{"get":{"description":"Return contacts of an alliance\n\n---\nAlternate route: `/dev/alliances/{alliance_id}/contacts/`\n\nAlternate route: `/legacy/alliances/{alliance_id}/contacts/`\n\nAlternate route: `/v1/alliances/{alliance_id}/contacts/`\n\n---\nThis route is cached for up to 300 seconds","summary":"Get alliance contacts","tags":["Contacts"],"parameters":[{"$ref":"#/parameters/alliance_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/page"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of contacts","examples":{"application/json":[{"standing":9.9,"contact_type":"character","contact_id":2112625428}]},"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["standing","contact_type","contact_id"],"properties":{"standing":{"type":"number","format":"float","description":"Standing of the contact","title":"get_alliances_alliance_id_contacts_standing"},"contact_type":{"type":"string","enum":["character","corporation","alliance","faction"],"title":"get_alliances_alliance_id_contacts_contact_type","description":"contact_type string"},"contact_id":{"type":"integer","format":"int32","title":"get_alliances_alliance_id_contacts_contact_id","description":"contact_id integer"},"label_id":{"type":"integer","format":"int64","description":"Custom label of the contact","title":"get_alliances_alliance_id_contacts_label_id"}},"title":"get_alliances_alliance_id_contacts_200_ok","description":"200 ok object"},"title":"get_alliances_alliance_id_contacts_ok","description":"200 ok array"},"headers":{"X-Pages":{"description":"Maximum page number","type":"integer","format":"int32","default":1},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-alliances.read_contacts.v1"]}],"operationId":"get_alliances_alliance_id_contacts","x-cached-seconds":300,"x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/contacts/labels/":{"get":{"description":"Return custom labels for contacts the character defined\n\n---\nAlternate route: `/dev/characters/{character_id}/contacts/labels/`\n\nAlternate route: `/legacy/characters/{character_id}/contacts/labels/`\n\nAlternate route: `/v1/characters/{character_id}/contacts/labels/`\n\n---\nThis route is cached for up to 300 seconds","summary":"Get contact labels","tags":["Contacts"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of contact labels","examples":{"application/json":[{"label_id":123,"label_name":"Friends"}]},"schema":{"type":"array","maxItems":64,"items":{"type":"object","required":["label_id","label_name"],"properties":{"label_id":{"type":"integer","format":"int64","title":"get_characters_character_id_contacts_labels_label_id","description":"label_id integer"},"label_name":{"type":"string","title":"get_characters_character_id_contacts_labels_label_name","description":"label_name string"}},"title":"get_characters_character_id_contacts_labels_200_ok","description":"200 ok object"},"title":"get_characters_character_id_contacts_labels_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-characters.read_contacts.v1"]}],"operationId":"get_characters_character_id_contacts_labels","x-cached-seconds":300,"x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/contracts/":{"get":{"description":"Returns contracts available to a character, only if the character is issuer, acceptor or assignee. Only returns contracts no older than 30 days, or if the status is \"in_progress\".\n\n---\nAlternate route: `/dev/characters/{character_id}/contracts/`\n\nAlternate route: `/legacy/characters/{character_id}/contracts/`\n\nAlternate route: `/v1/characters/{character_id}/contracts/`\n\n---\nThis route is cached for up to 300 seconds","summary":"Get contracts","tags":["Contracts"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of contracts","examples":{"application/json":[{"contract_id":1,"issuer_id":123,"issuer_corporation_id":456,"assignee_id":0,"acceptor_id":0,"type":"auction","status":"outstanding","for_corporation":true,"availability":"public","date_issued":"2017-06-06T13:12:32Z","date_expired":"2017-06-13T13:12:32Z","start_location_id":60014719,"end_location_id":60014719,"date_accepted":"2017-06-06T13:12:32Z","days_to_complete":0,"date_completed":"2017-06-06T13:12:32Z","price":1000000.01,"reward":0.01,"buyout":10000000000.01,"volume":0.01}]},"schema":{"type":"array","maxItems":10000,"items":{"type":"object","required":["contract_id","issuer_id","issuer_corporation_id","assignee_id","acceptor_id","type","status","for_corporation","availability","date_issued","date_expired"],"properties":{"contract_id":{"type":"integer","format":"int32","title":"get_characters_character_id_contracts_contract_id","description":"contract_id integer"},"issuer_id":{"type":"integer","format":"int32","description":"Character ID for the issuer","title":"get_characters_character_id_contracts_issuer_id"},"issuer_corporation_id":{"type":"integer","format":"int32","description":"Character's corporation ID for the issuer","title":"get_characters_character_id_contracts_issuer_corporation_id"},"assignee_id":{"type":"integer","format":"int32","description":"ID to whom the contract is assigned, can be corporation or character ID","title":"get_characters_character_id_contracts_assignee_id"},"acceptor_id":{"type":"integer","format":"int32","description":"Who will accept the contract","title":"get_characters_character_id_contracts_acceptor_id"},"start_location_id":{"type":"integer","format":"int64","description":"Start location ID (for Couriers contract)","title":"get_characters_character_id_contracts_start_location_id"},"end_location_id":{"type":"integer","format":"int64","description":"End location ID (for Couriers contract)","title":"get_characters_character_id_contracts_end_location_id"},"type":{"type":"string","description":"Type of the contract","enum":["unknown","item_exchange","auction","courier","loan"],"title":"get_characters_character_id_contracts_type"},"status":{"type":"string","description":"Status of the the contract","enum":["outstanding","in_progress","finished_issuer","finished_contractor","finished","cancelled","rejected","failed","deleted","reversed"],"title":"get_characters_character_id_contracts_status"},"title":{"type":"string","description":"Title of the contract","title":"get_characters_character_id_contracts_title"},"for_corporation":{"type":"boolean","description":"true if the contract was issued on behalf of the issuer's corporation","title":"get_characters_character_id_contracts_for_corporation"},"availability":{"type":"string","description":"To whom the contract is available","enum":["public","personal","corporation","alliance"],"title":"get_characters_character_id_contracts_availability"},"date_issued":{"type":"string","format":"date-time","description":"\u0421reation date of the contract","title":"get_characters_character_id_contracts_date_issued"},"date_expired":{"type":"string","format":"date-time","description":"Expiration date of the contract","title":"get_characters_character_id_contracts_date_expired"},"date_accepted":{"type":"string","format":"date-time","description":"Date of confirmation of contract","title":"get_characters_character_id_contracts_date_accepted"},"days_to_complete":{"type":"integer","format":"int32","description":"Number of days to perform the contract","title":"get_characters_character_id_contracts_days_to_complete"},"date_completed":{"type":"string","format":"date-time","description":"Date of completed of contract","title":"get_characters_character_id_contracts_date_completed"},"price":{"type":"number","format":"double","description":"Price of contract (for ItemsExchange and Auctions)","title":"get_characters_character_id_contracts_price"},"reward":{"type":"number","format":"double","description":"Remuneration for contract (for Couriers only)","title":"get_characters_character_id_contracts_reward"},"collateral":{"type":"number","format":"double","description":"Collateral price (for Couriers only)","title":"get_characters_character_id_contracts_collateral"},"buyout":{"type":"number","format":"double","description":"Buyout price (for Auctions only)","title":"get_characters_character_id_contracts_buyout"},"volume":{"type":"number","format":"float","description":"Volume of items in the contract","title":"get_characters_character_id_contracts_volume"}},"title":"get_characters_character_id_contracts_200_ok","description":"200 ok object"},"title":"get_characters_character_id_contracts_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-contracts.read_character_contracts.v1"]}],"operationId":"get_characters_character_id_contracts","x-cached-seconds":300,"x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/contracts/{contract_id}/items/":{"get":{"description":"Lists items of a particular contract\n\n---\nAlternate route: `/dev/characters/{character_id}/contracts/{contract_id}/items/`\n\nAlternate route: `/legacy/characters/{character_id}/contracts/{contract_id}/items/`\n\nAlternate route: `/v1/characters/{character_id}/contracts/{contract_id}/items/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"Get contract items","tags":["Contracts"],"parameters":[{"$ref":"#/parameters/character_id"},{"name":"contract_id","in":"path","description":"ID of a contract","required":true,"type":"integer","format":"int32"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of items in this contract","examples":{"application/json":[{"record_id":123456,"type_id":587,"quantity":1,"is_singleton":false,"is_included":true}]},"schema":{"type":"array","maxItems":2000,"items":{"type":"object","required":["record_id","type_id","quantity","is_singleton","is_included"],"properties":{"record_id":{"type":"integer","format":"int64","description":"Unique ID for the item","title":"get_characters_character_id_contracts_contract_id_items_record_id"},"type_id":{"type":"integer","format":"int32","description":"Type ID for item","title":"get_characters_character_id_contracts_contract_id_items_type_id"},"quantity":{"type":"integer","format":"int32","description":"Number of items in the stack","title":"get_characters_character_id_contracts_contract_id_items_quantity"},"raw_quantity":{"type":"integer","format":"int32","description":"-1 indicates that the item is a singleton (non-stackable). If the item happens to be a Blueprint, -1 is an Original and -2 is a Blueprint Copy","title":"get_characters_character_id_contracts_contract_id_items_raw_quantity"},"is_singleton":{"type":"boolean","title":"get_characters_character_id_contracts_contract_id_items_is_singleton","description":"is_singleton boolean"},"is_included":{"type":"boolean","description":"true if the contract issuer has submitted this item with the contract, false if the isser is asking for this item in the contract.","title":"get_characters_character_id_contracts_contract_id_items_is_included"}},"title":"get_characters_character_id_contracts_contract_id_items_200_ok","description":"200 ok object"},"title":"get_characters_character_id_contracts_contract_id_items_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-contracts.read_character_contracts.v1"]}],"operationId":"get_characters_character_id_contracts_contract_id_items","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/contracts/{contract_id}/bids/":{"get":{"description":"Lists bids on a particular auction contract\n\n---\nAlternate route: `/dev/characters/{character_id}/contracts/{contract_id}/bids/`\n\nAlternate route: `/legacy/characters/{character_id}/contracts/{contract_id}/bids/`\n\nAlternate route: `/v1/characters/{character_id}/contracts/{contract_id}/bids/`\n\n---\nThis route is cached for up to 300 seconds","summary":"Get contract bids","tags":["Contracts"],"parameters":[{"$ref":"#/parameters/character_id"},{"name":"contract_id","in":"path","description":"ID of a contract","required":true,"type":"integer","format":"int32"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of bids","examples":{"application/json":[{"bid_id":1,"bidder_id":123,"date_bid":"2017-01-01T10:10:10Z","amount":1.23}]},"schema":{"type":"array","maxItems":2000,"items":{"type":"object","required":["bid_id","bidder_id","date_bid","amount"],"properties":{"bid_id":{"type":"integer","format":"int32","description":"Unique ID for the bid","title":"get_characters_character_id_contracts_contract_id_bids_bid_id"},"bidder_id":{"type":"integer","format":"int32","description":"Character ID of the bidder","title":"get_characters_character_id_contracts_contract_id_bids_bidder_id"},"date_bid":{"type":"string","format":"date-time","description":"Datetime when the bid was placed","title":"get_characters_character_id_contracts_contract_id_bids_date_bid"},"amount":{"type":"number","format":"float","description":"The amount bid, in ISK","title":"get_characters_character_id_contracts_contract_id_bids_amount"}},"title":"get_characters_character_id_contracts_contract_id_bids_200_ok","description":"200 ok object"},"title":"get_characters_character_id_contracts_contract_id_bids_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-contracts.read_character_contracts.v1"]}],"operationId":"get_characters_character_id_contracts_contract_id_bids","x-cached-seconds":300,"x-alternate-versions":["dev","legacy","v1"]}},"/corporations/{corporation_id}/contracts/":{"get":{"description":"Returns contracts available to a coporation, only if the corporation is issuer, acceptor or assignee. Only returns contracts no older than 30 days, or if the status is \"in_progress\".\n\n---\nAlternate route: `/dev/corporations/{corporation_id}/contracts/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/contracts/`\n\nAlternate route: `/v1/corporations/{corporation_id}/contracts/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"Get coporation contracts","tags":["Contracts"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of contracts","examples":{"application/json":[{"contract_id":1,"issuer_id":123,"issuer_corporation_id":456,"assignee_id":0,"acceptor_id":0,"type":"auction","status":"outstanding","for_corporation":true,"availability":"public","date_issued":"2017-06-06T13:12:32Z","date_expired":"2017-06-13T13:12:32Z","start_location_id":60014719,"end_location_id":60014719,"date_accepted":"2017-06-06T13:12:32Z","days_to_complete":0,"date_completed":"2017-06-06T13:12:32Z","price":1000000.01,"reward":0.01,"buyout":10000000000.01,"volume":0.01}]},"schema":{"type":"array","maxItems":10000,"items":{"type":"object","required":["contract_id","issuer_id","issuer_corporation_id","assignee_id","acceptor_id","type","status","for_corporation","availability","date_issued","date_expired"],"properties":{"contract_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_contracts_contract_id","description":"contract_id integer"},"issuer_id":{"type":"integer","format":"int32","description":"Character ID for the issuer","title":"get_corporations_corporation_id_contracts_issuer_id"},"issuer_corporation_id":{"type":"integer","format":"int32","description":"Character's corporation ID for the issuer","title":"get_corporations_corporation_id_contracts_issuer_corporation_id"},"assignee_id":{"type":"integer","format":"int32","description":"ID to whom the contract is assigned, can be corporation or character ID","title":"get_corporations_corporation_id_contracts_assignee_id"},"acceptor_id":{"type":"integer","format":"int32","description":"Who will accept the contract","title":"get_corporations_corporation_id_contracts_acceptor_id"},"start_location_id":{"type":"integer","format":"int64","description":"Start location ID (for Couriers contract)","title":"get_corporations_corporation_id_contracts_start_location_id"},"end_location_id":{"type":"integer","format":"int64","description":"End location ID (for Couriers contract)","title":"get_corporations_corporation_id_contracts_end_location_id"},"type":{"type":"string","description":"Type of the contract","enum":["unknown","item_exchange","auction","courier","loan"],"title":"get_corporations_corporation_id_contracts_type"},"status":{"type":"string","description":"Status of the the contract","enum":["outstanding","in_progress","finished_issuer","finished_contractor","finished","cancelled","rejected","failed","deleted","reversed"],"title":"get_corporations_corporation_id_contracts_status"},"title":{"type":"string","description":"Title of the contract","title":"get_corporations_corporation_id_contracts_title"},"for_corporation":{"type":"boolean","description":"true if the contract was issued on behalf of the issuer's corporation","title":"get_corporations_corporation_id_contracts_for_corporation"},"availability":{"type":"string","description":"To whom the contract is available","enum":["public","personal","corporation","alliance"],"title":"get_corporations_corporation_id_contracts_availability"},"date_issued":{"type":"string","format":"date-time","description":"\u0421reation date of the contract","title":"get_corporations_corporation_id_contracts_date_issued"},"date_expired":{"type":"string","format":"date-time","description":"Expiration date of the contract","title":"get_corporations_corporation_id_contracts_date_expired"},"date_accepted":{"type":"string","format":"date-time","description":"Date of confirmation of contract","title":"get_corporations_corporation_id_contracts_date_accepted"},"days_to_complete":{"type":"integer","format":"int32","description":"Number of days to perform the contract","title":"get_corporations_corporation_id_contracts_days_to_complete"},"date_completed":{"type":"string","format":"date-time","description":"Date of completed of contract","title":"get_corporations_corporation_id_contracts_date_completed"},"price":{"type":"number","format":"double","description":"Price of contract (for ItemsExchange and Auctions)","title":"get_corporations_corporation_id_contracts_price"},"reward":{"type":"number","format":"double","description":"Remuneration for contract (for Couriers only)","title":"get_corporations_corporation_id_contracts_reward"},"collateral":{"type":"number","format":"double","description":"Collateral price (for Couriers only)","title":"get_corporations_corporation_id_contracts_collateral"},"buyout":{"type":"number","format":"double","description":"Buyout price (for Auctions only)","title":"get_corporations_corporation_id_contracts_buyout"},"volume":{"type":"number","format":"float","description":"Volume of items in the contract","title":"get_corporations_corporation_id_contracts_volume"}},"title":"get_corporations_corporation_id_contracts_200_ok","description":"200 ok object"},"title":"get_corporations_corporation_id_contracts_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"x-required-roles":[],"security":[{"evesso":["esi-contracts.read_corporation_contracts.v1"]}],"operationId":"get_corporations_corporation_id_contracts","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/corporations/{corporation_id}/contracts/{contract_id}/items/":{"get":{"description":"Lists items of a particular contract\n\n---\nAlternate route: `/dev/corporations/{corporation_id}/contracts/{contract_id}/items/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/contracts/{contract_id}/items/`\n\nAlternate route: `/v1/corporations/{corporation_id}/contracts/{contract_id}/items/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"Get corporation contract items","tags":["Contracts"],"parameters":[{"name":"contract_id","in":"path","description":"ID of a contract","required":true,"type":"integer","format":"int32"},{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of items in this contract","examples":{"application/json":[{"record_id":123456,"type_id":587,"quantity":1,"is_singleton":false,"is_included":true}]},"schema":{"type":"array","maxItems":2000,"items":{"type":"object","required":["record_id","type_id","quantity","is_singleton","is_included"],"properties":{"record_id":{"type":"integer","format":"int64","description":"Unique ID for the item","title":"get_corporations_corporation_id_contracts_contract_id_items_record_id"},"type_id":{"type":"integer","format":"int32","description":"Type ID for item","title":"get_corporations_corporation_id_contracts_contract_id_items_type_id"},"quantity":{"type":"integer","format":"int32","description":"Number of items in the stack","title":"get_corporations_corporation_id_contracts_contract_id_items_quantity"},"raw_quantity":{"type":"integer","format":"int32","description":"-1 indicates that the item is a singleton (non-stackable). If the item happens to be a Blueprint, -1 is an Original and -2 is a Blueprint Copy","title":"get_corporations_corporation_id_contracts_contract_id_items_raw_quantity"},"is_singleton":{"type":"boolean","title":"get_corporations_corporation_id_contracts_contract_id_items_is_singleton","description":"is_singleton boolean"},"is_included":{"type":"boolean","description":"true if the contract issuer has submitted this item with the contract, false if the isser is asking for this item in the contract.","title":"get_corporations_corporation_id_contracts_contract_id_items_is_included"}},"title":"get_corporations_corporation_id_contracts_contract_id_items_200_ok","description":"200 ok object"},"title":"get_corporations_corporation_id_contracts_contract_id_items_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"x-required-roles":[],"security":[{"evesso":["esi-contracts.read_corporation_contracts.v1"]}],"operationId":"get_corporations_corporation_id_contracts_contract_id_items","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/corporations/{corporation_id}/contracts/{contract_id}/bids/":{"get":{"description":"Lists bids on a particular auction contract\n\n---\nAlternate route: `/dev/corporations/{corporation_id}/contracts/{contract_id}/bids/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/contracts/{contract_id}/bids/`\n\nAlternate route: `/v1/corporations/{corporation_id}/contracts/{contract_id}/bids/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"Get corporation contract bids","tags":["Contracts"],"parameters":[{"name":"contract_id","in":"path","description":"ID of a contract","required":true,"type":"integer","format":"int32"},{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/page"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of bids","examples":{"application/json":[{"bid_id":1,"bidder_id":123,"date_bid":"2017-01-01T10:10:10Z","amount":1.23}]},"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["bid_id","bidder_id","date_bid","amount"],"properties":{"bid_id":{"type":"integer","format":"int32","description":"Unique ID for the bid","title":"get_corporations_corporation_id_contracts_contract_id_bids_bid_id"},"bidder_id":{"type":"integer","format":"int32","description":"Character ID of the bidder","title":"get_corporations_corporation_id_contracts_contract_id_bids_bidder_id"},"date_bid":{"type":"string","format":"date-time","description":"Datetime when the bid was placed","title":"get_corporations_corporation_id_contracts_contract_id_bids_date_bid"},"amount":{"type":"number","format":"float","description":"The amount bid, in ISK","title":"get_corporations_corporation_id_contracts_contract_id_bids_amount"}},"title":"get_corporations_corporation_id_contracts_contract_id_bids_200_ok","description":"200 ok object"},"title":"get_corporations_corporation_id_contracts_contract_id_bids_ok","description":"200 ok array"},"headers":{"X-Pages":{"description":"Maximum page number","type":"integer","format":"int32","default":1},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"x-required-roles":[],"security":[{"evesso":["esi-contracts.read_corporation_contracts.v1"]}],"operationId":"get_corporations_corporation_id_contracts_contract_id_bids","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/corporations/{corporation_id}/shareholders/":{"get":{"description":"Return the current member list of a corporation, the token's character need to be a member of the corporation.\n\n---\nAlternate route: `/dev/corporations/{corporation_id}/shareholders/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/shareholders/`\n\nAlternate route: `/v1/corporations/{corporation_id}/shareholders/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"Get corporation members","tags":["Corporation"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/page"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"List of member character IDs","examples":{"application/json":[{"shareholder_id":98000001,"shareholder_type":"corporation","share_count":580},{"shareholder_id":2112000003,"shareholder_type":"character","share_count":20},{"shareholder_id":2112000004,"shareholder_type":"character","share_count":300},{"shareholder_id":2112000001,"shareholder_type":"character","share_count":100}]},"schema":{"type":"array","maxItems":1000,"description":"A list of character IDs","items":{"type":"object","required":["shareholder_id","shareholder_type","share_count"],"properties":{"shareholder_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_shareholders_shareholder_id","description":"shareholder_id integer"},"shareholder_type":{"type":"string","enum":["character","corporation"],"title":"get_corporations_corporation_id_shareholders_shareholder_type","description":"shareholder_type string"},"share_count":{"type":"integer","format":"int64","title":"get_corporations_corporation_id_shareholders_share_count","description":"share_count integer"}},"title":"get_corporations_corporation_id_shareholders_200_ok","description":"200 ok object"},"title":"get_corporations_corporation_id_shareholders_ok"},"headers":{"X-Pages":{"description":"Maximum page number","type":"integer","format":"int32","default":1},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-wallet.read_corporation_wallets.v1"]}],"operationId":"get_corporations_corporation_id_shareholders","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/corporations/{corporation_id}/":{"get":{"description":"Public information about a corporation\n\n---\nAlternate route: `/v3/corporations/{corporation_id}/`\n\n---\nThis route is cached for up to 3600 seconds\n\n---\n[This route has an available update](https://esi.tech.ccp.is/diff/latest/dev/#GET-/corporations/{corporation_id}/)","summary":"Get corporation information","tags":["Corporation"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Public data about a corporation","examples":{"application/json":{"corporation_name":"C C P","ticker":"-CCP-","member_count":656,"ceo_id":180548812,"alliance_id":434243723,"corporation_description":"This is a corporation description, it's basically just a string","tax_rate":0.256,"creation_date":"2004-11-28T16:42:51Z","creator_id":180548812,"url":"http://www.eveonline.com"}},"schema":{"type":"object","required":["corporation_name","ticker","member_count","ceo_id","corporation_description","tax_rate","creator_id","url"],"properties":{"corporation_name":{"type":"string","description":"the full name of the corporation","title":"get_corporations_corporation_id_corporation_name"},"ticker":{"type":"string","description":"the short name of the corporation","title":"get_corporations_corporation_id_ticker"},"member_count":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_member_count","description":"member_count integer"},"ceo_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_ceo_id","description":"ceo_id integer"},"alliance_id":{"type":"integer","format":"int32","description":"id of alliance that corporation is a member of, if any","title":"get_corporations_corporation_id_alliance_id"},"corporation_description":{"type":"string","title":"get_corporations_corporation_id_corporation_description","description":"corporation_description string"},"tax_rate":{"type":"number","format":"float","minimum":0,"maximum":1,"title":"get_corporations_corporation_id_tax_rate","description":"tax_rate number"},"creation_date":{"type":"string","format":"date-time","title":"get_corporations_corporation_id_creation_date","description":"creation_date string"},"creator_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_creator_id","description":"creator_id integer"},"url":{"type":"string","title":"get_corporations_corporation_id_url","description":"url string"},"faction":{"type":"string","enum":["Minmatar","Gallente","Caldari","Amarr"],"title":"get_corporations_corporation_id_faction","description":"faction string"}},"title":"get_corporations_corporation_id_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"404":{"description":"Corporation not found","schema":{"type":"object","title":"get_corporations_corporation_id_not_found","description":"Not found","properties":{"error":{"type":"string","description":"Not found message","title":"get_corporations_corporation_id_404_not_found"}}},"examples":{"application/json":{"error":"Not found message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_corporations_corporation_id","x-cached-seconds":3600,"x-alternate-versions":["v3"]}},"/corporations/{corporation_id}/alliancehistory/":{"get":{"description":"Get a list of all the alliances a corporation has been a member of\n\n---\nAlternate route: `/dev/corporations/{corporation_id}/alliancehistory/`\n\nAlternate route: `/v2/corporations/{corporation_id}/alliancehistory/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"Get alliance history","tags":["Corporation"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Alliance history for the given corporation","examples":{"application/json":[{"record_id":23,"start_date":"2016-10-25T14:46:00Z","alliance_id":99000006,"is_deleted":true},{"record_id":1,"start_date":"2015-07-06T20:56:00Z"}]},"schema":{"type":"array","maxItems":10000,"items":{"type":"object","required":["start_date","record_id"],"properties":{"start_date":{"type":"string","format":"date-time","title":"get_corporations_corporation_id_alliancehistory_start_date","description":"start_date string"},"alliance_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_alliancehistory_alliance_id","description":"alliance_id integer"},"is_deleted":{"type":"boolean","description":"True if the alliance has been closed","title":"get_corporations_corporation_id_alliancehistory_is_deleted"},"record_id":{"type":"integer","format":"int32","description":"An incrementing ID that can be used to canonically establish order of records in cases where dates may be ambiguous","title":"get_corporations_corporation_id_alliancehistory_record_id"}},"title":"get_corporations_corporation_id_alliancehistory_200_ok","description":"200 ok object"},"title":"get_corporations_corporation_id_alliancehistory_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_corporations_corporation_id_alliancehistory","x-cached-seconds":3600,"x-alternate-versions":["dev","v2"]}},"/corporations/names/":{"get":{"description":"Resolve a set of corporation IDs to corporation names\n\n---\nAlternate route: `/legacy/corporations/names/`\n\nAlternate route: `/v1/corporations/names/`\n\n---\nThis route is cached for up to 3600 seconds\n\n---\n[This route has an available update](https://esi.tech.ccp.is/diff/latest/dev/#GET-/corporations/names/)","summary":"Get corporation names","tags":["Corporation"],"parameters":[{"name":"corporation_ids","in":"query","description":"A comma separated list of corporation IDs","required":true,"type":"array","minItems":1,"maxItems":100,"items":{"type":"integer","format":"int64"}},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"List of id/name associations","examples":{"application/json":[{"corporation_id":1000171,"corporation_name":"Republic University"}]},"schema":{"type":"array","maxItems":100,"items":{"type":"object","required":["corporation_id","corporation_name"],"properties":{"corporation_id":{"type":"integer","format":"int32","title":"get_corporations_names_corporation_id","description":"corporation_id integer"},"corporation_name":{"type":"string","title":"get_corporations_names_corporation_name","description":"corporation_name string"}},"title":"get_corporations_names_200_ok","description":"200 ok object"},"title":"get_corporations_names_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_corporations_names","x-cached-seconds":3600,"x-alternate-versions":["legacy","v1"]}},"/corporations/{corporation_id}/members/":{"get":{"description":"Read the current list of members if the calling character is a member.\n\n---\nAlternate route: `/legacy/corporations/{corporation_id}/members/`\n\nAlternate route: `/v2/corporations/{corporation_id}/members/`\n\n---\nThis route is cached for up to 3600 seconds\n\n---\n[This route has an available update](https://esi.tech.ccp.is/diff/latest/dev/#GET-/corporations/{corporation_id}/members/)","summary":"Get corporation members","tags":["Corporation"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"List of member character IDs","examples":{"application/json":[{"character_id":90000001},{"character_id":90000002}]},"schema":{"type":"array","maxItems":12601,"items":{"type":"object","required":["character_id"],"properties":{"character_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_members_character_id","description":"character_id integer"}},"title":"get_corporations_corporation_id_members_200_ok","description":"200 ok object"},"title":"get_corporations_corporation_id_members_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-corporations.read_corporation_membership.v1"]}],"operationId":"get_corporations_corporation_id_members","x-cached-seconds":3600,"x-alternate-versions":["legacy","v2"]}},"/corporations/{corporation_id}/roles/":{"get":{"description":"Return the roles of all members if the character has the personnel manager role or any grantable role.\n\n---\nAlternate route: `/dev/corporations/{corporation_id}/roles/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/roles/`\n\nAlternate route: `/v1/corporations/{corporation_id}/roles/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"Get corporation member roles","tags":["Corporation"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"List of member character ID's and roles","examples":{"application/json":[{"character_id":1000171,"roles":["Director","Station_Manager"]}]},"schema":{"type":"array","maxItems":12601,"items":{"type":"object","required":["character_id"],"properties":{"character_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_roles_character_id","description":"character_id integer"},"roles":{"type":"array","maxItems":50,"items":{"type":"string","uniqueItems":true,"enum":["Account_Take_1","Account_Take_2","Account_Take_3","Account_Take_4","Account_Take_5","Account_Take_6","Account_Take_7","Accountant","Auditor","Communications_Officer","Config_Equipment","Config_Starbase_Equipment","Container_Take_1","Container_Take_2","Container_Take_3","Container_Take_4","Container_Take_5","Container_Take_6","Container_Take_7","Contract_Manager","Diplomat","Director","Factory_Manager","Fitting_Manager","Hangar_Query_1","Hangar_Query_2","Hangar_Query_3","Hangar_Query_4","Hangar_Query_5","Hangar_Query_6","Hangar_Query_7","Hangar_Take_1","Hangar_Take_2","Hangar_Take_3","Hangar_Take_4","Hangar_Take_5","Hangar_Take_6","Hangar_Take_7","Junior_Accountant","Personnel_Manager","Rent_Factory_Facility","Rent_Office","Rent_Research_Facility","Security_Officer","Starbase_Defense_Operator","Starbase_Fuel_Technician","Station_Manager","Terrestrial_Combat_Officer","Terrestrial_Logistics_Officer","Trader"],"title":"get_corporations_corporation_id_roles_role","description":"role string"},"title":"get_corporations_corporation_id_roles_roles","description":"roles array"},"grantable_roles":{"type":"array","maxItems":50,"items":{"type":"string","uniqueItems":true,"enum":["Account_Take_1","Account_Take_2","Account_Take_3","Account_Take_4","Account_Take_5","Account_Take_6","Account_Take_7","Accountant","Auditor","Communications_Officer","Config_Equipment","Config_Starbase_Equipment","Container_Take_1","Container_Take_2","Container_Take_3","Container_Take_4","Container_Take_5","Container_Take_6","Container_Take_7","Contract_Manager","Diplomat","Director","Factory_Manager","Fitting_Manager","Hangar_Query_1","Hangar_Query_2","Hangar_Query_3","Hangar_Query_4","Hangar_Query_5","Hangar_Query_6","Hangar_Query_7","Hangar_Take_1","Hangar_Take_2","Hangar_Take_3","Hangar_Take_4","Hangar_Take_5","Hangar_Take_6","Hangar_Take_7","Junior_Accountant","Personnel_Manager","Rent_Factory_Facility","Rent_Office","Rent_Research_Facility","Security_Officer","Starbase_Defense_Operator","Starbase_Fuel_Technician","Station_Manager","Terrestrial_Combat_Officer","Terrestrial_Logistics_Officer","Trader"],"title":"get_corporations_corporation_id_roles_grantable_role","description":"grantable_role string"},"title":"get_corporations_corporation_id_roles_grantable_roles","description":"grantable_roles array"},"roles_at_hq":{"type":"array","maxItems":50,"items":{"type":"string","uniqueItems":true,"enum":["Account_Take_1","Account_Take_2","Account_Take_3","Account_Take_4","Account_Take_5","Account_Take_6","Account_Take_7","Accountant","Auditor","Communications_Officer","Config_Equipment","Config_Starbase_Equipment","Container_Take_1","Container_Take_2","Container_Take_3","Container_Take_4","Container_Take_5","Container_Take_6","Container_Take_7","Contract_Manager","Diplomat","Director","Factory_Manager","Fitting_Manager","Hangar_Query_1","Hangar_Query_2","Hangar_Query_3","Hangar_Query_4","Hangar_Query_5","Hangar_Query_6","Hangar_Query_7","Hangar_Take_1","Hangar_Take_2","Hangar_Take_3","Hangar_Take_4","Hangar_Take_5","Hangar_Take_6","Hangar_Take_7","Junior_Accountant","Personnel_Manager","Rent_Factory_Facility","Rent_Office","Rent_Research_Facility","Security_Officer","Starbase_Defense_Operator","Starbase_Fuel_Technician","Station_Manager","Terrestrial_Combat_Officer","Terrestrial_Logistics_Officer","Trader"],"title":"get_corporations_corporation_id_roles_roles_at_hq","description":"roles_at_hq string"},"title":"get_corporations_corporation_id_roles_roles_at_hq","description":"roles_at_hq array"},"grantable_roles_at_hq":{"type":"array","maxItems":50,"items":{"type":"string","uniqueItems":true,"enum":["Account_Take_1","Account_Take_2","Account_Take_3","Account_Take_4","Account_Take_5","Account_Take_6","Account_Take_7","Accountant","Auditor","Communications_Officer","Config_Equipment","Config_Starbase_Equipment","Container_Take_1","Container_Take_2","Container_Take_3","Container_Take_4","Container_Take_5","Container_Take_6","Container_Take_7","Contract_Manager","Diplomat","Director","Factory_Manager","Fitting_Manager","Hangar_Query_1","Hangar_Query_2","Hangar_Query_3","Hangar_Query_4","Hangar_Query_5","Hangar_Query_6","Hangar_Query_7","Hangar_Take_1","Hangar_Take_2","Hangar_Take_3","Hangar_Take_4","Hangar_Take_5","Hangar_Take_6","Hangar_Take_7","Junior_Accountant","Personnel_Manager","Rent_Factory_Facility","Rent_Office","Rent_Research_Facility","Security_Officer","Starbase_Defense_Operator","Starbase_Fuel_Technician","Station_Manager","Terrestrial_Combat_Officer","Terrestrial_Logistics_Officer","Trader"],"title":"get_corporations_corporation_id_roles_grantable_roles_at_hq","description":"grantable_roles_at_hq string"},"title":"get_corporations_corporation_id_roles_grantable_roles_at_hq","description":"grantable_roles_at_hq array"},"roles_at_base":{"type":"array","maxItems":50,"items":{"type":"string","uniqueItems":true,"enum":["Account_Take_1","Account_Take_2","Account_Take_3","Account_Take_4","Account_Take_5","Account_Take_6","Account_Take_7","Accountant","Auditor","Communications_Officer","Config_Equipment","Config_Starbase_Equipment","Container_Take_1","Container_Take_2","Container_Take_3","Container_Take_4","Container_Take_5","Container_Take_6","Container_Take_7","Contract_Manager","Diplomat","Director","Factory_Manager","Fitting_Manager","Hangar_Query_1","Hangar_Query_2","Hangar_Query_3","Hangar_Query_4","Hangar_Query_5","Hangar_Query_6","Hangar_Query_7","Hangar_Take_1","Hangar_Take_2","Hangar_Take_3","Hangar_Take_4","Hangar_Take_5","Hangar_Take_6","Hangar_Take_7","Junior_Accountant","Personnel_Manager","Rent_Factory_Facility","Rent_Office","Rent_Research_Facility","Security_Officer","Starbase_Defense_Operator","Starbase_Fuel_Technician","Station_Manager","Terrestrial_Combat_Officer","Terrestrial_Logistics_Officer","Trader"],"title":"get_corporations_corporation_id_roles_roles_at_base","description":"roles_at_base string"},"title":"get_corporations_corporation_id_roles_roles_at_base","description":"roles_at_base array"},"grantable_roles_at_base":{"type":"array","maxItems":50,"items":{"type":"string","uniqueItems":true,"enum":["Account_Take_1","Account_Take_2","Account_Take_3","Account_Take_4","Account_Take_5","Account_Take_6","Account_Take_7","Accountant","Auditor","Communications_Officer","Config_Equipment","Config_Starbase_Equipment","Container_Take_1","Container_Take_2","Container_Take_3","Container_Take_4","Container_Take_5","Container_Take_6","Container_Take_7","Contract_Manager","Diplomat","Director","Factory_Manager","Fitting_Manager","Hangar_Query_1","Hangar_Query_2","Hangar_Query_3","Hangar_Query_4","Hangar_Query_5","Hangar_Query_6","Hangar_Query_7","Hangar_Take_1","Hangar_Take_2","Hangar_Take_3","Hangar_Take_4","Hangar_Take_5","Hangar_Take_6","Hangar_Take_7","Junior_Accountant","Personnel_Manager","Rent_Factory_Facility","Rent_Office","Rent_Research_Facility","Security_Officer","Starbase_Defense_Operator","Starbase_Fuel_Technician","Station_Manager","Terrestrial_Combat_Officer","Terrestrial_Logistics_Officer","Trader"],"title":"get_corporations_corporation_id_roles_grantable_roles_at_base","description":"grantable_roles_at_base string"},"title":"get_corporations_corporation_id_roles_grantable_roles_at_base","description":"grantable_roles_at_base array"},"roles_at_other":{"type":"array","maxItems":50,"items":{"type":"string","uniqueItems":true,"enum":["Account_Take_1","Account_Take_2","Account_Take_3","Account_Take_4","Account_Take_5","Account_Take_6","Account_Take_7","Accountant","Auditor","Communications_Officer","Config_Equipment","Config_Starbase_Equipment","Container_Take_1","Container_Take_2","Container_Take_3","Container_Take_4","Container_Take_5","Container_Take_6","Container_Take_7","Contract_Manager","Diplomat","Director","Factory_Manager","Fitting_Manager","Hangar_Query_1","Hangar_Query_2","Hangar_Query_3","Hangar_Query_4","Hangar_Query_5","Hangar_Query_6","Hangar_Query_7","Hangar_Take_1","Hangar_Take_2","Hangar_Take_3","Hangar_Take_4","Hangar_Take_5","Hangar_Take_6","Hangar_Take_7","Junior_Accountant","Personnel_Manager","Rent_Factory_Facility","Rent_Office","Rent_Research_Facility","Security_Officer","Starbase_Defense_Operator","Starbase_Fuel_Technician","Station_Manager","Terrestrial_Combat_Officer","Terrestrial_Logistics_Officer","Trader"],"title":"get_corporations_corporation_id_roles_roles_at_other","description":"roles_at_other string"},"title":"get_corporations_corporation_id_roles_roles_at_other","description":"roles_at_other array"},"grantable_roles_at_other":{"type":"array","maxItems":50,"items":{"type":"string","uniqueItems":true,"enum":["Account_Take_1","Account_Take_2","Account_Take_3","Account_Take_4","Account_Take_5","Account_Take_6","Account_Take_7","Accountant","Auditor","Communications_Officer","Config_Equipment","Config_Starbase_Equipment","Container_Take_1","Container_Take_2","Container_Take_3","Container_Take_4","Container_Take_5","Container_Take_6","Container_Take_7","Contract_Manager","Diplomat","Director","Factory_Manager","Fitting_Manager","Hangar_Query_1","Hangar_Query_2","Hangar_Query_3","Hangar_Query_4","Hangar_Query_5","Hangar_Query_6","Hangar_Query_7","Hangar_Take_1","Hangar_Take_2","Hangar_Take_3","Hangar_Take_4","Hangar_Take_5","Hangar_Take_6","Hangar_Take_7","Junior_Accountant","Personnel_Manager","Rent_Factory_Facility","Rent_Office","Rent_Research_Facility","Security_Officer","Starbase_Defense_Operator","Starbase_Fuel_Technician","Station_Manager","Terrestrial_Combat_Officer","Terrestrial_Logistics_Officer","Trader"],"title":"get_corporations_corporation_id_roles_grantable_roles_at_other","description":"grantable_roles_at_other string"},"title":"get_corporations_corporation_id_roles_grantable_roles_at_other","description":"grantable_roles_at_other array"}},"title":"get_corporations_corporation_id_roles_200_ok","description":"200 ok object"},"title":"get_corporations_corporation_id_roles_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-corporations.read_corporation_membership.v1"]}],"operationId":"get_corporations_corporation_id_roles","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/corporations/{corporation_id}/roles/history/":{"get":{"description":"Return how roles have changed for a coporation's members, up to a month\n\n---\nAlternate route: `/dev/corporations/{corporation_id}/roles/history/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/roles/history/`\n\nAlternate route: `/v1/corporations/{corporation_id}/roles/history/`\n\n---\nThis route is cached for up to 3600 seconds\n\n---\nRequires one of the following EVE corporation role(s): Director\n","summary":"Get corporation member roles history","tags":["Corporation"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/page"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"List of role changes","examples":{"application/json":[{"character_id":12345,"changed_at":"2016-10-25T14:46:00Z","issuer_id":45678,"role_type":"roles","old_roles":["Diplomat"],"new_roles":["Station_Manager"]}]},"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["character_id","changed_at","issuer_id","role_type","old_roles","new_roles"],"properties":{"character_id":{"type":"integer","format":"int32","description":"The character whose roles are changed","title":"get_corporations_corporation_id_roles_history_character_id"},"changed_at":{"type":"string","format":"date-time","title":"get_corporations_corporation_id_roles_history_changed_at","description":"changed_at string"},"issuer_id":{"type":"integer","format":"int32","description":"ID of the character who issued this change","title":"get_corporations_corporation_id_roles_history_issuer_id"},"role_type":{"type":"string","enum":["grantable_roles","grantable_roles_at_base","grantable_roles_at_hq","grantable_roles_at_other","roles","roles_at_base","roles_at_hq","roles_at_other"],"title":"get_corporations_corporation_id_roles_history_role_type","description":"role_type string"},"old_roles":{"type":"array","maxItems":50,"items":{"type":"string","uniqueItems":true,"enum":["Account_Take_1","Account_Take_2","Account_Take_3","Account_Take_4","Account_Take_5","Account_Take_6","Account_Take_7","Accountant","Auditor","Communications_Officer","Config_Equipment","Config_Starbase_Equipment","Container_Take_1","Container_Take_2","Container_Take_3","Container_Take_4","Container_Take_5","Container_Take_6","Container_Take_7","Contract_Manager","Diplomat","Director","Factory_Manager","Fitting_Manager","Hangar_Query_1","Hangar_Query_2","Hangar_Query_3","Hangar_Query_4","Hangar_Query_5","Hangar_Query_6","Hangar_Query_7","Hangar_Take_1","Hangar_Take_2","Hangar_Take_3","Hangar_Take_4","Hangar_Take_5","Hangar_Take_6","Hangar_Take_7","Junior_Accountant","Personnel_Manager","Rent_Factory_Facility","Rent_Office","Rent_Research_Facility","Security_Officer","Starbase_Defense_Operator","Starbase_Fuel_Technician","Station_Manager","Terrestrial_Combat_Officer","Terrestrial_Logistics_Officer","Trader"],"title":"get_corporations_corporation_id_roles_history_old_role","description":"old_role string"},"title":"get_corporations_corporation_id_roles_history_old_roles","description":"old_roles array"},"new_roles":{"type":"array","maxItems":50,"items":{"type":"string","uniqueItems":true,"enum":["Account_Take_1","Account_Take_2","Account_Take_3","Account_Take_4","Account_Take_5","Account_Take_6","Account_Take_7","Accountant","Auditor","Communications_Officer","Config_Equipment","Config_Starbase_Equipment","Container_Take_1","Container_Take_2","Container_Take_3","Container_Take_4","Container_Take_5","Container_Take_6","Container_Take_7","Contract_Manager","Diplomat","Director","Factory_Manager","Fitting_Manager","Hangar_Query_1","Hangar_Query_2","Hangar_Query_3","Hangar_Query_4","Hangar_Query_5","Hangar_Query_6","Hangar_Query_7","Hangar_Take_1","Hangar_Take_2","Hangar_Take_3","Hangar_Take_4","Hangar_Take_5","Hangar_Take_6","Hangar_Take_7","Junior_Accountant","Personnel_Manager","Rent_Factory_Facility","Rent_Office","Rent_Research_Facility","Security_Officer","Starbase_Defense_Operator","Starbase_Fuel_Technician","Station_Manager","Terrestrial_Combat_Officer","Terrestrial_Logistics_Officer","Trader"],"title":"get_corporations_corporation_id_roles_history_new_role","description":"new_role string"},"title":"get_corporations_corporation_id_roles_history_new_roles","description":"new_roles array"}},"title":"get_corporations_corporation_id_roles_history_200_ok","description":"200 ok object"},"title":"get_corporations_corporation_id_roles_history_ok","description":"200 ok array"},"headers":{"X-Pages":{"description":"Maximum page number","type":"integer","format":"int32","default":1},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"x-required-roles":["Director"],"security":[{"evesso":["esi-corporations.read_corporation_membership.v1"]}],"operationId":"get_corporations_corporation_id_roles_history","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/corporations/{corporation_id}/icons/":{"get":{"description":"Get the icon urls for a corporation\n\n---\nAlternate route: `/dev/corporations/{corporation_id}/icons/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/icons/`\n\nAlternate route: `/v1/corporations/{corporation_id}/icons/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"Get corporation icon","tags":["Corporation"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Urls for icons for the given corporation id and server","examples":{"application/json":{"px64x64":"https://imageserver.eveonline.com/Corporation/1000010_64.png","px128x128":"https://imageserver.eveonline.com/Corporation/1000010_128.png","px256x256":"https://imageserver.eveonline.com/Corporation/1000010_256.png"}},"schema":{"type":"object","properties":{"px64x64":{"type":"string","title":"get_corporations_corporation_id_icons_px64x64","description":"px64x64 string"},"px128x128":{"type":"string","title":"get_corporations_corporation_id_icons_px128x128","description":"px128x128 string"},"px256x256":{"type":"string","title":"get_corporations_corporation_id_icons_px256x256","description":"px256x256 string"}},"title":"get_corporations_corporation_id_icons_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"404":{"description":"No image server for this datasource","examples":{"application/json":{"error":"No image server for this datasource"}},"schema":{"type":"object","description":"No image server for this datasource","properties":{"error":{"type":"string","description":"error message","title":"get_corporations_corporation_id_icons_error"}},"title":"get_corporations_corporation_id_icons_not_found"}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_corporations_corporation_id_icons","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/corporations/npccorps/":{"get":{"description":"Get a list of npc corporations\n\n---\nAlternate route: `/dev/corporations/npccorps/`\n\nAlternate route: `/legacy/corporations/npccorps/`\n\nAlternate route: `/v1/corporations/npccorps/`\n\n---\nThis route expires daily at 11:05","summary":"Get npc corporations","tags":["Corporation"],"responses":{"200":{"description":"A list of npc corporation ids","examples":{"application/json":[1000001,1000002,1000003]},"schema":{"type":"array","maxItems":500,"items":{"type":"integer","format":"int32","title":"get_corporations_npccorps_200_ok","description":"200 ok integer"},"title":"get_corporations_npccorps_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"operationId":"get_corporations_npccorps","x-alternate-versions":["dev","legacy","v1"]}},"/corporations/{corporation_id}/structures/":{"get":{"description":"Get a list of corporation structures\n\n---\nAlternate route: `/dev/corporations/{corporation_id}/structures/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/structures/`\n\nAlternate route: `/v1/corporations/{corporation_id}/structures/`\n\n---\nThis route is cached for up to 3600 seconds\n\n---\nRequires one of the following EVE corporation role(s): StationManager\n","summary":"Get corporation structures","tags":["Corporation"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/language"},{"$ref":"#/parameters/page"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"List of corporation structures' information","examples":{"application/json":[{"structure_id":1021975535893,"type_id":35833,"corporation_id":667531913,"system_id":30004763,"profile_id":11237,"current_vul":[{"day":1,"hour":2}],"next_vul":[{"day":3,"hour":4}]}]},"schema":{"type":"array","maxItems":250,"items":{"type":"object","required":["structure_id","type_id","corporation_id","system_id","profile_id","current_vul","next_vul"],"properties":{"structure_id":{"type":"integer","format":"int64","description":"The Item ID of the structure","title":"get_corporations_corporation_id_structures_structure_id"},"type_id":{"type":"integer","format":"int32","description":"The type id of the structure","title":"get_corporations_corporation_id_structures_type_id"},"corporation_id":{"type":"integer","format":"int32","description":"ID of the corporation that owns the structure","title":"get_corporations_corporation_id_structures_corporation_id"},"system_id":{"type":"integer","format":"int32","description":"The solar system the structure is in","title":"get_corporations_corporation_id_structures_system_id"},"profile_id":{"type":"integer","format":"int32","description":"The id of the ACL profile for this citadel","title":"get_corporations_corporation_id_structures_profile_id"},"current_vul":{"type":"array","description":"This week's vulnerability windows, Monday is day 0","maxItems":168,"items":{"type":"object","required":["day","hour"],"properties":{"day":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_structures_day","description":"day integer"},"hour":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_structures_hour","description":"hour integer"}},"title":"get_corporations_corporation_id_structures_current_vul","description":"current_vul object"},"title":"get_corporations_corporation_id_structures_current_vul"},"next_vul":{"type":"array","description":"Next week's vulnerability windows, Monday is day 0","maxItems":168,"items":{"type":"object","required":["day","hour"],"properties":{"day":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_structures_day","description":"day integer"},"hour":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_structures_hour","description":"hour integer"}},"title":"get_corporations_corporation_id_structures_next_vul","description":"next_vul object"},"title":"get_corporations_corporation_id_structures_next_vul"},"fuel_expires":{"type":"string","format":"date-time","description":"Date on which the structure will run out of fuel","title":"get_corporations_corporation_id_structures_fuel_expires"},"services":{"type":"array","description":"Contains a list of service upgrades, and their state","maxItems":10,"items":{"type":"object","required":["name","state"],"properties":{"name":{"type":"string","title":"get_corporations_corporation_id_structures_name","description":"name string"},"state":{"type":"string","enum":["online","offline","cleanup"],"title":"get_corporations_corporation_id_structures_state","description":"state string"}},"title":"get_corporations_corporation_id_structures_service","description":"service object"},"title":"get_corporations_corporation_id_structures_services"},"state_timer_start":{"type":"string","format":"date-time","description":"Date at which the structure entered it's current state","title":"get_corporations_corporation_id_structures_state_timer_start"},"state_timer_end":{"type":"string","format":"date-time","description":"Date at which the structure will move to it's next state","title":"get_corporations_corporation_id_structures_state_timer_end"},"unanchors_at":{"type":"string","format":"date-time","description":"Date at which the structure will unanchor","title":"get_corporations_corporation_id_structures_unanchors_at"}},"title":"get_corporations_corporation_id_structures_200_ok","description":"200 ok object"},"title":"get_corporations_corporation_id_structures_ok","description":"200 ok array"},"headers":{"X-Pages":{"description":"Maximum page number","type":"integer","format":"int32","default":1},"Content-Language":{"description":"The language used in the response","type":"string","enum":["de","en-us","fr","ja","ru","zh"]},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"x-required-roles":["StationManager"],"security":[{"evesso":["esi-corporations.read_structures.v1"]}],"operationId":"get_corporations_corporation_id_structures","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/corporations/{corporation_id}/structures/{structure_id}/":{"put":{"description":"Update the vulnerability window schedule of a corporation structure\n\n---\nAlternate route: `/dev/corporations/{corporation_id}/structures/{structure_id}/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/structures/{structure_id}/`\n\nAlternate route: `/v1/corporations/{corporation_id}/structures/{structure_id}/`\n","summary":"Update structure vulnerability schedule","tags":["Corporation"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"name":"new_schedule","in":"body","description":"New vulnerability window schedule for the structure","required":true,"schema":{"type":"array","minItems":1,"maxItems":168,"items":{"type":"object","required":["day","hour"],"properties":{"day":{"type":"integer","format":"int32","description":"Day of the week, zero-indexed to Monday","minimum":0,"maximum":6,"title":"put_corporations_corporation_id_structures_structure_id_day"},"hour":{"type":"integer","format":"int32","description":"Hour of the day evetime, zero-indexed to midnight","minimum":0,"maximum":23,"title":"put_corporations_corporation_id_structures_structure_id_hour"}},"title":"put_corporations_corporation_id_structures_structure_id_new_schedule","description":"new_schedule object"},"title":"put_corporations_corporation_id_structures_structure_id_new_schedule","description":"new_schedule array"}},{"name":"structure_id","in":"path","description":"A structure ID","required":true,"type":"integer","format":"int64"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"204":{"description":"Structure vulnerability window updated"},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-corporations.write_structures.v1"]}],"operationId":"put_corporations_corporation_id_structures_structure_id","x-alternate-versions":["dev","legacy","v1"]}},"/corporations/{corporation_id}/membertracking/":{"get":{"description":"Returns additional information about a corporation's members which helps tracking their activities\n\n---\nAlternate route: `/dev/corporations/{corporation_id}/membertracking/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/membertracking/`\n\nAlternate route: `/v1/corporations/{corporation_id}/membertracking/`\n\n---\nThis route is cached for up to 3600 seconds\n\n---\nRequires one of the following EVE corporation role(s): Director\n","summary":"Track corporation members","tags":["Corporation"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"List of member character IDs","examples":{"application/json":[{"character_id":2112000001,"start_date":"2017-07-10T14:46:00Z","logon_date":"2017-08-03T14:22:03Z","logoff_date":"2017-08-03T14:31:16Z","location_id":30003657,"ship_type_id":22464},{"character_id":2112000002,"start_date":"2017-07-10T14:50:00Z","logon_date":"2017-07-25T10:54:00Z","logoff_date":"2017-07-25T11:07:40Z","location_id":30003657,"ship_type_id":670}]},"schema":{"type":"array","maxItems":12601,"items":{"type":"object","required":["character_id"],"properties":{"character_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_membertracking_character_id","description":"character_id integer"},"start_date":{"type":"string","format":"date-time","title":"get_corporations_corporation_id_membertracking_start_date","description":"start_date string"},"base_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_membertracking_base_id","description":"base_id integer"},"logon_date":{"type":"string","format":"date-time","title":"get_corporations_corporation_id_membertracking_logon_date","description":"logon_date string"},"logoff_date":{"type":"string","format":"date-time","title":"get_corporations_corporation_id_membertracking_logoff_date","description":"logoff_date string"},"location_id":{"type":"integer","format":"int64","title":"get_corporations_corporation_id_membertracking_location_id","description":"location_id integer"},"ship_type_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_membertracking_ship_type_id","description":"ship_type_id integer"}},"title":"get_corporations_corporation_id_membertracking_200_ok","description":"200 ok object"},"title":"get_corporations_corporation_id_membertracking_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"x-required-roles":["Director"],"security":[{"evesso":["esi-corporations.track_members.v1"]}],"operationId":"get_corporations_corporation_id_membertracking","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/corporations/{corporation_id}/divisions/":{"get":{"description":"Return corporation hangar and wallet division names, only show if a division is not using the default name\n\n---\nAlternate route: `/dev/corporations/{corporation_id}/divisions/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/divisions/`\n\nAlternate route: `/v1/corporations/{corporation_id}/divisions/`\n\n---\nThis route is cached for up to 3600 seconds\n\n---\nRequires one of the following EVE corporation role(s): Director\n","summary":"Get corporation divisions","tags":["Corporation"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"List of corporation division names","examples":{"application/json":{"hangar":[{"division":1,"name":"Awesome Hangar 1"}],"wallet":[{"division":1,"name":"Rich Wallet 1"}]}},"schema":{"type":"object","properties":{"hangar":{"type":"array","maxItems":7,"items":{"type":"object","properties":{"division":{"type":"integer","format":"int32","minimum":1,"maximum":7,"title":"get_corporations_corporation_id_divisions_division","description":"division integer"},"name":{"type":"string","maxLength":50,"title":"get_corporations_corporation_id_divisions_name","description":"name string"}},"title":"get_corporations_corporation_id_divisions_hangar","description":"hangar object"},"title":"get_corporations_corporation_id_divisions_hangar","description":"hangar array"},"wallet":{"type":"array","maxItems":7,"items":{"type":"object","properties":{"division":{"type":"integer","format":"int32","minimum":1,"maximum":7,"title":"get_corporations_corporation_id_divisions_division","description":"division integer"},"name":{"type":"string","maxLength":50,"title":"get_corporations_corporation_id_divisions_name","description":"name string"}},"title":"get_corporations_corporation_id_divisions_wallet","description":"wallet object"},"title":"get_corporations_corporation_id_divisions_wallet","description":"wallet array"}},"title":"get_corporations_corporation_id_divisions_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"x-required-roles":["Director"],"security":[{"evesso":["esi-corporations.read_divisions.v1"]}],"operationId":"get_corporations_corporation_id_divisions","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/corporations/{corporation_id}/members/limit/":{"get":{"description":"Return a corporation's member limit, not including CEO himself\n\n---\nAlternate route: `/dev/corporations/{corporation_id}/members/limit/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/members/limit/`\n\nAlternate route: `/v1/corporations/{corporation_id}/members/limit/`\n\n---\nThis route is cached for up to 3600 seconds\n\n---\nRequires one of the following EVE corporation role(s): Director\n","summary":"Get corporation member limit","tags":["Corporation"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"The corporation's member limit","examples":{"application/json":40},"schema":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_members_limit_ok","description":"200 ok integer"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"x-required-roles":["Director"],"security":[{"evesso":["esi-corporations.track_members.v1"]}],"operationId":"get_corporations_corporation_id_members_limit","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/corporations/{corporation_id}/titles/":{"get":{"description":"Returns a corporation's titles\n\n---\nAlternate route: `/dev/corporations/{corporation_id}/titles/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/titles/`\n\nAlternate route: `/v1/corporations/{corporation_id}/titles/`\n\n---\nThis route is cached for up to 3600 seconds\n\n---\nRequires one of the following EVE corporation role(s): Director\n","summary":"Get corporation titles","tags":["Corporation"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of titles","examples":{"application/json":[{"title_id":1,"name":"Awesome Title","roles":["Hangar_Take_6","Hangar_Query_2"]}]},"schema":{"type":"array","maxItems":16,"items":{"type":"object","properties":{"title_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_titles_title_id","description":"title_id integer"},"name":{"type":"string","title":"get_corporations_corporation_id_titles_name","description":"name string"},"roles":{"type":"array","maxItems":50,"items":{"type":"string","uniqueItems":true,"enum":["Account_Take_1","Account_Take_2","Account_Take_3","Account_Take_4","Account_Take_5","Account_Take_6","Account_Take_7","Accountant","Auditor","Communications_Officer","Config_Equipment","Config_Starbase_Equipment","Container_Take_1","Container_Take_2","Container_Take_3","Container_Take_4","Container_Take_5","Container_Take_6","Container_Take_7","Contract_Manager","Diplomat","Director","Factory_Manager","Fitting_Manager","Hangar_Query_1","Hangar_Query_2","Hangar_Query_3","Hangar_Query_4","Hangar_Query_5","Hangar_Query_6","Hangar_Query_7","Hangar_Take_1","Hangar_Take_2","Hangar_Take_3","Hangar_Take_4","Hangar_Take_5","Hangar_Take_6","Hangar_Take_7","Junior_Accountant","Personnel_Manager","Rent_Factory_Facility","Rent_Office","Rent_Research_Facility","Security_Officer","Starbase_Defense_Operator","Starbase_Fuel_Technician","Station_Manager","Terrestrial_Combat_Officer","Terrestrial_Logistics_Officer","Trader"],"title":"get_corporations_corporation_id_titles_role","description":"role string"},"title":"get_corporations_corporation_id_titles_roles","description":"roles array"},"grantable_roles":{"type":"array","maxItems":50,"items":{"type":"string","uniqueItems":true,"enum":["Account_Take_1","Account_Take_2","Account_Take_3","Account_Take_4","Account_Take_5","Account_Take_6","Account_Take_7","Accountant","Auditor","Communications_Officer","Config_Equipment","Config_Starbase_Equipment","Container_Take_1","Container_Take_2","Container_Take_3","Container_Take_4","Container_Take_5","Container_Take_6","Container_Take_7","Contract_Manager","Diplomat","Director","Factory_Manager","Fitting_Manager","Hangar_Query_1","Hangar_Query_2","Hangar_Query_3","Hangar_Query_4","Hangar_Query_5","Hangar_Query_6","Hangar_Query_7","Hangar_Take_1","Hangar_Take_2","Hangar_Take_3","Hangar_Take_4","Hangar_Take_5","Hangar_Take_6","Hangar_Take_7","Junior_Accountant","Personnel_Manager","Rent_Factory_Facility","Rent_Office","Rent_Research_Facility","Security_Officer","Starbase_Defense_Operator","Starbase_Fuel_Technician","Station_Manager","Terrestrial_Combat_Officer","Terrestrial_Logistics_Officer","Trader"],"title":"get_corporations_corporation_id_titles_grantable_role","description":"grantable_role string"},"title":"get_corporations_corporation_id_titles_grantable_roles","description":"grantable_roles array"},"roles_at_hq":{"type":"array","maxItems":50,"items":{"type":"string","uniqueItems":true,"enum":["Account_Take_1","Account_Take_2","Account_Take_3","Account_Take_4","Account_Take_5","Account_Take_6","Account_Take_7","Accountant","Auditor","Communications_Officer","Config_Equipment","Config_Starbase_Equipment","Container_Take_1","Container_Take_2","Container_Take_3","Container_Take_4","Container_Take_5","Container_Take_6","Container_Take_7","Contract_Manager","Diplomat","Director","Factory_Manager","Fitting_Manager","Hangar_Query_1","Hangar_Query_2","Hangar_Query_3","Hangar_Query_4","Hangar_Query_5","Hangar_Query_6","Hangar_Query_7","Hangar_Take_1","Hangar_Take_2","Hangar_Take_3","Hangar_Take_4","Hangar_Take_5","Hangar_Take_6","Hangar_Take_7","Junior_Accountant","Personnel_Manager","Rent_Factory_Facility","Rent_Office","Rent_Research_Facility","Security_Officer","Starbase_Defense_Operator","Starbase_Fuel_Technician","Station_Manager","Terrestrial_Combat_Officer","Terrestrial_Logistics_Officer","Trader"],"title":"get_corporations_corporation_id_titles_roles_at_hq","description":"roles_at_hq string"},"title":"get_corporations_corporation_id_titles_roles_at_hq","description":"roles_at_hq array"},"grantable_roles_at_hq":{"type":"array","maxItems":50,"items":{"type":"string","uniqueItems":true,"enum":["Account_Take_1","Account_Take_2","Account_Take_3","Account_Take_4","Account_Take_5","Account_Take_6","Account_Take_7","Accountant","Auditor","Communications_Officer","Config_Equipment","Config_Starbase_Equipment","Container_Take_1","Container_Take_2","Container_Take_3","Container_Take_4","Container_Take_5","Container_Take_6","Container_Take_7","Contract_Manager","Diplomat","Director","Factory_Manager","Fitting_Manager","Hangar_Query_1","Hangar_Query_2","Hangar_Query_3","Hangar_Query_4","Hangar_Query_5","Hangar_Query_6","Hangar_Query_7","Hangar_Take_1","Hangar_Take_2","Hangar_Take_3","Hangar_Take_4","Hangar_Take_5","Hangar_Take_6","Hangar_Take_7","Junior_Accountant","Personnel_Manager","Rent_Factory_Facility","Rent_Office","Rent_Research_Facility","Security_Officer","Starbase_Defense_Operator","Starbase_Fuel_Technician","Station_Manager","Terrestrial_Combat_Officer","Terrestrial_Logistics_Officer","Trader"],"title":"get_corporations_corporation_id_titles_grantable_roles_at_hq","description":"grantable_roles_at_hq string"},"title":"get_corporations_corporation_id_titles_grantable_roles_at_hq","description":"grantable_roles_at_hq array"},"roles_at_base":{"type":"array","maxItems":50,"items":{"type":"string","uniqueItems":true,"enum":["Account_Take_1","Account_Take_2","Account_Take_3","Account_Take_4","Account_Take_5","Account_Take_6","Account_Take_7","Accountant","Auditor","Communications_Officer","Config_Equipment","Config_Starbase_Equipment","Container_Take_1","Container_Take_2","Container_Take_3","Container_Take_4","Container_Take_5","Container_Take_6","Container_Take_7","Contract_Manager","Diplomat","Director","Factory_Manager","Fitting_Manager","Hangar_Query_1","Hangar_Query_2","Hangar_Query_3","Hangar_Query_4","Hangar_Query_5","Hangar_Query_6","Hangar_Query_7","Hangar_Take_1","Hangar_Take_2","Hangar_Take_3","Hangar_Take_4","Hangar_Take_5","Hangar_Take_6","Hangar_Take_7","Junior_Accountant","Personnel_Manager","Rent_Factory_Facility","Rent_Office","Rent_Research_Facility","Security_Officer","Starbase_Defense_Operator","Starbase_Fuel_Technician","Station_Manager","Terrestrial_Combat_Officer","Terrestrial_Logistics_Officer","Trader"],"title":"get_corporations_corporation_id_titles_roles_at_base","description":"roles_at_base string"},"title":"get_corporations_corporation_id_titles_roles_at_base","description":"roles_at_base array"},"grantable_roles_at_base":{"type":"array","maxItems":50,"items":{"type":"string","uniqueItems":true,"enum":["Account_Take_1","Account_Take_2","Account_Take_3","Account_Take_4","Account_Take_5","Account_Take_6","Account_Take_7","Accountant","Auditor","Communications_Officer","Config_Equipment","Config_Starbase_Equipment","Container_Take_1","Container_Take_2","Container_Take_3","Container_Take_4","Container_Take_5","Container_Take_6","Container_Take_7","Contract_Manager","Diplomat","Director","Factory_Manager","Fitting_Manager","Hangar_Query_1","Hangar_Query_2","Hangar_Query_3","Hangar_Query_4","Hangar_Query_5","Hangar_Query_6","Hangar_Query_7","Hangar_Take_1","Hangar_Take_2","Hangar_Take_3","Hangar_Take_4","Hangar_Take_5","Hangar_Take_6","Hangar_Take_7","Junior_Accountant","Personnel_Manager","Rent_Factory_Facility","Rent_Office","Rent_Research_Facility","Security_Officer","Starbase_Defense_Operator","Starbase_Fuel_Technician","Station_Manager","Terrestrial_Combat_Officer","Terrestrial_Logistics_Officer","Trader"],"title":"get_corporations_corporation_id_titles_grantable_roles_at_base","description":"grantable_roles_at_base string"},"title":"get_corporations_corporation_id_titles_grantable_roles_at_base","description":"grantable_roles_at_base array"},"roles_at_other":{"type":"array","maxItems":50,"items":{"type":"string","uniqueItems":true,"enum":["Account_Take_1","Account_Take_2","Account_Take_3","Account_Take_4","Account_Take_5","Account_Take_6","Account_Take_7","Accountant","Auditor","Communications_Officer","Config_Equipment","Config_Starbase_Equipment","Container_Take_1","Container_Take_2","Container_Take_3","Container_Take_4","Container_Take_5","Container_Take_6","Container_Take_7","Contract_Manager","Diplomat","Director","Factory_Manager","Fitting_Manager","Hangar_Query_1","Hangar_Query_2","Hangar_Query_3","Hangar_Query_4","Hangar_Query_5","Hangar_Query_6","Hangar_Query_7","Hangar_Take_1","Hangar_Take_2","Hangar_Take_3","Hangar_Take_4","Hangar_Take_5","Hangar_Take_6","Hangar_Take_7","Junior_Accountant","Personnel_Manager","Rent_Factory_Facility","Rent_Office","Rent_Research_Facility","Security_Officer","Starbase_Defense_Operator","Starbase_Fuel_Technician","Station_Manager","Terrestrial_Combat_Officer","Terrestrial_Logistics_Officer","Trader"],"title":"get_corporations_corporation_id_titles_roles_at_other","description":"roles_at_other string"},"title":"get_corporations_corporation_id_titles_roles_at_other","description":"roles_at_other array"},"grantable_roles_at_other":{"type":"array","maxItems":50,"items":{"type":"string","uniqueItems":true,"enum":["Account_Take_1","Account_Take_2","Account_Take_3","Account_Take_4","Account_Take_5","Account_Take_6","Account_Take_7","Accountant","Auditor","Communications_Officer","Config_Equipment","Config_Starbase_Equipment","Container_Take_1","Container_Take_2","Container_Take_3","Container_Take_4","Container_Take_5","Container_Take_6","Container_Take_7","Contract_Manager","Diplomat","Director","Factory_Manager","Fitting_Manager","Hangar_Query_1","Hangar_Query_2","Hangar_Query_3","Hangar_Query_4","Hangar_Query_5","Hangar_Query_6","Hangar_Query_7","Hangar_Take_1","Hangar_Take_2","Hangar_Take_3","Hangar_Take_4","Hangar_Take_5","Hangar_Take_6","Hangar_Take_7","Junior_Accountant","Personnel_Manager","Rent_Factory_Facility","Rent_Office","Rent_Research_Facility","Security_Officer","Starbase_Defense_Operator","Starbase_Fuel_Technician","Station_Manager","Terrestrial_Combat_Officer","Terrestrial_Logistics_Officer","Trader"],"title":"get_corporations_corporation_id_titles_grantable_roles_at_other","description":"grantable_roles_at_other string"},"title":"get_corporations_corporation_id_titles_grantable_roles_at_other","description":"grantable_roles_at_other array"}},"title":"get_corporations_corporation_id_titles_200_ok","description":"200 ok object"},"title":"get_corporations_corporation_id_titles_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"x-required-roles":["Director"],"security":[{"evesso":["esi-corporations.read_titles.v1"]}],"operationId":"get_corporations_corporation_id_titles","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/corporations/{corporation_id}/members/titles/":{"get":{"description":"Returns a corporation's members' titles\n\n---\nAlternate route: `/dev/corporations/{corporation_id}/members/titles/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/members/titles/`\n\nAlternate route: `/v1/corporations/{corporation_id}/members/titles/`\n\n---\nThis route is cached for up to 3600 seconds\n\n---\nRequires one of the following EVE corporation role(s): Director\n","summary":"Get corporation's members' titles","tags":["Corporation"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of members and theirs titles","examples":{"application/json":[{"character_id":12345,"titles":[]}]},"schema":{"type":"array","maxItems":12601,"items":{"type":"object","required":["character_id","titles"],"properties":{"character_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_members_titles_character_id","description":"character_id integer"},"titles":{"type":"array","maxItems":16,"description":"A list of title_id","items":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_members_titles_title","description":"title integer"},"title":"get_corporations_corporation_id_members_titles_titles"}},"title":"get_corporations_corporation_id_members_titles_200_ok","description":"200 ok object"},"title":"get_corporations_corporation_id_members_titles_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"x-required-roles":["Director"],"security":[{"evesso":["esi-corporations.read_titles.v1"]}],"operationId":"get_corporations_corporation_id_members_titles","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/corporations/{corporation_id}/blueprints/":{"get":{"description":"Returns a list of blueprints the corporation owns\n\n---\nAlternate route: `/dev/corporations/{corporation_id}/blueprints/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/blueprints/`\n\nAlternate route: `/v1/corporations/{corporation_id}/blueprints/`\n\n---\nThis route is cached for up to 3600 seconds\n\n---\nRequires one of the following EVE corporation role(s): Director\n","summary":"Get corporation blueprints","tags":["Corporation"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/page"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"List of corporation blueprints","examples":{"application/json":[{"item_id":1000000010495,"type_id":691,"location_id":60014719,"location_flag":"CorpSAG1","quantity":1,"time_efficiency":0,"material_efficiency":0,"runs":-1}]},"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["item_id","type_id","location_id","location_flag","quantity","time_efficiency","material_efficiency","runs"],"properties":{"item_id":{"type":"integer","format":"int64","description":"Unique ID for this item.","title":"get_corporations_corporation_id_blueprints_item_id"},"type_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_blueprints_type_id","description":"type_id integer"},"location_id":{"type":"integer","format":"int64","description":"References a solar system, station or item_id if this blueprint is located within a container.","title":"get_corporations_corporation_id_blueprints_location_id"},"location_flag":{"type":"string","description":"Type of the location_id","enum":["AssetSafety","AutoFit","Bonus","Booster","BoosterBay","Capsule","Cargo","CorpDeliveries","CorpSAG1","CorpSAG2","CorpSAG3","CorpSAG4","CorpSAG5","CorpSAG6","CorpSAG7","CrateLoot","Deliveries","DroneBay","DustBattle","DustDatabank","FighterBay","FighterTube0","FighterTube1","FighterTube2","FighterTube3","FighterTube4","FleetHangar","Hangar","HangarAll","HiSlot0","HiSlot1","HiSlot2","HiSlot3","HiSlot4","HiSlot5","HiSlot6","HiSlot7","HiddenModifers","Implant","Impounded","JunkyardReprocessed","JunkyardTrashed","LoSlot0","LoSlot1","LoSlot2","LoSlot3","LoSlot4","LoSlot5","LoSlot6","LoSlot7","Locked","MedSlot0","MedSlot1","MedSlot2","MedSlot3","MedSlot4","MedSlot5","MedSlot6","MedSlot7","OfficeFolder","Pilot","PlanetSurface","QuafeBay","Reward","RigSlot0","RigSlot1","RigSlot2","RigSlot3","RigSlot4","RigSlot5","RigSlot6","RigSlot7","SecondaryStorage","ServiceSlot0","ServiceSlot1","ServiceSlot2","ServiceSlot3","ServiceSlot4","ServiceSlot5","ServiceSlot6","ServiceSlot7","ShipHangar","ShipOffline","Skill","SkillInTraining","SpecializedAmmoHold","SpecializedCommandCenterHold","SpecializedFuelBay","SpecializedGasHold","SpecializedIndustrialShipHold","SpecializedLargeShipHold","SpecializedMaterialBay","SpecializedMediumShipHold","SpecializedMineralHold","SpecializedOreHold","SpecializedPlanetaryCommoditiesHold","SpecializedSalvageHold","SpecializedShipHold","SpecializedSmallShipHold","StructureActive","StructureFuel","StructureInactive","StructureOffline","SubSystemSlot0","SubSystemSlot1","SubSystemSlot2","SubSystemSlot3","SubSystemSlot4","SubSystemSlot5","SubSystemSlot6","SubSystemSlot7","SubsystemBay","Unlocked","Wallet","Wardrobe"],"title":"get_corporations_corporation_id_blueprints_location_flag"},"quantity":{"type":"integer","format":"int32","description":"A range of numbers with a minimum of -2 and no maximum value where -1 is an original and -2 is a copy. It can be a positive integer if it is a stack of blueprint originals fresh from the market (e.g. no activities performed on them yet).","minimum":-2,"title":"get_corporations_corporation_id_blueprints_quantity"},"time_efficiency":{"type":"integer","format":"int32","description":"Time Efficiency Level of the blueprint.","minimum":0,"maximum":20,"title":"get_corporations_corporation_id_blueprints_time_efficiency"},"material_efficiency":{"type":"integer","format":"int32","description":"Material Efficiency Level of the blueprint.","minimum":0,"maximum":25,"title":"get_corporations_corporation_id_blueprints_material_efficiency"},"runs":{"type":"integer","format":"int32","description":"Number of runs remaining if the blueprint is a copy, -1 if it is an original.","minimum":-1,"title":"get_corporations_corporation_id_blueprints_runs"}},"title":"get_corporations_corporation_id_blueprints_200_ok","description":"200 ok object"},"title":"get_corporations_corporation_id_blueprints_ok","description":"200 ok array"},"headers":{"X-Pages":{"description":"Maximum page number","type":"integer","format":"int32","default":1},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"x-required-roles":["Director"],"security":[{"evesso":["esi-corporations.read_blueprints.v1"]}],"operationId":"get_corporations_corporation_id_blueprints","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/corporations/{corporation_id}/standings/":{"get":{"description":"Return corporation standings from agents, NPC corporations, and factions\n\n---\nAlternate route: `/dev/corporations/{corporation_id}/standings/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/standings/`\n\nAlternate route: `/v1/corporations/{corporation_id}/standings/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"Get corporation standings","tags":["Corporation"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/page"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of standings","examples":{"application/json":[{"from_id":3009841,"from_type":"agent","standing":0.1},{"from_id":1000061,"from_type":"npc_corp","standing":0},{"from_id":500003,"from_type":"faction","standing":-1}]},"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["from_id","from_type","standing"],"properties":{"from_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_standings_from_id","description":"from_id integer"},"from_type":{"type":"string","enum":["agent","npc_corp","faction"],"title":"get_corporations_corporation_id_standings_from_type","description":"from_type string"},"standing":{"type":"number","format":"float","minimum":-10,"maximum":10,"title":"get_corporations_corporation_id_standings_standing","description":"standing number"}},"title":"get_corporations_corporation_id_standings_200_ok","description":"200 ok object"},"title":"get_corporations_corporation_id_standings_ok","description":"200 ok array"},"headers":{"X-Pages":{"description":"Maximum page number","type":"integer","format":"int32","default":1},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"x-required-roles":[],"security":[{"evesso":["esi-corporations.read_standings.v1"]}],"operationId":"get_corporations_corporation_id_standings","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/corporations/{corporation_id}/starbases/":{"get":{"description":"Returns list of corporation starbases (POSes)\n\n---\nAlternate route: `/dev/corporations/{corporation_id}/starbases/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/starbases/`\n\nAlternate route: `/v1/corporations/{corporation_id}/starbases/`\n\n---\nThis route is cached for up to 3600 seconds\n\n---\nRequires one of the following EVE corporation role(s): Director\n","summary":"Get corporation starbases (POSes)","tags":["Corporation"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/page"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"List of starbases (POSes)","examples":{"application/json":[{"starbase_id":12345,"type_id":456,"system_id":123456}]},"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["starbase_id","type_id","system_id"],"properties":{"starbase_id":{"type":"integer","format":"int64","description":"Unique ID for this starbase (POS)","title":"get_corporations_corporation_id_starbases_starbase_id"},"type_id":{"type":"integer","format":"int32","description":"Starbase (POS) type","title":"get_corporations_corporation_id_starbases_type_id"},"system_id":{"type":"integer","format":"int32","description":"The solar system this starbase (POS) is in, unanchored POSes have this information","title":"get_corporations_corporation_id_starbases_system_id"},"moon_id":{"type":"integer","format":"int32","description":"The moon this starbase (POS) is anchored on, unanchored POSes do not have this information","title":"get_corporations_corporation_id_starbases_moon_id"},"state":{"type":"string","enum":["offline","online","onlining","reinforced","unanchoring"],"title":"get_corporations_corporation_id_starbases_state","description":"state string"},"unanchor_at":{"type":"string","format":"date-time","description":"When the POS started unanchoring, for starbases (POSes) in unanchoring state","title":"get_corporations_corporation_id_starbases_unanchor_at"},"reinforced_until":{"type":"string","format":"date-time","description":"When the POS will be out of reinforcement, for starbases (POSes) in reinforced state","title":"get_corporations_corporation_id_starbases_reinforced_until"},"onlined_since":{"type":"string","format":"date-time","description":"When the POS onlined, for starbases (POSes) in online state","title":"get_corporations_corporation_id_starbases_onlined_since"}},"title":"get_corporations_corporation_id_starbases_200_ok","description":"200 ok object"},"title":"get_corporations_corporation_id_starbases_ok","description":"200 ok array"},"headers":{"X-Pages":{"description":"Maximum page number","type":"integer","format":"int32","default":1},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"x-required-roles":["Director"],"security":[{"evesso":["esi-corporations.read_starbases.v1"]}],"operationId":"get_corporations_corporation_id_starbases","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/corporations/{corporation_id}/starbases/{starbase_id}/":{"get":{"description":"Returns various settings and fuels of a starbase (POS)\n\n---\nAlternate route: `/dev/corporations/{corporation_id}/starbases/{starbase_id}/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/starbases/{starbase_id}/`\n\nAlternate route: `/v1/corporations/{corporation_id}/starbases/{starbase_id}/`\n\n---\nThis route is cached for up to 3600 seconds\n\n---\nRequires one of the following EVE corporation role(s): Director\n","summary":"Get starbase (POS) detail","tags":["Corporation"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/page"},{"name":"starbase_id","in":"path","description":"An EVE starbase (POS) ID","required":true,"type":"integer","format":"int64"},{"name":"system_id","in":"query","description":"The solar system this starbase (POS) is located in,","required":true,"type":"integer","format":"int32"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"List of starbases (POSes)","examples":{"application/json":{"fuel_bay_view":"config_starbase_equipment_role","fuel_bay_take":"config_starbase_equipment_role","anchor":"config_starbase_equipment_role","unanchor":"config_starbase_equipment_role","online":"config_starbase_equipment_role","offline":"config_starbase_equipment_role","allow_corporation_members":true,"allow_alliance_members":false,"use_alliance_standings":false,"attack_if_other_security_status_dropping":false,"attack_if_at_war":true}},"schema":{"type":"object","required":["fuel_bay_view","fuel_bay_take","anchor","unanchor","online","offline","allow_corporation_members","allow_alliance_members","use_alliance_standings","attack_if_other_security_status_dropping","attack_if_at_war"],"properties":{"fuel_bay_view":{"type":"string","description":"Who can view the starbase (POS)'s fule bay. Characters either need to have required role or belong to the starbase (POS) owner's corporation or alliance, as described by the enum, all other access settings follows the same scheme","enum":["alliance_member","config_starbase_equipment_role","corporation_member","starbase_fuel_technician_role"],"title":"get_corporations_corporation_id_starbases_starbase_id_fuel_bay_view"},"fuel_bay_take":{"type":"string","description":"Who can take fuel blocks out of the starbase (POS)'s fuel bay","enum":["alliance_member","config_starbase_equipment_role","corporation_member","starbase_fuel_technician_role"],"title":"get_corporations_corporation_id_starbases_starbase_id_fuel_bay_take"},"anchor":{"type":"string","description":"Who can anchor starbase (POS) and its structures","enum":["alliance_member","config_starbase_equipment_role","corporation_member","starbase_fuel_technician_role"],"title":"get_corporations_corporation_id_starbases_starbase_id_anchor"},"unanchor":{"type":"string","description":"Who can unanchor starbase (POS) and its structures","enum":["alliance_member","config_starbase_equipment_role","corporation_member","starbase_fuel_technician_role"],"title":"get_corporations_corporation_id_starbases_starbase_id_unanchor"},"online":{"type":"string","description":"Who can online starbase (POS) and its structures","enum":["alliance_member","config_starbase_equipment_role","corporation_member","starbase_fuel_technician_role"],"title":"get_corporations_corporation_id_starbases_starbase_id_online"},"offline":{"type":"string","description":"Who can offline starbase (POS) and its structures","enum":["alliance_member","config_starbase_equipment_role","corporation_member","starbase_fuel_technician_role"],"title":"get_corporations_corporation_id_starbases_starbase_id_offline"},"allow_corporation_members":{"type":"boolean","title":"get_corporations_corporation_id_starbases_starbase_id_allow_corporation_members","description":"allow_corporation_members boolean"},"allow_alliance_members":{"type":"boolean","title":"get_corporations_corporation_id_starbases_starbase_id_allow_alliance_members","description":"allow_alliance_members boolean"},"use_alliance_standings":{"type":"boolean","description":"True if the starbase (POS) is using alliance standings, otherwise using corporation's","title":"get_corporations_corporation_id_starbases_starbase_id_use_alliance_standings"},"attack_standing_threshold":{"type":"number","format":"float","description":"Starbase (POS) will attack if target's standing is lower than this value","title":"get_corporations_corporation_id_starbases_starbase_id_attack_standing_threshold"},"attack_security_status_threshold":{"type":"number","format":"float","description":"Starbase (POS) will attack if target's security standing is lower than this value","title":"get_corporations_corporation_id_starbases_starbase_id_attack_security_status_threshold"},"attack_if_other_security_status_dropping":{"type":"boolean","title":"get_corporations_corporation_id_starbases_starbase_id_attack_if_other_security_status_dropping","description":"attack_if_other_security_status_dropping boolean"},"attack_if_at_war":{"type":"boolean","title":"get_corporations_corporation_id_starbases_starbase_id_attack_if_at_war","description":"attack_if_at_war boolean"},"fuels":{"type":"array","maxItems":20,"description":"Fuel blocks and other things that will be consumed when operating a starbase (POS)","items":{"type":"object","required":["type_id","quantity"],"properties":{"type_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_starbases_starbase_id_type_id","description":"type_id integer"},"quantity":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_starbases_starbase_id_quantity","description":"quantity integer"}},"title":"get_corporations_corporation_id_starbases_starbase_id_fuel","description":"fuel object"},"title":"get_corporations_corporation_id_starbases_starbase_id_fuels"}},"title":"get_corporations_corporation_id_starbases_starbase_id_ok","description":"200 ok object"},"headers":{"X-Pages":{"description":"Maximum page number","type":"integer","format":"int32","default":1},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"x-required-roles":["Director"],"security":[{"evesso":["esi-corporations.read_starbases.v1"]}],"operationId":"get_corporations_corporation_id_starbases_starbase_id","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/corporations/{corporation_id}/containers/logs/":{"get":{"description":"Returns logs recorded in the past seven days from all audit log secure containers (ALSC) owned by a given corporation\n\n---\nAlternate route: `/dev/corporations/{corporation_id}/containers/logs/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/containers/logs/`\n\nAlternate route: `/v1/corporations/{corporation_id}/containers/logs/`\n\n---\nThis route is cached for up to 600 seconds\n\n---\nRequires one of the following EVE corporation role(s): Director\n","summary":"Get all corporation ALSC logs","tags":["Corporation"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/page"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"List of corporation ALSC logs","examples":{"application/json":[{"logged_at":"2017-10-10T14:00:00Z","container_id":1000000012279,"container_type_id":17365,"character_id":2112625428,"location_id":1000000012278,"action":"set_password","location_flag":"CorpSAG1","password_type":"general"},{"logged_at":"2017-10-11T12:04:33Z","container_id":1000000012279,"container_type_id":17365,"character_id":2112625428,"location_id":1000000012278,"action":"lock","location_flag":"CorpSAG1","type_id":1230,"quantity":30},{"logged_at":"2017-10-11T12:06:29Z","container_id":1000000012279,"container_type_id":17365,"character_id":2112625428,"location_id":1000000012278,"action":"configure","location_flag":"CorpSAG2","old_config_bitmask":23,"new_config_bitmask":31}]},"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["logged_at","container_id","container_type_id","character_id","location_id","action","location_flag"],"properties":{"logged_at":{"type":"string","format":"date-time","description":"Timestamp when this log was created","title":"get_corporations_corporation_id_containers_logs_logged_at"},"container_id":{"type":"integer","format":"int64","description":"ID of the container","title":"get_corporations_corporation_id_containers_logs_container_id"},"container_type_id":{"type":"integer","format":"int32","description":"Type ID of the container","title":"get_corporations_corporation_id_containers_logs_container_type_id"},"character_id":{"type":"integer","format":"int32","description":"ID of the character who performed the action.","title":"get_corporations_corporation_id_containers_logs_character_id"},"location_id":{"type":"integer","format":"int64","title":"get_corporations_corporation_id_containers_logs_location_id","description":"location_id integer"},"location_flag":{"type":"string","enum":["AssetSafety","AutoFit","Bonus","Booster","BoosterBay","Capsule","Cargo","CorpDeliveries","CorpSAG1","CorpSAG2","CorpSAG3","CorpSAG4","CorpSAG5","CorpSAG6","CorpSAG7","CrateLoot","Deliveries","DroneBay","DustBattle","DustDatabank","FighterBay","FighterTube0","FighterTube1","FighterTube2","FighterTube3","FighterTube4","FleetHangar","Hangar","HangarAll","HiSlot0","HiSlot1","HiSlot2","HiSlot3","HiSlot4","HiSlot5","HiSlot6","HiSlot7","HiddenModifers","Implant","Impounded","JunkyardReprocessed","JunkyardTrashed","LoSlot0","LoSlot1","LoSlot2","LoSlot3","LoSlot4","LoSlot5","LoSlot6","LoSlot7","Locked","MedSlot0","MedSlot1","MedSlot2","MedSlot3","MedSlot4","MedSlot5","MedSlot6","MedSlot7","OfficeFolder","Pilot","PlanetSurface","QuafeBay","Reward","RigSlot0","RigSlot1","RigSlot2","RigSlot3","RigSlot4","RigSlot5","RigSlot6","RigSlot7","SecondaryStorage","ServiceSlot0","ServiceSlot1","ServiceSlot2","ServiceSlot3","ServiceSlot4","ServiceSlot5","ServiceSlot6","ServiceSlot7","ShipHangar","ShipOffline","Skill","SkillInTraining","SpecializedAmmoHold","SpecializedCommandCenterHold","SpecializedFuelBay","SpecializedGasHold","SpecializedIndustrialShipHold","SpecializedLargeShipHold","SpecializedMaterialBay","SpecializedMediumShipHold","SpecializedMineralHold","SpecializedOreHold","SpecializedPlanetaryCommoditiesHold","SpecializedSalvageHold","SpecializedShipHold","SpecializedSmallShipHold","StructureActive","StructureFuel","StructureInactive","StructureOffline","SubSystemSlot0","SubSystemSlot1","SubSystemSlot2","SubSystemSlot3","SubSystemSlot4","SubSystemSlot5","SubSystemSlot6","SubSystemSlot7","SubsystemBay","Unlocked","Wallet","Wardrobe"],"title":"get_corporations_corporation_id_containers_logs_location_flag","description":"location_flag string"},"action":{"type":"string","enum":["add","assemble","configure","enter_password","lock","move","repackage","set_name","set_password","unlock"],"title":"get_corporations_corporation_id_containers_logs_action","description":"action string"},"password_type":{"type":"string","enum":["config","general"],"description":"Type of password set if action is of type SetPassword or EnterPassword","title":"get_corporations_corporation_id_containers_logs_password_type"},"type_id":{"type":"integer","format":"int32","description":"Type ID of the item being acted upon","title":"get_corporations_corporation_id_containers_logs_type_id"},"quantity":{"type":"integer","format":"int32","description":"Quantity of the item being acted upon","title":"get_corporations_corporation_id_containers_logs_quantity"},"old_config_bitmask":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_containers_logs_old_config_bitmask","description":"old_config_bitmask integer"},"new_config_bitmask":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_containers_logs_new_config_bitmask","description":"new_config_bitmask integer"}},"title":"get_corporations_corporation_id_containers_logs_200_ok","description":"200 ok object"},"title":"get_corporations_corporation_id_containers_logs_ok","description":"200 ok array"},"headers":{"X-Pages":{"description":"Maximum page number","type":"integer","format":"int32","default":1},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"x-required-roles":["Director"],"security":[{"evesso":["esi-corporations.read_container_logs.v1"]}],"operationId":"get_corporations_corporation_id_containers_logs","x-cached-seconds":600,"x-alternate-versions":["dev","legacy","v1"]}},"/corporations/{corporation_id}/facilities/":{"get":{"description":"Return a corporation's facilities\n\n---\nAlternate route: `/dev/corporations/{corporation_id}/facilities/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/facilities/`\n\nAlternate route: `/v1/corporations/{corporation_id}/facilities/`\n\n---\nThis route is cached for up to 3600 seconds\n\n---\nRequires one of the following EVE corporation role(s): Factory_Manager\n","summary":"Get corporation facilities","tags":["Corporation"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"List of corporation facilities","examples":{"application/json":[{"facility_id":123,"type_id":2502,"system_id":45678}]},"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["facility_id","type_id","system_id"],"properties":{"facility_id":{"type":"integer","format":"int64","title":"get_corporations_corporation_id_facilities_facility_id","description":"facility_id integer"},"type_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_facilities_type_id","description":"type_id integer"},"system_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_facilities_system_id","description":"system_id integer"}},"title":"get_corporations_corporation_id_facilities_200_ok","description":"200 ok object"},"title":"get_corporations_corporation_id_facilities_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"x-required-roles":["Factory_Manager"],"security":[{"evesso":["esi-corporations.read_facilities.v1"]}],"operationId":"get_corporations_corporation_id_facilities","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/corporations/{corporation_id}/medals/":{"get":{"description":"Returns a corporation's medals\n\n---\nAlternate route: `/dev/corporations/{corporation_id}/medals/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/medals/`\n\nAlternate route: `/v1/corporations/{corporation_id}/medals/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"Get corporation medals","tags":["Corporation"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/page"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of medals","examples":{"application/json":[{"medal_id":123,"title":"Awesome Medal","description":"An Awesome Medal","creator_id":46578,"created_at":"2017-10-10T14:00:00Z"}]},"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["medal_id","title","description","creator_id","created_at"],"properties":{"medal_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_medals_medal_id","description":"medal_id integer"},"title":{"type":"string","maxLength":100,"title":"get_corporations_corporation_id_medals_title","description":"title string"},"description":{"type":"string","maxLength":1000,"title":"get_corporations_corporation_id_medals_description","description":"description string"},"creator_id":{"type":"integer","format":"int32","description":"ID of the character who created this medal","title":"get_corporations_corporation_id_medals_creator_id"},"created_at":{"type":"string","format":"date-time","title":"get_corporations_corporation_id_medals_created_at","description":"created_at string"}},"title":"get_corporations_corporation_id_medals_200_ok","description":"200 ok object"},"title":"get_corporations_corporation_id_medals_ok","description":"200 ok array"},"headers":{"X-Pages":{"description":"Maximum page number","type":"integer","format":"int32","default":1},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"x-required-roles":[],"security":[{"evesso":["esi-corporations.read_medals.v1"]}],"operationId":"get_corporations_corporation_id_medals","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/corporations/{corporation_id}/medals/issued/":{"get":{"description":"Returns medals issued by a corporation\n\n---\nAlternate route: `/dev/corporations/{corporation_id}/medals/issued/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/medals/issued/`\n\nAlternate route: `/v1/corporations/{corporation_id}/medals/issued/`\n\n---\nThis route is cached for up to 3600 seconds\n\n---\nRequires one of the following EVE corporation role(s): Director\n","summary":"Get corporation issued medals","tags":["Corporation"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/page"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of issued medals","examples":{"application/json":[{"medal_id":123,"character_id":45678,"reason":"Awesome Reason","status":"private","issuer_id":67890,"issued_at":"2017-10-10T14:00:00Z"}]},"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["medal_id","character_id","reason","status","issuer_id","issued_at"],"properties":{"medal_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_medals_issued_medal_id","description":"medal_id integer"},"character_id":{"type":"integer","format":"int32","description":"ID of the character who was rewarded this medal","title":"get_corporations_corporation_id_medals_issued_character_id"},"reason":{"type":"string","maxLength":1000,"title":"get_corporations_corporation_id_medals_issued_reason","description":"reason string"},"status":{"type":"string","enum":["private","public"],"title":"get_corporations_corporation_id_medals_issued_status","description":"status string"},"issuer_id":{"type":"integer","format":"int32","description":"ID of the character who issued the medal","title":"get_corporations_corporation_id_medals_issued_issuer_id"},"issued_at":{"type":"string","format":"date-time","title":"get_corporations_corporation_id_medals_issued_issued_at","description":"issued_at string"}},"title":"get_corporations_corporation_id_medals_issued_200_ok","description":"200 ok object"},"title":"get_corporations_corporation_id_medals_issued_ok","description":"200 ok array"},"headers":{"X-Pages":{"description":"Maximum page number","type":"integer","format":"int32","default":1},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"x-required-roles":["Director"],"security":[{"evesso":["esi-corporations.read_medals.v1"]}],"operationId":"get_corporations_corporation_id_medals_issued","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/corporations/{corporation_id}/outposts/":{"get":{"description":"Get a list of corporation outpost IDs Note: This endpoint will be removed once outposts are migrated to Citadels as talked about in this blog: https://community.eveonline.com/news/dev-blogs/the-next-steps-in-structure-transition/\n\n---\nAlternate route: `/dev/corporations/{corporation_id}/outposts/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/outposts/`\n\nAlternate route: `/v1/corporations/{corporation_id}/outposts/`\n\n---\nThis route is cached for up to 3600 seconds\n\n---\nRequires one of the following EVE corporation role(s): Director\n","summary":"Get corporation outposts","tags":["Corporation"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/page"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"List of corporation outpost IDs","examples":{"application/json":[61001146,61001147,61001148]},"schema":{"type":"array","maxItems":1000,"uniqueItems":true,"items":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_outposts_200_ok","description":"200 ok integer"},"title":"get_corporations_corporation_id_outposts_ok","description":"200 ok array"},"headers":{"X-Pages":{"description":"Maximum page number","type":"integer","format":"int32","default":1},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"x-required-roles":["Director"],"security":[{"evesso":["esi-corporations.read_outposts.v1"]}],"operationId":"get_corporations_corporation_id_outposts","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/corporations/{corporation_id}/outposts/{outpost_id}/":{"get":{"description":"Get details about a given outpost. Note: This endpoint will be removed once outposts are migrated to Citadels as talked about in this blog: https://community.eveonline.com/news/dev-blogs/the-next-steps-in-structure-transition/\n\n---\nAlternate route: `/dev/corporations/{corporation_id}/outposts/{outpost_id}/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/outposts/{outpost_id}/`\n\nAlternate route: `/v1/corporations/{corporation_id}/outposts/{outpost_id}/`\n\n---\nThis route is cached for up to 3600 seconds\n\n---\nRequires one of the following EVE corporation role(s): Director\n","summary":"Get corporation outpost details","tags":["Corporation"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"name":"outpost_id","in":"path","description":"A station (outpost) ID","required":true,"type":"integer","format":"int32"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Details about the given outpost","examples":{"application/json":{"owner_id":98000002,"system_id":30000657,"docking_cost_per_ship_volume":0,"office_rental_cost":100,"type_id":21644,"reprocessing_efficiency":0.5,"reprocessing_station_take":0.01,"standing_owner_id":99003581,"coordinates":{"x":-102478848000,"y":-18310963200,"z":-9660456960},"services":[{"service_name":"Reprocessing Plant","owner_id":98000002,"minimum_standing":0,"surcharge_per_bad_standing":0,"discount_per_good_standing":10}]}},"schema":{"type":"object","required":["owner_id","system_id","docking_cost_per_ship_volume","office_rental_cost","type_id","reprocessing_efficiency","reprocessing_station_take","standing_owner_id","coordinates","services"],"properties":{"owner_id":{"description":"The entity that owns the station (e.g. the entity whose logo is on the station services bar)","type":"integer","format":"int32","title":"get_corporations_corporation_id_outposts_outpost_id_owner_id"},"system_id":{"description":"The ID of the solar system the outpost rests in","type":"integer","format":"int32","title":"get_corporations_corporation_id_outposts_outpost_id_system_id"},"docking_cost_per_ship_volume":{"type":"number","format":"float","title":"get_corporations_corporation_id_outposts_outpost_id_docking_cost_per_ship_volume","description":"docking_cost_per_ship_volume number"},"office_rental_cost":{"type":"integer","format":"int64","title":"get_corporations_corporation_id_outposts_outpost_id_office_rental_cost","description":"office_rental_cost integer"},"type_id":{"description":"The type ID of the given outpost","type":"integer","format":"int32","title":"get_corporations_corporation_id_outposts_outpost_id_type_id"},"reprocessing_efficiency":{"type":"number","format":"float","title":"get_corporations_corporation_id_outposts_outpost_id_reprocessing_efficiency","description":"reprocessing_efficiency number"},"reprocessing_station_take":{"type":"number","format":"float","title":"get_corporations_corporation_id_outposts_outpost_id_reprocessing_station_take","description":"reprocessing_station_take number"},"standing_owner_id":{"description":"The owner ID that sets the ability for someone to dock based on standings.","type":"integer","format":"int32","title":"get_corporations_corporation_id_outposts_outpost_id_standing_owner_id"},"coordinates":{"type":"object","required":["x","y","z"],"properties":{"x":{"type":"number","format":"double","title":"get_corporations_corporation_id_outposts_outpost_id_x","description":"x number"},"y":{"type":"number","format":"double","title":"get_corporations_corporation_id_outposts_outpost_id_y","description":"y number"},"z":{"type":"number","format":"double","title":"get_corporations_corporation_id_outposts_outpost_id_z","description":"z number"}},"title":"get_corporations_corporation_id_outposts_outpost_id_coordinates","description":"coordinates object"},"services":{"description":"A list of services the given outpost provides","type":"array","maxItems":27,"items":{"type":"object","required":["service_name","minimum_standing","surcharge_per_bad_standing","discount_per_good_standing"],"properties":{"service_name":{"type":"string","enum":["Bounty Missions","Assassination Missions","Courier Missions","Interbus","Reprocessing Plant","Refinery","Market","Black Market","Stock Exchange","Cloning","Surgery","DNA Therapy","Repair Facilities","Factory","Laboratory","Gambling","Fitting","Paintshop","News","Storage","Insurance","Docking","Office Rental","Jump Clone Facility","Loyalty Point Store","Navy Offices","Security Office"],"title":"get_corporations_corporation_id_outposts_outpost_id_service_name","description":"service_name string"},"minimum_standing":{"type":"number","format":"double","title":"get_corporations_corporation_id_outposts_outpost_id_minimum_standing","description":"minimum_standing number"},"surcharge_per_bad_standing":{"type":"number","format":"double","title":"get_corporations_corporation_id_outposts_outpost_id_surcharge_per_bad_standing","description":"surcharge_per_bad_standing number"},"discount_per_good_standing":{"type":"number","format":"double","title":"get_corporations_corporation_id_outposts_outpost_id_discount_per_good_standing","description":"discount_per_good_standing number"}},"title":"get_corporations_corporation_id_outposts_outpost_id_service","description":"service object"},"title":"get_corporations_corporation_id_outposts_outpost_id_services"}},"title":"get_corporations_corporation_id_outposts_outpost_id_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"x-required-roles":["Director"],"security":[{"evesso":["esi-corporations.read_outposts.v1"]}],"operationId":"get_corporations_corporation_id_outposts_outpost_id","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/dogma/attributes/":{"get":{"description":"Get a list of dogma attribute ids\n\n---\nAlternate route: `/dev/dogma/attributes/`\n\nAlternate route: `/legacy/dogma/attributes/`\n\nAlternate route: `/v1/dogma/attributes/`\n\n---\nThis route expires daily at 11:05","summary":"Get attributes","tags":["Dogma"],"responses":{"200":{"description":"A list of dogma attribute ids","examples":{"application/json":[1,2,3]},"schema":{"type":"array","maxItems":10000,"items":{"type":"integer","format":"int32","title":"get_dogma_attributes_200_ok","description":"200 ok integer"},"title":"get_dogma_attributes_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"operationId":"get_dogma_attributes","x-alternate-versions":["dev","legacy","v1"]}},"/dogma/attributes/{attribute_id}/":{"get":{"description":"Get information on a dogma attribute\n\n---\nAlternate route: `/dev/dogma/attributes/{attribute_id}/`\n\nAlternate route: `/legacy/dogma/attributes/{attribute_id}/`\n\nAlternate route: `/v1/dogma/attributes/{attribute_id}/`\n\n---\nThis route expires daily at 11:05","summary":"Get attribute information","tags":["Dogma"],"parameters":[{"name":"attribute_id","in":"path","description":"A dogma attribute ID","required":true,"type":"integer","format":"int32"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Information about a dogma attribute","examples":{"application/json":{"attribute_id":20,"name":"speedFactor","description":"Factor by which topspeed increases.","icon_id":1389,"default_value":1,"published":true,"display_name":"Maximum Velocity Bonus","unit_id":124,"high_is_good":true}},"schema":{"type":"object","required":["attribute_id"],"properties":{"attribute_id":{"type":"integer","format":"int32","title":"get_dogma_attributes_attribute_id_attribute_id","description":"attribute_id integer"},"name":{"type":"string","title":"get_dogma_attributes_attribute_id_name","description":"name string"},"description":{"type":"string","title":"get_dogma_attributes_attribute_id_description","description":"description string"},"icon_id":{"type":"integer","format":"int32","title":"get_dogma_attributes_attribute_id_icon_id","description":"icon_id integer"},"default_value":{"type":"number","format":"float","title":"get_dogma_attributes_attribute_id_default_value","description":"default_value number"},"published":{"type":"boolean","title":"get_dogma_attributes_attribute_id_published","description":"published boolean"},"display_name":{"type":"string","title":"get_dogma_attributes_attribute_id_display_name","description":"display_name string"},"unit_id":{"type":"integer","format":"int32","title":"get_dogma_attributes_attribute_id_unit_id","description":"unit_id integer"},"stackable":{"type":"boolean","title":"get_dogma_attributes_attribute_id_stackable","description":"stackable boolean"},"high_is_good":{"type":"boolean","title":"get_dogma_attributes_attribute_id_high_is_good","description":"high_is_good boolean"}},"title":"get_dogma_attributes_attribute_id_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"404":{"description":"Dogma attribute not found","schema":{"type":"object","title":"get_dogma_attributes_attribute_id_not_found","description":"Not found","properties":{"error":{"type":"string","description":"Not found message","title":"get_dogma_attributes_attribute_id_404_not_found"}}},"examples":{"application/json":{"error":"Not found message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_dogma_attributes_attribute_id","x-alternate-versions":["dev","legacy","v1"]}},"/dogma/effects/":{"get":{"description":"Get a list of dogma effect ids\n\n---\nAlternate route: `/dev/dogma/effects/`\n\nAlternate route: `/legacy/dogma/effects/`\n\nAlternate route: `/v1/dogma/effects/`\n\n---\nThis route expires daily at 11:05","summary":"Get effects","tags":["Dogma"],"responses":{"200":{"description":"A list of dogma effect ids","examples":{"application/json":[1,2,3]},"schema":{"type":"array","maxItems":10000,"items":{"type":"integer","format":"int32","title":"get_dogma_effects_200_ok","description":"200 ok integer"},"title":"get_dogma_effects_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"operationId":"get_dogma_effects","x-alternate-versions":["dev","legacy","v1"]}},"/dogma/effects/{effect_id}/":{"get":{"description":"Get information on a dogma effect\n\n---\nAlternate route: `/dev/dogma/effects/{effect_id}/`\n\nAlternate route: `/v2/dogma/effects/{effect_id}/`\n\n---\nThis route expires daily at 11:05","summary":"Get effect information","tags":["Dogma"],"parameters":[{"$ref":"#/parameters/datasource"},{"name":"effect_id","in":"path","description":"A dogma effect ID","required":true,"type":"integer","format":"int32"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Information about a dogma effect","examples":{"application/json":{"effect_id":12,"name":"hiPower","display_name":"High power","description":"Requires a high power slot.","icon_id":293,"effect_category":0,"pre_expression":131,"post_expression":131,"published":true}},"schema":{"type":"object","required":["effect_id"],"properties":{"effect_id":{"type":"integer","format":"int32","title":"get_dogma_effects_effect_id_effect_id","description":"effect_id integer"},"name":{"type":"string","title":"get_dogma_effects_effect_id_name","description":"name string"},"display_name":{"type":"string","title":"get_dogma_effects_effect_id_display_name","description":"display_name string"},"description":{"type":"string","title":"get_dogma_effects_effect_id_description","description":"description string"},"icon_id":{"type":"integer","format":"int32","title":"get_dogma_effects_effect_id_icon_id","description":"icon_id integer"},"effect_category":{"type":"integer","format":"int32","title":"get_dogma_effects_effect_id_effect_category","description":"effect_category integer"},"pre_expression":{"type":"integer","format":"int32","title":"get_dogma_effects_effect_id_pre_expression","description":"pre_expression integer"},"post_expression":{"type":"integer","format":"int32","title":"get_dogma_effects_effect_id_post_expression","description":"post_expression integer"},"is_offensive":{"type":"boolean","title":"get_dogma_effects_effect_id_is_offensive","description":"is_offensive boolean"},"is_assistance":{"type":"boolean","title":"get_dogma_effects_effect_id_is_assistance","description":"is_assistance boolean"},"disallow_auto_repeat":{"type":"boolean","title":"get_dogma_effects_effect_id_disallow_auto_repeat","description":"disallow_auto_repeat boolean"},"published":{"type":"boolean","title":"get_dogma_effects_effect_id_published","description":"published boolean"},"is_warp_safe":{"type":"boolean","title":"get_dogma_effects_effect_id_is_warp_safe","description":"is_warp_safe boolean"},"range_chance":{"type":"boolean","title":"get_dogma_effects_effect_id_range_chance","description":"range_chance boolean"},"electronic_chance":{"type":"boolean","title":"get_dogma_effects_effect_id_electronic_chance","description":"electronic_chance boolean"},"duration_attribute_id":{"type":"integer","format":"int32","title":"get_dogma_effects_effect_id_duration_attribute_id","description":"duration_attribute_id integer"},"tracking_speed_attribute_id":{"type":"integer","format":"int32","title":"get_dogma_effects_effect_id_tracking_speed_attribute_id","description":"tracking_speed_attribute_id integer"},"discharge_attribute_id":{"type":"integer","format":"int32","title":"get_dogma_effects_effect_id_discharge_attribute_id","description":"discharge_attribute_id integer"},"range_attribute_id":{"type":"integer","format":"int32","title":"get_dogma_effects_effect_id_range_attribute_id","description":"range_attribute_id integer"},"falloff_attribute_id":{"type":"integer","format":"int32","title":"get_dogma_effects_effect_id_falloff_attribute_id","description":"falloff_attribute_id integer"},"modifiers":{"type":"array","maxItems":100,"items":{"type":"object","required":["func"],"properties":{"func":{"type":"string","title":"get_dogma_effects_effect_id_func","description":"func string"},"domain":{"type":"string","title":"get_dogma_effects_effect_id_domain","description":"domain string"},"modified_attribute_id":{"type":"integer","format":"int32","title":"get_dogma_effects_effect_id_modified_attribute_id","description":"modified_attribute_id integer"},"modifying_attribute_id":{"type":"integer","format":"int32","title":"get_dogma_effects_effect_id_modifying_attribute_id","description":"modifying_attribute_id integer"},"effect_id":{"type":"integer","format":"int32","title":"get_dogma_effects_effect_id_effect_id","description":"effect_id integer"},"operator":{"type":"integer","format":"int32","title":"get_dogma_effects_effect_id_operator","description":"operator integer"}},"title":"get_dogma_effects_effect_id_modifier","description":"modifier object"},"title":"get_dogma_effects_effect_id_modifiers","description":"modifiers array"}},"title":"get_dogma_effects_effect_id_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"404":{"description":"Dogma effect not found","schema":{"type":"object","title":"get_dogma_effects_effect_id_not_found","description":"Not found","properties":{"error":{"type":"string","description":"Not found message","title":"get_dogma_effects_effect_id_404_not_found"}}},"examples":{"application/json":{"error":"Not found message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_dogma_effects_effect_id","x-alternate-versions":["dev","v2"]}},"/fw/wars/":{"get":{"description":"Data about which NPC factions are at war\n\n---\nAlternate route: `/dev/fw/wars/`\n\nAlternate route: `/legacy/fw/wars/`\n\nAlternate route: `/v1/fw/wars/`\n\n---\nThis route expires daily at 11:05","summary":"Data about which NPC factions are at war","tags":["Faction Warfare"],"responses":{"200":{"description":"A list of NPC factions at war","examples":{"application/json":[{"faction_id":500001,"against_id":500002}]},"schema":{"type":"array","description":"List of factions at war","maxItems":8,"items":{"type":"object","required":["faction_id","against_id"],"properties":{"faction_id":{"type":"integer","format":"int32","title":"get_fw_wars_faction_id","description":"faction_id integer"},"against_id":{"description":"The faction ID of the enemy faction.","type":"integer","format":"int32","title":"get_fw_wars_against_id"}},"title":"get_fw_wars_200_ok","description":"200 ok object"},"title":"get_fw_wars_ok"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"operationId":"get_fw_wars","x-alternate-versions":["dev","legacy","v1"]}},"/fw/stats/":{"get":{"summary":"An overview of statistics about factions involved in faction warfare","description":"Statistical overviews of factions involved in faction warfare\n\n---\nAlternate route: `/dev/fw/stats/`\n\nAlternate route: `/legacy/fw/stats/`\n\nAlternate route: `/v1/fw/stats/`\n\n---\nThis route expires daily at 11:05","tags":["Faction Warfare"],"responses":{"200":{"description":"Per faction breakdown of faction warfare statistics","examples":{"application/json":[{"faction_id":500001,"pilots":28863,"systems_controlled":20,"kills":{"yesterday":136,"last_week":893,"total":684350},"victory_points":{"yesterday":15980,"last_week":102640,"total":52658260}}]},"schema":{"type":"array","maxItems":4,"items":{"type":"object","required":["faction_id","pilots","systems_controlled","kills","victory_points"],"properties":{"faction_id":{"type":"integer","format":"int32","title":"get_fw_stats_faction_id","description":"faction_id integer"},"pilots":{"description":"How many pilots fight for the given faction","type":"integer","format":"int32","title":"get_fw_stats_pilots"},"systems_controlled":{"description":"The number of solar systems controlled by the given faction","type":"integer","format":"int32","title":"get_fw_stats_systems_controlled"},"kills":{"type":"object","description":"Summary of kills against an enemy faction for the given faction","required":["yesterday","last_week","total"],"properties":{"yesterday":{"type":"integer","format":"int32","description":"Yesterday's total number of kills against enemy factions","title":"get_fw_stats_yesterday"},"last_week":{"type":"integer","format":"int32","description":"Last week's total number of kills against enemy factions","title":"get_fw_stats_last_week"},"total":{"type":"integer","format":"int32","description":"Total number of kills against enemy factions since faction warfare began","title":"get_fw_stats_total"}},"title":"get_fw_stats_kills"},"victory_points":{"type":"object","description":"Summary of victory points gained for the given faction","required":["yesterday","last_week","total"],"properties":{"yesterday":{"type":"integer","format":"int32","description":"Yesterday's victory points gained","title":"get_fw_stats_yesterday"},"last_week":{"type":"integer","format":"int32","description":"Last week's victory points gained","title":"get_fw_stats_last_week"},"total":{"type":"integer","format":"int32","description":"Total victory points gained since faction warfare began","title":"get_fw_stats_total"}},"title":"get_fw_stats_victory_points"}},"title":"get_fw_stats_200_ok","description":"200 ok object"},"title":"get_fw_stats_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"operationId":"get_fw_stats","x-alternate-versions":["dev","legacy","v1"]}},"/fw/systems/":{"get":{"summary":"Ownership of faction warfare systems","description":"An overview of the current ownership of faction warfare solar systems\n\n---\nAlternate route: `/dev/fw/systems/`\n\nAlternate route: `/legacy/fw/systems/`\n\nAlternate route: `/v1/fw/systems/`\n\n---\nThis route is cached for up to 1800 seconds","tags":["Faction Warfare"],"responses":{"200":{"description":"All faction war solar systems","examples":{"application/json":[{"solar_system_id":30002096,"owner_faction_id":500001,"occupier_faction_id":500001,"victory_points":60,"victory_points_threshold":3000,"contested":true}]},"schema":{"type":"array","maxItems":171,"items":{"type":"object","required":["solar_system_id","occupier_faction_id","owner_faction_id","victory_points","victory_points_threshold","contested"],"properties":{"solar_system_id":{"type":"integer","format":"int32","title":"get_fw_systems_solar_system_id","description":"solar_system_id integer"},"owner_faction_id":{"type":"integer","format":"int32","title":"get_fw_systems_owner_faction_id","description":"owner_faction_id integer"},"occupier_faction_id":{"type":"integer","format":"int32","title":"get_fw_systems_occupier_faction_id","description":"occupier_faction_id integer"},"victory_points":{"type":"integer","format":"int32","title":"get_fw_systems_victory_points","description":"victory_points integer"},"victory_points_threshold":{"type":"integer","format":"int32","title":"get_fw_systems_victory_points_threshold","description":"victory_points_threshold integer"},"contested":{"type":"boolean","title":"get_fw_systems_contested","description":"contested boolean"}},"title":"get_fw_systems_200_ok","description":"200 ok object"},"title":"get_fw_systems_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"operationId":"get_fw_systems","x-cached-seconds":1800,"x-alternate-versions":["dev","legacy","v1"]}},"/fw/leaderboards/":{"get":{"summary":"List of the top factions in faction warfare","description":"Top 4 leaderboard of factions for kills and victory points separated by total, last week and yesterday.\n\n---\nAlternate route: `/dev/fw/leaderboards/`\n\nAlternate route: `/legacy/fw/leaderboards/`\n\nAlternate route: `/v1/fw/leaderboards/`\n\n---\nThis route expires daily at 11:05","tags":["Faction Warfare"],"responses":{"200":{"description":"Corporation leaderboard of kills and victory points within faction warfare.","examples":{"application/json":{"kills":{"yesterday":[{"faction_id":500001,"amount":100},{"faction_id":500004,"amount":50}],"last_week":[{"faction_id":500001,"amount":730},{"faction_id":500004,"amount":671}],"active_total":[{"faction_id":500004,"amount":832273},{"faction_id":500001,"amount":687915}]},"victory_points":{"yesterday":[{"faction_id":500002,"amount":5000},{"faction_id":500003,"amount":3500}],"last_week":[{"faction_id":500001,"amount":97360},{"faction_id":500004,"amount":84980}],"active_total":[{"faction_id":500001,"amount":53130500},{"faction_id":500004,"amount":50964263}]}}},"schema":{"type":"object","required":["kills","victory_points"],"properties":{"kills":{"type":"object","description":"Top 4 rankings of factions by number of kills from yesterday, last week and in total.","required":["yesterday","last_week","active_total"],"properties":{"yesterday":{"description":"Top 4 ranking of factions by kills in the past day","type":"array","maxItems":4,"items":{"type":"object","properties":{"faction_id":{"type":"integer","format":"int32","title":"get_fw_leaderboards_faction_id","description":"faction_id integer"},"amount":{"description":"Amount of kills","type":"integer","format":"int32","title":"get_fw_leaderboards_amount"}},"title":"get_fw_leaderboards_yesterday","description":"yesterday object"},"title":"get_fw_leaderboards_yesterday"},"last_week":{"description":"Top 4 ranking of factions by kills in the past week","type":"array","maxItems":4,"items":{"type":"object","properties":{"faction_id":{"type":"integer","format":"int32","title":"get_fw_leaderboards_faction_id","description":"faction_id integer"},"amount":{"description":"Amount of kills","type":"integer","format":"int32","title":"get_fw_leaderboards_amount"}},"title":"get_fw_leaderboards_last_week","description":"last_week object"},"title":"get_fw_leaderboards_last_week"},"active_total":{"description":"Top 4 ranking of factions active in faction warfare by total kills. A faction is considered \"active\" if they have participated in faction warfare in the past 14 days.","type":"array","maxItems":4,"items":{"type":"object","properties":{"faction_id":{"type":"integer","format":"int32","title":"get_fw_leaderboards_faction_id","description":"faction_id integer"},"amount":{"description":"Amount of kills","type":"integer","format":"int32","title":"get_fw_leaderboards_amount"}},"title":"get_fw_leaderboards_active_total","description":"active_total object"},"title":"get_fw_leaderboards_active_total"}},"title":"get_fw_leaderboards_kills"},"victory_points":{"description":"Top 4 rankings of factions by victory points from yesterday, last week and in total","type":"object","required":["yesterday","last_week","active_total"],"properties":{"yesterday":{"description":"Top 4 ranking of factions by victory points in the past day","type":"array","maxItems":4,"items":{"type":"object","properties":{"faction_id":{"type":"integer","format":"int32","title":"get_fw_leaderboards_faction_id","description":"faction_id integer"},"amount":{"description":"Amount of victory points","type":"integer","format":"int32","title":"get_fw_leaderboards_amount"}},"title":"get_fw_leaderboards_yesterday","description":"yesterday object"},"title":"get_fw_leaderboards_yesterday"},"last_week":{"description":"Top 4 ranking of factions by victory points in the past week","type":"array","maxItems":4,"items":{"type":"object","properties":{"faction_id":{"type":"integer","format":"int32","title":"get_fw_leaderboards_faction_id","description":"faction_id integer"},"amount":{"description":"Amount of victory points","type":"integer","format":"int32","title":"get_fw_leaderboards_amount"}},"title":"get_fw_leaderboards_last_week","description":"last_week object"},"title":"get_fw_leaderboards_last_week"},"active_total":{"description":"Top 4 ranking of factions active in faction warfare by total victory points. A faction is considered \"active\" if they have participated in faction warfare in the past 14 days.","type":"array","maxItems":4,"items":{"type":"object","properties":{"faction_id":{"type":"integer","format":"int32","title":"get_fw_leaderboards_faction_id","description":"faction_id integer"},"amount":{"description":"Amount of victory points","type":"integer","format":"int32","title":"get_fw_leaderboards_amount"}},"title":"get_fw_leaderboards_active_total","description":"active_total object"},"title":"get_fw_leaderboards_active_total"}},"title":"get_fw_leaderboards_victory_points"}},"title":"get_fw_leaderboards_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"operationId":"get_fw_leaderboards","x-alternate-versions":["dev","legacy","v1"]}},"/fw/leaderboards/characters/":{"get":{"summary":"List of the top pilots in faction warfare","description":"Top 100 leaderboard of pilots for kills and victory points separated by total, last week and yesterday.\n\n---\nAlternate route: `/dev/fw/leaderboards/characters/`\n\nAlternate route: `/legacy/fw/leaderboards/characters/`\n\nAlternate route: `/v1/fw/leaderboards/characters/`\n\n---\nThis route expires daily at 11:05","tags":["Faction Warfare"],"responses":{"200":{"description":"Character leaderboard of kills and victory points within faction warfare.","examples":{"application/json":{"kills":{"yesterday":[{"character_id":2112625428,"amount":34},{"character_id":95465499,"amount":20}],"last_week":[{"character_id":2112625428,"amount":100},{"character_id":95465499,"amount":70}],"active_total":[{"character_id":2112625428,"amount":10000},{"character_id":95465499,"amount":8500}]},"victory_points":{"yesterday":[{"character_id":2112625428,"amount":620},{"character_id":95465499,"amount":550}],"last_week":[{"character_id":2112625428,"amount":2660},{"character_id":95465499,"amount":2000}],"active_total":[{"character_id":2112625428,"amount":1239158},{"character_id":95465499,"amount":1139029}]}}},"schema":{"type":"object","required":["kills","victory_points"],"properties":{"kills":{"type":"object","description":"Top 100 rankings of pilots by number of kills from yesterday, last week and in total.","required":["yesterday","last_week","active_total"],"properties":{"yesterday":{"description":"Top 100 ranking of pilots by kills in the past day","type":"array","maxItems":100,"items":{"type":"object","properties":{"character_id":{"type":"integer","format":"int32","title":"get_fw_leaderboards_characters_character_id","description":"character_id integer"},"amount":{"description":"Amount of kills","type":"integer","format":"int32","title":"get_fw_leaderboards_characters_amount"}},"title":"get_fw_leaderboards_characters_yesterday","description":"yesterday object"},"title":"get_fw_leaderboards_characters_yesterday"},"last_week":{"description":"Top 100 ranking of pilots by kills in the past week","type":"array","maxItems":100,"items":{"type":"object","properties":{"character_id":{"type":"integer","format":"int32","title":"get_fw_leaderboards_characters_character_id","description":"character_id integer"},"amount":{"description":"Amount of kills","type":"integer","format":"int32","title":"get_fw_leaderboards_characters_amount"}},"title":"get_fw_leaderboards_characters_last_week","description":"last_week object"},"title":"get_fw_leaderboards_characters_last_week"},"active_total":{"description":"Top 100 ranking of pilots active in faction warfare by total kills. A pilot is considered \"active\" if they have participated in faction warfare in the past 14 days.","type":"array","maxItems":100,"items":{"type":"object","properties":{"character_id":{"type":"integer","format":"int32","title":"get_fw_leaderboards_characters_character_id","description":"character_id integer"},"amount":{"description":"Amount of kills","type":"integer","format":"int32","title":"get_fw_leaderboards_characters_amount"}},"title":"get_fw_leaderboards_characters_active_total","description":"active_total object"},"title":"get_fw_leaderboards_characters_active_total"}},"title":"get_fw_leaderboards_characters_kills"},"victory_points":{"description":"Top 100 rankings of pilots by victory points from yesterday, last week and in total","type":"object","required":["yesterday","last_week","active_total"],"properties":{"yesterday":{"description":"Top 100 ranking of pilots by victory points in the past day","type":"array","maxItems":100,"items":{"type":"object","properties":{"character_id":{"type":"integer","format":"int32","title":"get_fw_leaderboards_characters_character_id","description":"character_id integer"},"amount":{"description":"Amount of victory points","type":"integer","format":"int32","title":"get_fw_leaderboards_characters_amount"}},"title":"get_fw_leaderboards_characters_yesterday","description":"yesterday object"},"title":"get_fw_leaderboards_characters_yesterday"},"last_week":{"description":"Top 100 ranking of pilots by victory points in the past week","type":"array","maxItems":100,"items":{"type":"object","properties":{"character_id":{"type":"integer","format":"int32","title":"get_fw_leaderboards_characters_character_id","description":"character_id integer"},"amount":{"description":"Amount of victory points","type":"integer","format":"int32","title":"get_fw_leaderboards_characters_amount"}},"title":"get_fw_leaderboards_characters_last_week","description":"last_week object"},"title":"get_fw_leaderboards_characters_last_week"},"active_total":{"description":"Top 100 ranking of pilots active in faction warfare by total victory points. A pilot is considered \"active\" if they have participated in faction warfare in the past 14 days.","type":"array","maxItems":100,"items":{"type":"object","properties":{"character_id":{"type":"integer","format":"int32","title":"get_fw_leaderboards_characters_character_id","description":"character_id integer"},"amount":{"description":"Amount of victory points","type":"integer","format":"int32","title":"get_fw_leaderboards_characters_amount"}},"title":"get_fw_leaderboards_characters_active_total","description":"active_total object"},"title":"get_fw_leaderboards_characters_active_total"}},"title":"get_fw_leaderboards_characters_victory_points"}},"title":"get_fw_leaderboards_characters_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"operationId":"get_fw_leaderboards_characters","x-alternate-versions":["dev","legacy","v1"]}},"/fw/leaderboards/corporations/":{"get":{"summary":"List of the top corporations in faction warfare","description":"Top 10 leaderboard of corporations for kills and victory points separated by total, last week and yesterday.\n\n---\nAlternate route: `/dev/fw/leaderboards/corporations/`\n\nAlternate route: `/legacy/fw/leaderboards/corporations/`\n\nAlternate route: `/v1/fw/leaderboards/corporations/`\n\n---\nThis route expires daily at 11:05","tags":["Faction Warfare"],"responses":{"200":{"description":"Corporation leaderboard of kills and victory points within faction warfare.","examples":{"application/json":{"kills":{"yesterday":[{"corporation_id":1000180,"amount":51},{"corporation_id":1000182,"amount":39}],"last_week":[{"corporation_id":1000180,"amount":290},{"corporation_id":1000182,"amount":169}],"active_total":[{"corporation_id":1000180,"amount":81692},{"corporation_id":1000182,"amount":76793}]},"victory_points":{"yesterday":[{"corporation_id":1000180,"amount":12600},{"corporation_id":1000181,"amount":8240}],"last_week":[{"corporation_id":1000180,"amount":91980},{"corporation_id":1000181,"amount":58920}],"active_total":[{"corporation_id":1000180,"amount":18640927},{"corporation_id":1000181,"amount":18078265}]}}},"schema":{"type":"object","required":["kills","victory_points"],"properties":{"kills":{"type":"object","description":"Top 10 rankings of corporations by number of kills from yesterday, last week and in total.","required":["yesterday","last_week","active_total"],"properties":{"yesterday":{"description":"Top 10 ranking of corporations by kills in the past day","type":"array","maxItems":10,"items":{"type":"object","properties":{"corporation_id":{"type":"integer","format":"int32","title":"get_fw_leaderboards_corporations_corporation_id","description":"corporation_id integer"},"amount":{"description":"Amount of kills","type":"integer","format":"int32","title":"get_fw_leaderboards_corporations_amount"}},"title":"get_fw_leaderboards_corporations_yesterday","description":"yesterday object"},"title":"get_fw_leaderboards_corporations_yesterday"},"last_week":{"description":"Top 10 ranking of corporations by kills in the past week","type":"array","maxItems":10,"items":{"type":"object","properties":{"corporation_id":{"type":"integer","format":"int32","title":"get_fw_leaderboards_corporations_corporation_id","description":"corporation_id integer"},"amount":{"description":"Amount of kills","type":"integer","format":"int32","title":"get_fw_leaderboards_corporations_amount"}},"title":"get_fw_leaderboards_corporations_last_week","description":"last_week object"},"title":"get_fw_leaderboards_corporations_last_week"},"active_total":{"description":"Top 10 ranking of corporations active in faction warfare by total kills. A corporation is considered \"active\" if they have participated in faction warfare in the past 14 days.","type":"array","maxItems":10,"items":{"type":"object","properties":{"corporation_id":{"type":"integer","format":"int32","title":"get_fw_leaderboards_corporations_corporation_id","description":"corporation_id integer"},"amount":{"description":"Amount of kills","type":"integer","format":"int32","title":"get_fw_leaderboards_corporations_amount"}},"title":"get_fw_leaderboards_corporations_active_total","description":"active_total object"},"title":"get_fw_leaderboards_corporations_active_total"}},"title":"get_fw_leaderboards_corporations_kills"},"victory_points":{"description":"Top 10 rankings of corporations by victory points from yesterday, last week and in total","type":"object","required":["yesterday","last_week","active_total"],"properties":{"yesterday":{"description":"Top 10 ranking of corporations by victory points in the past day","type":"array","maxItems":10,"items":{"type":"object","properties":{"corporation_id":{"type":"integer","format":"int32","title":"get_fw_leaderboards_corporations_corporation_id","description":"corporation_id integer"},"amount":{"description":"Amount of victory points","type":"integer","format":"int32","title":"get_fw_leaderboards_corporations_amount"}},"title":"get_fw_leaderboards_corporations_yesterday","description":"yesterday object"},"title":"get_fw_leaderboards_corporations_yesterday"},"last_week":{"description":"Top 10 ranking of corporations by victory points in the past week","type":"array","maxItems":10,"items":{"type":"object","properties":{"corporation_id":{"type":"integer","format":"int32","title":"get_fw_leaderboards_corporations_corporation_id","description":"corporation_id integer"},"amount":{"description":"Amount of victory points","type":"integer","format":"int32","title":"get_fw_leaderboards_corporations_amount"}},"title":"get_fw_leaderboards_corporations_last_week","description":"last_week object"},"title":"get_fw_leaderboards_corporations_last_week"},"active_total":{"description":"Top 10 ranking of corporations active in faction warfare by total victory points. A corporation is considered \"active\" if they have participated in faction warfare in the past 14 days.","type":"array","maxItems":10,"items":{"type":"object","properties":{"corporation_id":{"type":"integer","format":"int32","title":"get_fw_leaderboards_corporations_corporation_id","description":"corporation_id integer"},"amount":{"description":"Amount of victory points","type":"integer","format":"int32","title":"get_fw_leaderboards_corporations_amount"}},"title":"get_fw_leaderboards_corporations_active_total","description":"active_total object"},"title":"get_fw_leaderboards_corporations_active_total"}},"title":"get_fw_leaderboards_corporations_victory_points"}},"title":"get_fw_leaderboards_corporations_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"operationId":"get_fw_leaderboards_corporations","x-alternate-versions":["dev","legacy","v1"]}},"/corporations/{corporation_id}/fw/stats/":{"get":{"summary":"Overview of a corporation involved in faction warfare","description":"Statistics about a corporation involved in faction warfare\n\n---\nAlternate route: `/dev/corporations/{corporation_id}/fw/stats/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/fw/stats/`\n\nAlternate route: `/v1/corporations/{corporation_id}/fw/stats/`\n\n---\nThis route expires daily at 11:05","tags":["Faction Warfare"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Faction warfare statistics for a given corporation","examples":{"application/json":{"faction_id":500001,"enlisted_on":"2017-10-17T00:00:00Z","pilots":28863,"kills":{"yesterday":136,"last_week":893,"total":684350},"victory_points":{"yesterday":15980,"last_week":102640,"total":52658260}}},"schema":{"type":"object","required":["kills","victory_points"],"properties":{"faction_id":{"type":"integer","format":"int32","description":"The faction the given corporation is enlisted to fight for. Will not be included if corporation is not enlisted in faction warfare","title":"get_corporations_corporation_id_fw_stats_faction_id"},"enlisted_on":{"type":"string","format":"date-time","description":"The enlistment date of the given corporation into faction warfare. Will not be included if corporation is not enlisted in faction warfare","title":"get_corporations_corporation_id_fw_stats_enlisted_on"},"pilots":{"type":"integer","format":"int32","description":"How many pilots the enlisted corporation has. Will not be included if corporation is not enlisted in faction warfare","title":"get_corporations_corporation_id_fw_stats_pilots"},"kills":{"type":"object","description":"Summary of kills done by the given corporation against enemy factions","required":["yesterday","last_week","total"],"properties":{"yesterday":{"type":"integer","format":"int32","description":"Yesterday's total number of kills by members of the given corporation against enemy factions","title":"get_corporations_corporation_id_fw_stats_yesterday"},"last_week":{"type":"integer","format":"int32","description":"Last week's total number of kills by members of the given corporation against enemy factions","title":"get_corporations_corporation_id_fw_stats_last_week"},"total":{"type":"integer","format":"int32","description":"Total number of kills by members of the given corporation against enemy factions since the corporation enlisted","title":"get_corporations_corporation_id_fw_stats_total"}},"title":"get_corporations_corporation_id_fw_stats_kills"},"victory_points":{"type":"object","description":"Summary of victory points gained by the given corporation for the enlisted faction","required":["yesterday","last_week","total"],"properties":{"yesterday":{"type":"integer","format":"int32","description":"Yesterday's victory points gained by members of the given corporation","title":"get_corporations_corporation_id_fw_stats_yesterday"},"last_week":{"type":"integer","format":"int32","description":"Last week's victory points gained by members of the given corporation","title":"get_corporations_corporation_id_fw_stats_last_week"},"total":{"type":"integer","format":"int32","description":"Total victory points gained since the given corporation enlisted","title":"get_corporations_corporation_id_fw_stats_total"}},"title":"get_corporations_corporation_id_fw_stats_victory_points"}},"title":"get_corporations_corporation_id_fw_stats_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"x-required-roles":[],"security":[{"evesso":["esi-corporations.read_fw_stats.v1"]}],"operationId":"get_corporations_corporation_id_fw_stats","x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/fw/stats/":{"get":{"summary":"Overview of a character involved in faction warfare","description":"Statistical overview of a character involved in faction warfare\n\n---\nAlternate route: `/dev/characters/{character_id}/fw/stats/`\n\nAlternate route: `/legacy/characters/{character_id}/fw/stats/`\n\nAlternate route: `/v1/characters/{character_id}/fw/stats/`\n\n---\nThis route expires daily at 11:05","tags":["Faction Warfare"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Faction warfare statistics for a given character","examples":{"application/json":{"faction_id":500001,"enlisted_on":"2017-10-17T00:00:00Z","kills":{"yesterday":136,"last_week":893,"total":684350},"victory_points":{"yesterday":15980,"last_week":102640,"total":52658260}}},"schema":{"type":"object","required":["kills","victory_points"],"properties":{"faction_id":{"type":"integer","format":"int32","description":"The faction the given character is enlisted to fight for. Will not be included if character is not enlisted in faction warfare","title":"get_characters_character_id_fw_stats_faction_id"},"enlisted_on":{"type":"string","format":"date-time","description":"The enlistment date of the given character into faction warfare. Will not be included if character is not enlisted in faction warfare","title":"get_characters_character_id_fw_stats_enlisted_on"},"current_rank":{"type":"integer","format":"int32","description":"The given character's current faction rank","minimum":0,"maximum":9,"title":"get_characters_character_id_fw_stats_current_rank"},"highest_rank":{"type":"integer","format":"int32","description":"The given character's highest faction rank achieved","minimum":0,"maximum":9,"title":"get_characters_character_id_fw_stats_highest_rank"},"kills":{"type":"object","description":"Summary of kills done by the given character against enemy factions","required":["yesterday","last_week","total"],"properties":{"yesterday":{"type":"integer","format":"int32","description":"Yesterday's total number of kills by a given character against enemy factions","title":"get_characters_character_id_fw_stats_yesterday"},"last_week":{"type":"integer","format":"int32","description":"Last week's total number of kills by a given character against enemy factions","title":"get_characters_character_id_fw_stats_last_week"},"total":{"type":"integer","format":"int32","description":"Total number of kills by a given character against enemy factions since the character enlisted","title":"get_characters_character_id_fw_stats_total"}},"title":"get_characters_character_id_fw_stats_kills"},"victory_points":{"type":"object","description":"Summary of victory points gained by the given character for the enlisted faction","required":["yesterday","last_week","total"],"properties":{"yesterday":{"type":"integer","format":"int32","description":"Yesterday's victory points gained by the given character","title":"get_characters_character_id_fw_stats_yesterday"},"last_week":{"type":"integer","format":"int32","description":"Last week's victory points gained by the given character","title":"get_characters_character_id_fw_stats_last_week"},"total":{"type":"integer","format":"int32","description":"Total victory points gained since the given character enlisted","title":"get_characters_character_id_fw_stats_total"}},"title":"get_characters_character_id_fw_stats_victory_points"}},"title":"get_characters_character_id_fw_stats_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-characters.read_fw_stats.v1"]}],"operationId":"get_characters_character_id_fw_stats","x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/fittings/{fitting_id}/":{"delete":{"description":"Delete a fitting from a character\n\n---\nAlternate route: `/dev/characters/{character_id}/fittings/{fitting_id}/`\n\nAlternate route: `/legacy/characters/{character_id}/fittings/{fitting_id}/`\n\nAlternate route: `/v1/characters/{character_id}/fittings/{fitting_id}/`\n","summary":"Delete fitting","tags":["Fittings"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"name":"fitting_id","in":"path","description":"ID for a fitting of this character","required":true,"type":"integer","format":"int32"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"204":{"description":"Fitting deleted"},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-fittings.write_fittings.v1"]}],"operationId":"delete_characters_character_id_fittings_fitting_id","x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/fittings/":{"get":{"description":"Return fittings of a character\n\n---\nAlternate route: `/dev/characters/{character_id}/fittings/`\n\nAlternate route: `/legacy/characters/{character_id}/fittings/`\n\nAlternate route: `/v1/characters/{character_id}/fittings/`\n\n---\nThis route is cached for up to 300 seconds","summary":"Get fittings","tags":["Fittings"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of fittings","examples":{"application/json":[{"fitting_id":1,"name":"Best Vindicator","description":"Awesome Vindi fitting","ship_type_id":123,"items":[{"type_id":1234,"flag":12,"quantity":1}]}]},"schema":{"type":"array","maxItems":250,"items":{"type":"object","required":["fitting_id","name","description","ship_type_id","items"],"properties":{"fitting_id":{"type":"integer","format":"int32","title":"get_characters_character_id_fittings_fitting_id","description":"fitting_id integer"},"name":{"type":"string","title":"get_characters_character_id_fittings_name","description":"name string"},"description":{"type":"string","title":"get_characters_character_id_fittings_description","description":"description string"},"ship_type_id":{"type":"integer","format":"int32","title":"get_characters_character_id_fittings_ship_type_id","description":"ship_type_id integer"},"items":{"type":"array","maxItems":255,"items":{"type":"object","required":["type_id","flag","quantity"],"properties":{"type_id":{"type":"integer","format":"int32","title":"get_characters_character_id_fittings_type_id","description":"type_id integer"},"flag":{"type":"integer","format":"int32","title":"get_characters_character_id_fittings_flag","description":"flag integer"},"quantity":{"type":"integer","format":"int32","title":"get_characters_character_id_fittings_quantity","description":"quantity integer"}},"title":"get_characters_character_id_fittings_item","description":"item object"},"title":"get_characters_character_id_fittings_items","description":"items array"}},"title":"get_characters_character_id_fittings_200_ok","description":"200 ok object"},"title":"get_characters_character_id_fittings_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-fittings.read_fittings.v1"]}],"operationId":"get_characters_character_id_fittings","x-cached-seconds":300,"x-alternate-versions":["dev","legacy","v1"]},"post":{"description":"Save a new fitting for a character\n\n---\nAlternate route: `/dev/characters/{character_id}/fittings/`\n\nAlternate route: `/legacy/characters/{character_id}/fittings/`\n\nAlternate route: `/v1/characters/{character_id}/fittings/`\n","summary":"Create fitting","tags":["Fittings"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"name":"fitting","in":"body","description":"Details about the new fitting","schema":{"type":"object","required":["name","description","ship_type_id","items"],"properties":{"name":{"type":"string","minLength":1,"maxLength":50,"title":"post_characters_character_id_fittings_name","description":"name string"},"description":{"type":"string","minLength":0,"maxLength":500,"title":"post_characters_character_id_fittings_description","description":"description string"},"ship_type_id":{"type":"integer","format":"int32","title":"post_characters_character_id_fittings_ship_type_id","description":"ship_type_id integer"},"items":{"type":"array","minItems":1,"maxItems":255,"items":{"type":"object","required":["type_id","flag","quantity"],"properties":{"type_id":{"type":"integer","format":"int32","title":"post_characters_character_id_fittings_type_id","description":"type_id integer"},"flag":{"type":"integer","format":"int32","title":"post_characters_character_id_fittings_flag","description":"flag integer"},"quantity":{"type":"integer","format":"int32","title":"post_characters_character_id_fittings_quantity","description":"quantity integer"}},"title":"post_characters_character_id_fittings_item","description":"item object"},"title":"post_characters_character_id_fittings_items","description":"items array"}},"title":"post_characters_character_id_fittings_fitting","description":"fitting object"}},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"201":{"description":"A list of fittings","examples":{"application/json":{"fitting_id":2}},"schema":{"type":"object","required":["fitting_id"],"properties":{"fitting_id":{"type":"integer","format":"int32","title":"post_characters_character_id_fittings_fitting_id","description":"fitting_id integer"}},"title":"post_characters_character_id_fittings_created","description":"201 created object"}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-fittings.write_fittings.v1"]}],"operationId":"post_characters_character_id_fittings","x-alternate-versions":["dev","legacy","v1"]}},"/fleets/{fleet_id}/":{"get":{"description":"Return details about a fleet\n\n---\nAlternate route: `/dev/fleets/{fleet_id}/`\n\nAlternate route: `/legacy/fleets/{fleet_id}/`\n\nAlternate route: `/v1/fleets/{fleet_id}/`\n\n---\nThis route is cached for up to 5 seconds","summary":"Get fleet information","tags":["Fleets"],"parameters":[{"$ref":"#/parameters/datasource"},{"name":"fleet_id","in":"path","description":"ID for a fleet","required":true,"type":"integer","format":"int64"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Details about a fleet","examples":{"application/json":{"motd":"This is an awesome fleet!","is_free_move":false,"is_registered":false,"is_voice_enabled":false}},"schema":{"type":"object","required":["motd","is_free_move","is_registered","is_voice_enabled"],"properties":{"motd":{"type":"string","description":"Fleet MOTD in CCP flavoured HTML","title":"get_fleets_fleet_id_motd"},"is_free_move":{"type":"boolean","description":"Is free-move enabled","title":"get_fleets_fleet_id_is_free_move"},"is_registered":{"type":"boolean","description":"Does the fleet have an active fleet advertisement","title":"get_fleets_fleet_id_is_registered"},"is_voice_enabled":{"type":"boolean","description":"Is EVE Voice enabled","title":"get_fleets_fleet_id_is_voice_enabled"}},"title":"get_fleets_fleet_id_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"404":{"description":"The fleet does not exist or you don't have access to it","schema":{"type":"object","title":"get_fleets_fleet_id_not_found","description":"Not found","properties":{"error":{"type":"string","description":"Not found message","title":"get_fleets_fleet_id_404_not_found"}}},"examples":{"application/json":{"error":"Not found message"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-fleets.read_fleet.v1"]}],"operationId":"get_fleets_fleet_id","x-cached-seconds":5,"x-alternate-versions":["dev","legacy","v1"]},"put":{"description":"Update settings about a fleet\n\n---\nAlternate route: `/dev/fleets/{fleet_id}/`\n\nAlternate route: `/legacy/fleets/{fleet_id}/`\n\nAlternate route: `/v1/fleets/{fleet_id}/`\n","summary":"Update fleet","tags":["Fleets"],"parameters":[{"$ref":"#/parameters/datasource"},{"name":"fleet_id","in":"path","description":"ID for a fleet","required":true,"type":"integer","format":"int64"},{"name":"new_settings","in":"body","description":"What to update for this fleet","required":true,"schema":{"type":"object","properties":{"motd":{"type":"string","description":"New fleet MOTD in CCP flavoured HTML","title":"put_fleets_fleet_id_motd"},"is_free_move":{"type":"boolean","description":"Should free-move be enabled in the fleet","title":"put_fleets_fleet_id_is_free_move"}},"title":"put_fleets_fleet_id_new_settings","description":"new_settings object"}},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"204":{"description":"Fleet updated"},"400":{"description":"Invalid request body","schema":{"type":"object","title":"put_fleets_fleet_id_bad_request","description":"Bad request","properties":{"error":{"type":"string","description":"Bad request message","title":"put_fleets_fleet_id_400_bad_request"}}},"examples":{"application/json":{"error":"Bad request message"}}},"404":{"description":"The fleet does not exist or you don't have access to it","schema":{"type":"object","title":"put_fleets_fleet_id_not_found","description":"Not found","properties":{"error":{"type":"string","description":"Not found message","title":"put_fleets_fleet_id_404_not_found"}}},"examples":{"application/json":{"error":"Not found message"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-fleets.write_fleet.v1"]}],"operationId":"put_fleets_fleet_id","x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/fleet/":{"get":{"description":"Return the fleet ID the character is in, if any.\n\n---\nAlternate route: `/dev/characters/{character_id}/fleet/`\n\nAlternate route: `/legacy/characters/{character_id}/fleet/`\n\nAlternate route: `/v1/characters/{character_id}/fleet/`\n\n---\nThis route is cached for up to 60 seconds","summary":"Get character fleet info","tags":["Fleets"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Details about the character's fleet","examples":{"application/json":{"fleet_id":1234567890,"wing_id":-1,"squad_id":-1,"role":"fleet_commander"}},"schema":{"type":"object","required":["fleet_id","wing_id","squad_id","role"],"properties":{"fleet_id":{"type":"integer","format":"int64","description":"The character's current fleet ID","title":"get_characters_character_id_fleet_fleet_id"},"wing_id":{"type":"integer","format":"int64","description":"ID of the wing the member is in. If not applicable, will be set to -1","title":"get_characters_character_id_fleet_wing_id"},"squad_id":{"type":"integer","format":"int64","description":"ID of the squad the member is in. If not applicable, will be set to -1","title":"get_characters_character_id_fleet_squad_id"},"role":{"type":"string","description":"Member\u2019s role in fleet","enum":["fleet_commander","squad_commander","squad_member","wing_commander"],"title":"get_characters_character_id_fleet_role"}},"title":"get_characters_character_id_fleet_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"404":{"description":"The character is not in a fleet","schema":{"type":"object","title":"get_characters_character_id_fleet_not_found","description":"Not found","properties":{"error":{"type":"string","description":"Not found message","title":"get_characters_character_id_fleet_404_not_found"}}},"examples":{"application/json":{"error":"Not found message"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-fleets.read_fleet.v1"]}],"operationId":"get_characters_character_id_fleet","x-cached-seconds":60,"x-alternate-versions":["dev","legacy","v1"]}},"/fleets/{fleet_id}/members/":{"get":{"description":"Return information about fleet members\n\n---\nAlternate route: `/dev/fleets/{fleet_id}/members/`\n\nAlternate route: `/legacy/fleets/{fleet_id}/members/`\n\nAlternate route: `/v1/fleets/{fleet_id}/members/`\n\n---\nThis route is cached for up to 5 seconds","summary":"Get fleet members","tags":["Fleets"],"parameters":[{"$ref":"#/parameters/datasource"},{"name":"fleet_id","in":"path","description":"ID for a fleet","required":true,"type":"integer","format":"int64"},{"$ref":"#/parameters/language"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of fleet members","examples":{"application/json":[{"character_id":93265215,"ship_type_id":33328,"wing_id":2073711261968,"squad_id":3129411261968,"role":"squad_commander","role_name":"Squad Commander (Boss)","join_time":"2016-04-29T12:34:56Z","takes_fleet_warp":true,"solar_system_id":30003729,"station_id":61000180}]},"schema":{"type":"array","maxItems":256,"items":{"type":"object","required":["character_id","ship_type_id","wing_id","squad_id","role","role_name","join_time","takes_fleet_warp","solar_system_id"],"properties":{"character_id":{"type":"integer","format":"int32","title":"get_fleets_fleet_id_members_character_id","description":"character_id integer"},"ship_type_id":{"type":"integer","format":"int32","title":"get_fleets_fleet_id_members_ship_type_id","description":"ship_type_id integer"},"wing_id":{"type":"integer","format":"int64","description":"ID of the wing the member is in. If not applicable, will be set to -1","title":"get_fleets_fleet_id_members_wing_id"},"squad_id":{"type":"integer","format":"int64","description":"ID of the squad the member is in. If not applicable, will be set to -1","title":"get_fleets_fleet_id_members_squad_id"},"role":{"type":"string","description":"Member\u2019s role in fleet","enum":["fleet_commander","wing_commander","squad_commander","squad_member"],"title":"get_fleets_fleet_id_members_role"},"role_name":{"type":"string","description":"Localized role names","title":"get_fleets_fleet_id_members_role_name"},"join_time":{"type":"string","format":"date-time","title":"get_fleets_fleet_id_members_join_time","description":"join_time string"},"takes_fleet_warp":{"type":"boolean","description":"Whether the member take fleet warps","title":"get_fleets_fleet_id_members_takes_fleet_warp"},"solar_system_id":{"type":"integer","format":"int32","description":"Solar system the member is located in","title":"get_fleets_fleet_id_members_solar_system_id"},"station_id":{"type":"integer","format":"int64","description":"Station in which the member is docked in, if applicable","title":"get_fleets_fleet_id_members_station_id"}},"title":"get_fleets_fleet_id_members_200_ok","description":"200 ok object"},"title":"get_fleets_fleet_id_members_ok","description":"200 ok array"},"headers":{"Content-Language":{"description":"The language used in the response","type":"string","enum":["de","en-us","fr","ja","ru","zh"]},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"404":{"description":"The fleet does not exist or you don't have access to it","schema":{"type":"object","title":"get_fleets_fleet_id_members_not_found","description":"Not found","properties":{"error":{"type":"string","description":"Not found message","title":"get_fleets_fleet_id_members_404_not_found"}}},"examples":{"application/json":{"error":"Not found message"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-fleets.read_fleet.v1"]}],"operationId":"get_fleets_fleet_id_members","x-cached-seconds":5,"x-alternate-versions":["dev","legacy","v1"]},"post":{"description":"Invite a character into the fleet. If a character has a CSPA charge set it is not possible to invite them to the fleet using ESI\n\n---\nAlternate route: `/dev/fleets/{fleet_id}/members/`\n\nAlternate route: `/legacy/fleets/{fleet_id}/members/`\n\nAlternate route: `/v1/fleets/{fleet_id}/members/`\n","summary":"Create fleet invitation","tags":["Fleets"],"parameters":[{"$ref":"#/parameters/datasource"},{"name":"fleet_id","in":"path","description":"ID for a fleet","required":true,"type":"integer","format":"int64"},{"name":"invitation","in":"body","description":"Details of the invitation","required":true,"schema":{"type":"object","required":["character_id","role"],"properties":{"character_id":{"type":"integer","format":"int32","description":"The character you want to invite","title":"post_fleets_fleet_id_members_character_id"},"role":{"type":"string","description":"If a character is invited with the `fleet_commander` role, neither `wing_id` or `squad_id` should be specified. If a character is invited with the `wing_commander` role, only `wing_id` should be specified. If a character is invited with the `squad_commander` role, both `wing_id` and `squad_id` should be specified. If a character is invited with the `squad_member` role, `wing_id` and `squad_id` should either both be specified or not specified at all. If they aren\u2019t specified, the invited character will join any squad with available positions.","enum":["fleet_commander","wing_commander","squad_commander","squad_member"],"title":"post_fleets_fleet_id_members_role"},"wing_id":{"type":"integer","format":"int64","minimum":0,"title":"post_fleets_fleet_id_members_wing_id","description":"wing_id integer"},"squad_id":{"type":"integer","format":"int64","minimum":0,"title":"post_fleets_fleet_id_members_squad_id","description":"squad_id integer"}},"title":"post_fleets_fleet_id_members_invitation","description":"invitation object"}},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"204":{"description":"Fleet invitation sent"},"404":{"description":"The fleet does not exist or you don't have access to it","schema":{"type":"object","title":"post_fleets_fleet_id_members_not_found","description":"Not found","properties":{"error":{"type":"string","description":"Not found message","title":"post_fleets_fleet_id_members_404_not_found"}}},"examples":{"application/json":{"error":"Not found message"}}},"422":{"description":"Errors in invitation","examples":{"application/json":{"error":"missing wing_id"}},"schema":{"type":"object","properties":{"error":{"type":"string","description":"error message","title":"post_fleets_fleet_id_members_error"}},"title":"post_fleets_fleet_id_members_unprocessable_entity","description":"422 unprocessable entity object"}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-fleets.write_fleet.v1"]}],"operationId":"post_fleets_fleet_id_members","x-alternate-versions":["dev","legacy","v1"]}},"/fleets/{fleet_id}/members/{member_id}/":{"delete":{"description":"Kick a fleet member\n\n---\nAlternate route: `/dev/fleets/{fleet_id}/members/{member_id}/`\n\nAlternate route: `/legacy/fleets/{fleet_id}/members/{member_id}/`\n\nAlternate route: `/v1/fleets/{fleet_id}/members/{member_id}/`\n","summary":"Kick fleet member","tags":["Fleets"],"parameters":[{"$ref":"#/parameters/datasource"},{"name":"fleet_id","in":"path","description":"ID for a fleet","required":true,"type":"integer","format":"int64"},{"name":"member_id","in":"path","description":"The character ID of a member in this fleet","required":true,"type":"integer","format":"int32"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"204":{"description":"Fleet member kicked"},"404":{"description":"The fleet does not exist or you don't have access to it","schema":{"type":"object","title":"delete_fleets_fleet_id_members_member_id_not_found","description":"Not found","properties":{"error":{"type":"string","description":"Not found message","title":"delete_fleets_fleet_id_members_member_id_404_not_found"}}},"examples":{"application/json":{"error":"Not found message"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-fleets.write_fleet.v1"]}],"operationId":"delete_fleets_fleet_id_members_member_id","x-alternate-versions":["dev","legacy","v1"]},"put":{"description":"Move a fleet member around\n\n---\nAlternate route: `/dev/fleets/{fleet_id}/members/{member_id}/`\n\nAlternate route: `/legacy/fleets/{fleet_id}/members/{member_id}/`\n\nAlternate route: `/v1/fleets/{fleet_id}/members/{member_id}/`\n","summary":"Move fleet member","tags":["Fleets"],"parameters":[{"$ref":"#/parameters/datasource"},{"name":"fleet_id","in":"path","description":"ID for a fleet","required":true,"type":"integer","format":"int64"},{"name":"member_id","in":"path","description":"The character ID of a member in this fleet","required":true,"type":"integer","format":"int32"},{"name":"movement","in":"body","description":"Details of the invitation","required":true,"schema":{"type":"object","required":["role"],"properties":{"role":{"type":"string","description":"If a character is moved to the `fleet_commander` role, neither `wing_id` or `squad_id` should be specified. If a character is moved to the `wing_commander` role, only `wing_id` should be specified. If a character is moved to the `squad_commander` role, both `wing_id` and `squad_id` should be specified. If a character is moved to the `squad_member` role, both `wing_id` and `squad_id` should be specified.","enum":["fleet_commander","wing_commander","squad_commander","squad_member"],"title":"put_fleets_fleet_id_members_member_id_role"},"wing_id":{"type":"integer","format":"int64","minimum":0,"title":"put_fleets_fleet_id_members_member_id_wing_id","description":"wing_id integer"},"squad_id":{"type":"integer","format":"int64","minimum":0,"title":"put_fleets_fleet_id_members_member_id_squad_id","description":"squad_id integer"}},"title":"put_fleets_fleet_id_members_member_id_movement","description":"movement object"}},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"204":{"description":"Fleet invitation sent"},"404":{"description":"The fleet does not exist or you don't have access to it","schema":{"type":"object","title":"put_fleets_fleet_id_members_member_id_not_found","description":"Not found","properties":{"error":{"type":"string","description":"Not found message","title":"put_fleets_fleet_id_members_member_id_404_not_found"}}},"examples":{"application/json":{"error":"Not found message"}}},"422":{"description":"Errors in invitation","examples":{"application/json":{"error":"missing wing_id"}},"schema":{"type":"object","properties":{"error":{"type":"string","description":"error message","title":"put_fleets_fleet_id_members_member_id_error"}},"title":"put_fleets_fleet_id_members_member_id_unprocessable_entity","description":"422 unprocessable entity object"}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-fleets.write_fleet.v1"]}],"operationId":"put_fleets_fleet_id_members_member_id","x-alternate-versions":["dev","legacy","v1"]}},"/fleets/{fleet_id}/wings/":{"get":{"description":"Return information about wings in a fleet\n\n---\nAlternate route: `/dev/fleets/{fleet_id}/wings/`\n\nAlternate route: `/legacy/fleets/{fleet_id}/wings/`\n\nAlternate route: `/v1/fleets/{fleet_id}/wings/`\n\n---\nThis route is cached for up to 5 seconds","summary":"Get fleet wings","tags":["Fleets"],"parameters":[{"$ref":"#/parameters/datasource"},{"name":"fleet_id","in":"path","description":"ID for a fleet","required":true,"type":"integer","format":"int64"},{"$ref":"#/parameters/language"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of fleet wings","examples":{"application/json":[{"name":"Wing 1","id":2073711261968,"squads":[{"name":"Squad 1","id":3129411261968}]}]},"schema":{"type":"array","maxItems":25,"items":{"type":"object","required":["name","id","squads"],"properties":{"name":{"type":"string","title":"get_fleets_fleet_id_wings_name","description":"name string"},"id":{"type":"integer","format":"int64","title":"get_fleets_fleet_id_wings_id","description":"id integer"},"squads":{"type":"array","maxItems":25,"items":{"type":"object","required":["name","id"],"properties":{"name":{"type":"string","title":"get_fleets_fleet_id_wings_name","description":"name string"},"id":{"type":"integer","format":"int64","title":"get_fleets_fleet_id_wings_id","description":"id integer"}},"title":"get_fleets_fleet_id_wings_squad","description":"squad object"},"title":"get_fleets_fleet_id_wings_squads","description":"squads array"}},"title":"get_fleets_fleet_id_wings_200_ok","description":"200 ok object"},"title":"get_fleets_fleet_id_wings_ok","description":"200 ok array"},"headers":{"Content-Language":{"description":"The language used in the response","type":"string","enum":["de","en-us","fr","ja","ru","zh"]},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"404":{"description":"The fleet does not exist or you don't have access to it","schema":{"type":"object","title":"get_fleets_fleet_id_wings_not_found","description":"Not found","properties":{"error":{"type":"string","description":"Not found message","title":"get_fleets_fleet_id_wings_404_not_found"}}},"examples":{"application/json":{"error":"Not found message"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-fleets.read_fleet.v1"]}],"operationId":"get_fleets_fleet_id_wings","x-cached-seconds":5,"x-alternate-versions":["dev","legacy","v1"]},"post":{"description":"Create a new wing in a fleet\n\n---\nAlternate route: `/dev/fleets/{fleet_id}/wings/`\n\nAlternate route: `/legacy/fleets/{fleet_id}/wings/`\n\nAlternate route: `/v1/fleets/{fleet_id}/wings/`\n","summary":"Create fleet wing","tags":["Fleets"],"parameters":[{"$ref":"#/parameters/datasource"},{"name":"fleet_id","in":"path","description":"ID for a fleet","required":true,"type":"integer","format":"int64"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"201":{"description":"Wing created","examples":{"application/json":{"wing_id":123}},"schema":{"type":"object","required":["wing_id"],"properties":{"wing_id":{"type":"integer","format":"int64","description":"The wing_id of the newly created wing","title":"post_fleets_fleet_id_wings_wing_id"}},"title":"post_fleets_fleet_id_wings_created","description":"201 created object"}},"404":{"description":"The fleet does not exist or you don't have access to it","schema":{"type":"object","title":"post_fleets_fleet_id_wings_not_found","description":"Not found","properties":{"error":{"type":"string","description":"Not found message","title":"post_fleets_fleet_id_wings_404_not_found"}}},"examples":{"application/json":{"error":"Not found message"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-fleets.write_fleet.v1"]}],"operationId":"post_fleets_fleet_id_wings","x-alternate-versions":["dev","legacy","v1"]}},"/fleets/{fleet_id}/wings/{wing_id}/":{"delete":{"description":"Delete a fleet wing, only empty wings can be deleted. The wing may contain squads, but the squads must be empty\n\n---\nAlternate route: `/dev/fleets/{fleet_id}/wings/{wing_id}/`\n\nAlternate route: `/legacy/fleets/{fleet_id}/wings/{wing_id}/`\n\nAlternate route: `/v1/fleets/{fleet_id}/wings/{wing_id}/`\n","summary":"Delete fleet wing","tags":["Fleets"],"parameters":[{"$ref":"#/parameters/datasource"},{"name":"fleet_id","in":"path","description":"ID for a fleet","required":true,"type":"integer","format":"int64"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"name":"wing_id","in":"path","description":"The wing to delete","required":true,"type":"integer","format":"int64"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"204":{"description":"Wing deleted"},"404":{"description":"The fleet does not exist or you don't have access to it","schema":{"type":"object","title":"delete_fleets_fleet_id_wings_wing_id_not_found","description":"Not found","properties":{"error":{"type":"string","description":"Not found message","title":"delete_fleets_fleet_id_wings_wing_id_404_not_found"}}},"examples":{"application/json":{"error":"Not found message"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-fleets.write_fleet.v1"]}],"operationId":"delete_fleets_fleet_id_wings_wing_id","x-alternate-versions":["dev","legacy","v1"]},"put":{"description":"Rename a fleet wing\n\n---\nAlternate route: `/dev/fleets/{fleet_id}/wings/{wing_id}/`\n\nAlternate route: `/legacy/fleets/{fleet_id}/wings/{wing_id}/`\n\nAlternate route: `/v1/fleets/{fleet_id}/wings/{wing_id}/`\n","summary":"Rename fleet wing","tags":["Fleets"],"parameters":[{"$ref":"#/parameters/datasource"},{"name":"fleet_id","in":"path","description":"ID for a fleet","required":true,"type":"integer","format":"int64"},{"name":"naming","in":"body","description":"New name of the wing","required":true,"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","maxLength":10,"title":"put_fleets_fleet_id_wings_wing_id_name","description":"name string"}},"title":"put_fleets_fleet_id_wings_wing_id_naming","description":"naming object"}},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"name":"wing_id","in":"path","description":"The wing to rename","required":true,"type":"integer","format":"int64"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"204":{"description":"Wing renamed"},"404":{"description":"The fleet does not exist or you don't have access to it","schema":{"type":"object","title":"put_fleets_fleet_id_wings_wing_id_not_found","description":"Not found","properties":{"error":{"type":"string","description":"Not found message","title":"put_fleets_fleet_id_wings_wing_id_404_not_found"}}},"examples":{"application/json":{"error":"Not found message"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-fleets.write_fleet.v1"]}],"operationId":"put_fleets_fleet_id_wings_wing_id","x-alternate-versions":["dev","legacy","v1"]}},"/fleets/{fleet_id}/wings/{wing_id}/squads/":{"post":{"description":"Create a new squad in a fleet\n\n---\nAlternate route: `/dev/fleets/{fleet_id}/wings/{wing_id}/squads/`\n\nAlternate route: `/legacy/fleets/{fleet_id}/wings/{wing_id}/squads/`\n\nAlternate route: `/v1/fleets/{fleet_id}/wings/{wing_id}/squads/`\n","summary":"Create fleet squad","tags":["Fleets"],"parameters":[{"$ref":"#/parameters/datasource"},{"name":"fleet_id","in":"path","description":"ID for a fleet","required":true,"type":"integer","format":"int64"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"name":"wing_id","in":"path","description":"The wing_id to create squad in","required":true,"type":"integer","format":"int64"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"201":{"description":"Squad created","examples":{"application/json":{"squad_id":123}},"schema":{"type":"object","required":["squad_id"],"properties":{"squad_id":{"type":"integer","format":"int64","description":"The squad_id of the newly created squad","title":"post_fleets_fleet_id_wings_wing_id_squads_squad_id"}},"title":"post_fleets_fleet_id_wings_wing_id_squads_created","description":"201 created object"}},"404":{"description":"The fleet does not exist or you don't have access to it","schema":{"type":"object","title":"post_fleets_fleet_id_wings_wing_id_squads_not_found","description":"Not found","properties":{"error":{"type":"string","description":"Not found message","title":"post_fleets_fleet_id_wings_wing_id_squads_404_not_found"}}},"examples":{"application/json":{"error":"Not found message"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-fleets.write_fleet.v1"]}],"operationId":"post_fleets_fleet_id_wings_wing_id_squads","x-alternate-versions":["dev","legacy","v1"]}},"/fleets/{fleet_id}/squads/{squad_id}/":{"delete":{"description":"Delete a fleet squad, only empty squads can be deleted\n\n---\nAlternate route: `/dev/fleets/{fleet_id}/squads/{squad_id}/`\n\nAlternate route: `/legacy/fleets/{fleet_id}/squads/{squad_id}/`\n\nAlternate route: `/v1/fleets/{fleet_id}/squads/{squad_id}/`\n","summary":"Delete fleet squad","tags":["Fleets"],"parameters":[{"$ref":"#/parameters/datasource"},{"name":"fleet_id","in":"path","description":"ID for a fleet","required":true,"type":"integer","format":"int64"},{"name":"squad_id","in":"path","description":"The squad to delete","required":true,"type":"integer","format":"int64"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"204":{"description":"Squad deleted"},"404":{"description":"The fleet does not exist or you don't have access to it","schema":{"type":"object","title":"delete_fleets_fleet_id_squads_squad_id_not_found","description":"Not found","properties":{"error":{"type":"string","description":"Not found message","title":"delete_fleets_fleet_id_squads_squad_id_404_not_found"}}},"examples":{"application/json":{"error":"Not found message"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-fleets.write_fleet.v1"]}],"operationId":"delete_fleets_fleet_id_squads_squad_id","x-alternate-versions":["dev","legacy","v1"]},"put":{"description":"Rename a fleet squad\n\n---\nAlternate route: `/dev/fleets/{fleet_id}/squads/{squad_id}/`\n\nAlternate route: `/legacy/fleets/{fleet_id}/squads/{squad_id}/`\n\nAlternate route: `/v1/fleets/{fleet_id}/squads/{squad_id}/`\n","summary":"Rename fleet squad","tags":["Fleets"],"parameters":[{"$ref":"#/parameters/datasource"},{"name":"fleet_id","in":"path","description":"ID for a fleet","required":true,"type":"integer","format":"int64"},{"name":"naming","in":"body","description":"New name of the squad","required":true,"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","maxLength":10,"title":"put_fleets_fleet_id_squads_squad_id_name","description":"name string"}},"title":"put_fleets_fleet_id_squads_squad_id_naming","description":"naming object"}},{"name":"squad_id","in":"path","description":"The squad to rename","required":true,"type":"integer","format":"int64"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"204":{"description":"Squad renamed"},"404":{"description":"The fleet does not exist or you don't have access to it","schema":{"type":"object","title":"put_fleets_fleet_id_squads_squad_id_not_found","description":"Not found","properties":{"error":{"type":"string","description":"Not found message","title":"put_fleets_fleet_id_squads_squad_id_404_not_found"}}},"examples":{"application/json":{"error":"Not found message"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-fleets.write_fleet.v1"]}],"operationId":"put_fleets_fleet_id_squads_squad_id","x-alternate-versions":["dev","legacy","v1"]}},"/incursions/":{"get":{"description":"Return a list of current incursions\n\n---\nAlternate route: `/dev/incursions/`\n\nAlternate route: `/legacy/incursions/`\n\nAlternate route: `/v1/incursions/`\n\n---\nThis route is cached for up to 300 seconds","summary":"List incursions","tags":["Incursions"],"responses":{"200":{"description":"A list of incursions","examples":{"application/json":[{"type":"Incursion","state":"mobilizing","influence":0.9,"has_boss":true,"faction_id":500019,"constellation_id":20000607,"staging_solar_system_id":30004154,"infested_solar_systems":[30004148,30004149,30004150,30004151,30004152,30004153,30004154]}]},"schema":{"type":"array","maxItems":100,"items":{"type":"object","required":["type","state","influence","has_boss","faction_id","constellation_id","staging_solar_system_id","infested_solar_systems"],"properties":{"type":{"type":"string","description":"The type of this incursion","title":"get_incursions_type"},"state":{"type":"string","enum":["withdrawing","mobilizing","established"],"description":"The state of this incursion","title":"get_incursions_state"},"influence":{"type":"number","format":"float","description":"Influence of this incursion as a float from 0 to 1","title":"get_incursions_influence"},"has_boss":{"type":"boolean","description":"Whether the final encounter has boss or not","title":"get_incursions_has_boss"},"faction_id":{"type":"integer","format":"int32","description":"The attacking faction's id","title":"get_incursions_faction_id"},"constellation_id":{"type":"integer","format":"int32","description":"The constellation id in which this incursion takes place","title":"get_incursions_constellation_id"},"staging_solar_system_id":{"type":"integer","format":"int32","description":"Staging solar system for this incursion","title":"get_incursions_staging_solar_system_id"},"infested_solar_systems":{"type":"array","description":"A list of infested solar system ids that are a part of this incursion","maxItems":100,"items":{"type":"integer","format":"int32","title":"get_incursions_infested_solar_system","description":"infested_solar_system integer"},"title":"get_incursions_infested_solar_systems"}},"title":"get_incursions_200_ok","description":"200 ok object"},"title":"get_incursions_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"operationId":"get_incursions","x-cached-seconds":300,"x-alternate-versions":["dev","legacy","v1"]}},"/industry/facilities/":{"get":{"description":"Return a list of industry facilities\n\n---\nAlternate route: `/dev/industry/facilities/`\n\nAlternate route: `/legacy/industry/facilities/`\n\nAlternate route: `/v1/industry/facilities/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"List industry facilities","tags":["Industry"],"responses":{"200":{"description":"A list of facilities","examples":{"application/json":[{"facility_id":60012544,"tax":0.1,"owner_id":1000126,"type_id":2502,"solar_system_id":30000032,"region_id":10000001}]},"schema":{"type":"array","maxItems":10000,"items":{"type":"object","required":["facility_id","owner_id","type_id","solar_system_id","region_id"],"properties":{"facility_id":{"type":"integer","format":"int64","description":"ID of the facility","title":"get_industry_facilities_facility_id"},"tax":{"type":"number","format":"float","description":"Tax imposed by the facility","title":"get_industry_facilities_tax"},"owner_id":{"type":"integer","format":"int32","description":"Owner of the facility","title":"get_industry_facilities_owner_id"},"type_id":{"type":"integer","format":"int32","description":"Type ID of the facility","title":"get_industry_facilities_type_id"},"solar_system_id":{"type":"integer","format":"int32","description":"Solar system ID where the facility is","title":"get_industry_facilities_solar_system_id"},"region_id":{"type":"integer","format":"int32","description":"Region ID where the facility is","title":"get_industry_facilities_region_id"}},"title":"get_industry_facilities_200_ok","description":"200 ok object"},"title":"get_industry_facilities_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"operationId":"get_industry_facilities","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/industry/systems/":{"get":{"description":"Return cost indices for solar systems\n\n---\nAlternate route: `/dev/industry/systems/`\n\nAlternate route: `/legacy/industry/systems/`\n\nAlternate route: `/v1/industry/systems/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"List solar system cost indices","tags":["Industry"],"responses":{"200":{"description":"A list of cost indicies","examples":{"application/json":[{"solar_system_id":30011392,"cost_indices":[{"activity":"invention","cost_index":0.00480411064973412}]}]},"schema":{"type":"array","maxItems":10000,"items":{"type":"object","required":["solar_system_id","cost_indices"],"properties":{"solar_system_id":{"type":"integer","format":"int32","title":"get_industry_systems_solar_system_id","description":"solar_system_id integer"},"cost_indices":{"type":"array","maxItems":10,"items":{"type":"object","required":["activity","cost_index"],"properties":{"activity":{"type":"string","enum":["copying","duplicating","invention","manufacturing","none","reaction","researching_material_efficiency","researching_technology","researching_time_efficiency","reverse_engineering"],"title":"get_industry_systems_activity","description":"activity string"},"cost_index":{"type":"number","format":"float","title":"get_industry_systems_cost_index","description":"cost_index number"}},"title":"get_industry_systems_cost_indice","description":"cost_indice object"},"title":"get_industry_systems_cost_indices","description":"cost_indices array"}},"title":"get_industry_systems_200_ok","description":"200 ok object"},"title":"get_industry_systems_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"operationId":"get_industry_systems","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/industry/jobs/":{"get":{"summary":"List character industry jobs","description":"List industry jobs placed by a character\n\n---\nAlternate route: `/dev/characters/{character_id}/industry/jobs/`\n\nAlternate route: `/legacy/characters/{character_id}/industry/jobs/`\n\nAlternate route: `/v1/characters/{character_id}/industry/jobs/`\n\n---\nThis route is cached for up to 300 seconds","tags":["Industry"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"name":"include_completed","in":"query","description":"Whether retrieve completed character industry jobs as well","required":false,"type":"boolean"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Industry jobs placed by a character","examples":{"application/json":[{"job_id":229136101,"installer_id":498338451,"facility_id":60006382,"station_id":60006382,"activity_id":1,"blueprint_id":1015116533326,"blueprint_type_id":2047,"blueprint_location_id":60006382,"output_location_id":60006382,"runs":1,"cost":118.01,"licensed_runs":200,"status":"active","duration":548,"start_date":"2014-07-19T15:47:06Z","end_date":"2014-07-19T15:56:14Z"}]},"schema":{"type":"array","maxItems":2000,"items":{"type":"object","required":["job_id","installer_id","facility_id","station_id","activity_id","blueprint_id","blueprint_type_id","blueprint_location_id","output_location_id","runs","status","duration","start_date","end_date"],"properties":{"job_id":{"type":"integer","format":"int32","description":"Unique job ID","title":"get_characters_character_id_industry_jobs_job_id"},"installer_id":{"type":"integer","format":"int32","description":"ID of the character which installed this job","title":"get_characters_character_id_industry_jobs_installer_id"},"facility_id":{"type":"integer","format":"int64","description":"ID of the facility where this job is running","title":"get_characters_character_id_industry_jobs_facility_id"},"station_id":{"type":"integer","format":"int64","description":"ID of the station where industry facility is located","title":"get_characters_character_id_industry_jobs_station_id"},"activity_id":{"type":"integer","format":"int32","description":"Job activity ID","title":"get_characters_character_id_industry_jobs_activity_id"},"blueprint_id":{"type":"integer","format":"int64","title":"get_characters_character_id_industry_jobs_blueprint_id","description":"blueprint_id integer"},"blueprint_type_id":{"type":"integer","format":"int32","title":"get_characters_character_id_industry_jobs_blueprint_type_id","description":"blueprint_type_id integer"},"blueprint_location_id":{"type":"integer","format":"int64","description":"Location ID of the location from which the blueprint was installed. Normally a station ID, but can also be an asset (e.g. container) or corporation facility","title":"get_characters_character_id_industry_jobs_blueprint_location_id"},"output_location_id":{"type":"integer","format":"int64","description":"Location ID of the location to which the output of the job will be delivered. Normally a station ID, but can also be a corporation facility","title":"get_characters_character_id_industry_jobs_output_location_id"},"runs":{"type":"integer","format":"int32","description":"Number of runs for a manufacturing job, or number of copies to make for a blueprint copy","title":"get_characters_character_id_industry_jobs_runs"},"cost":{"type":"number","format":"double","description":"The sume of job installation fee and industry facility tax","title":"get_characters_character_id_industry_jobs_cost"},"licensed_runs":{"type":"integer","format":"int32","description":"Number of runs blueprint is licensed for","title":"get_characters_character_id_industry_jobs_licensed_runs"},"probability":{"type":"number","format":"float","description":"Chance of success for invention","title":"get_characters_character_id_industry_jobs_probability"},"product_type_id":{"type":"integer","format":"int32","description":"Type ID of product (manufactured, copied or invented)","title":"get_characters_character_id_industry_jobs_product_type_id"},"status":{"type":"string","enum":["active","cancelled","delivered","paused","ready","reverted"],"title":"get_characters_character_id_industry_jobs_status","description":"status string"},"duration":{"type":"integer","format":"int32","description":"Job duration in seconds","title":"get_characters_character_id_industry_jobs_duration"},"start_date":{"type":"string","format":"date-time","description":"Date and time when this job started","title":"get_characters_character_id_industry_jobs_start_date"},"end_date":{"type":"string","format":"date-time","description":"Date and time when this job finished","title":"get_characters_character_id_industry_jobs_end_date"},"pause_date":{"type":"string","format":"date-time","description":"Date and time when this job was paused (i.e. time when the facility where this job was installed went offline)","title":"get_characters_character_id_industry_jobs_pause_date"},"completed_date":{"type":"string","format":"date-time","description":"Date and time when this job was completed","title":"get_characters_character_id_industry_jobs_completed_date"},"completed_character_id":{"type":"integer","format":"int32","description":"ID of the character which completed this job","title":"get_characters_character_id_industry_jobs_completed_character_id"},"successful_runs":{"type":"integer","format":"int32","description":"Number of successful runs for this job. Equal to runs unless this is an invention job","title":"get_characters_character_id_industry_jobs_successful_runs"}},"title":"get_characters_character_id_industry_jobs_200_ok","description":"200 ok object"},"title":"get_characters_character_id_industry_jobs_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-industry.read_character_jobs.v1"]}],"operationId":"get_characters_character_id_industry_jobs","x-cached-seconds":300,"x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/mining/":{"get":{"summary":"Character mining ledger","description":"Paginated record of all mining done by a character for the past 30 days\n\n\n---\nAlternate route: `/dev/characters/{character_id}/mining/`\n\nAlternate route: `/legacy/characters/{character_id}/mining/`\n\nAlternate route: `/v1/characters/{character_id}/mining/`\n\n---\nThis route is cached for up to 600 seconds","tags":["Industry"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/page"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Mining ledger of a character","examples":{"application/json":[{"date":"2017-09-19","solar_system_id":30003707,"type_id":17471,"quantity":7004},{"date":"2017-09-18","solar_system_id":30003707,"type_id":17471,"quantity":5199}]},"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["date","solar_system_id","type_id","quantity"],"properties":{"date":{"type":"string","format":"date","title":"get_characters_character_id_mining_date","description":"date string"},"solar_system_id":{"type":"integer","format":"int32","title":"get_characters_character_id_mining_solar_system_id","description":"solar_system_id integer"},"type_id":{"type":"integer","format":"int32","title":"get_characters_character_id_mining_type_id","description":"type_id integer"},"quantity":{"type":"integer","format":"int64","title":"get_characters_character_id_mining_quantity","description":"quantity integer"}},"title":"get_characters_character_id_mining_200_ok","description":"200 ok object"},"title":"get_characters_character_id_mining_ok","description":"200 ok array"},"headers":{"X-Pages":{"description":"Maximum page number","type":"integer","format":"int32","default":1},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-industry.read_character_mining.v1"]}],"operationId":"get_characters_character_id_mining","x-cached-seconds":600,"x-alternate-versions":["dev","legacy","v1"]}},"/corporation/{corporation_id}/mining/observers/":{"get":{"summary":"Corporation mining observers","description":"Paginated list of all entities capable of observing and recording mining for a corporation\n\n\n---\nAlternate route: `/dev/corporation/{corporation_id}/mining/observers/`\n\nAlternate route: `/legacy/corporation/{corporation_id}/mining/observers/`\n\nAlternate route: `/v1/corporation/{corporation_id}/mining/observers/`\n\n---\nThis route is cached for up to 3600 seconds\n\n---\nRequires one of the following EVE corporation role(s): Accountant\n","tags":["Industry"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/page"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Observer list of a corporation","examples":{"application/json":[{"last_updated":"2017-09-19","observer_id":1,"observer_type":"structure"}]},"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["last_updated","observer_id","observer_type"],"properties":{"last_updated":{"type":"string","format":"date","title":"get_corporation_corporation_id_mining_observers_last_updated","description":"last_updated string"},"observer_id":{"type":"integer","format":"int64","description":"The entity that was observing the asteroid field when it was mined.\n","title":"get_corporation_corporation_id_mining_observers_observer_id"},"observer_type":{"description":"The category of the observing entity","type":"string","enum":["structure"],"title":"get_corporation_corporation_id_mining_observers_observer_type"}},"title":"get_corporation_corporation_id_mining_observers_200_ok","description":"200 ok object"},"title":"get_corporation_corporation_id_mining_observers_ok","description":"200 ok array"},"headers":{"X-Pages":{"description":"Maximum page number","type":"integer","format":"int32","default":1},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"x-required-roles":["Accountant"],"security":[{"evesso":["esi-industry.read_corporation_mining.v1"]}],"operationId":"get_corporation_corporation_id_mining_observers","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/corporation/{corporation_id}/mining/observers/{observer_id}/":{"get":{"summary":"Observed corporation mining","description":"Paginated record of all mining seen by an observer\n\n\n---\nAlternate route: `/dev/corporation/{corporation_id}/mining/observers/{observer_id}/`\n\nAlternate route: `/legacy/corporation/{corporation_id}/mining/observers/{observer_id}/`\n\nAlternate route: `/v1/corporation/{corporation_id}/mining/observers/{observer_id}/`\n\n---\nThis route is cached for up to 3600 seconds\n\n---\nRequires one of the following EVE corporation role(s): Accountant\n","tags":["Industry"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"name":"observer_id","in":"path","description":"A mining observer id","required":true,"type":"integer","format":"int64"},{"$ref":"#/parameters/page"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Mining ledger of an observer","examples":{"application/json":[{"last_updated":"2017-09-19","character_id":95465499,"recorded_corporation_id":109299958,"type_id":1230,"quantity":500}]},"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["last_updated","character_id","recorded_corporation_id","type_id","quantity"],"properties":{"last_updated":{"type":"string","format":"date","title":"get_corporation_corporation_id_mining_observers_observer_id_last_updated","description":"last_updated string"},"character_id":{"type":"integer","format":"int32","description":"The character that did the mining\n","title":"get_corporation_corporation_id_mining_observers_observer_id_character_id"},"recorded_corporation_id":{"description":"The corporation id of the character at the time data was recorded.\n","type":"integer","format":"int32","title":"get_corporation_corporation_id_mining_observers_observer_id_recorded_corporation_id"},"type_id":{"type":"integer","format":"int32","title":"get_corporation_corporation_id_mining_observers_observer_id_type_id","description":"type_id integer"},"quantity":{"type":"integer","format":"int64","title":"get_corporation_corporation_id_mining_observers_observer_id_quantity","description":"quantity integer"}},"title":"get_corporation_corporation_id_mining_observers_observer_id_200_ok","description":"200 ok object"},"title":"get_corporation_corporation_id_mining_observers_observer_id_ok","description":"200 ok array"},"headers":{"X-Pages":{"description":"Maximum page number","type":"integer","format":"int32","default":1},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"x-required-roles":["Accountant"],"security":[{"evesso":["esi-industry.read_corporation_mining.v1"]}],"operationId":"get_corporation_corporation_id_mining_observers_observer_id","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/corporations/{corporation_id}/industry/jobs/":{"get":{"summary":"List corporation industry jobs","description":"List industry jobs run by a corporation\n\n---\nAlternate route: `/dev/corporations/{corporation_id}/industry/jobs/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/industry/jobs/`\n\nAlternate route: `/v1/corporations/{corporation_id}/industry/jobs/`\n\n---\nThis route is cached for up to 300 seconds\n\n---\nRequires one of the following EVE corporation role(s): FactoryManager\n","tags":["Industry"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"name":"include_completed","in":"query","description":"Whether retrieve completed industry jobs as well","required":false,"type":"boolean","default":false},{"$ref":"#/parameters/page"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of corporation industry jobs","examples":{"application/json":[{"job_id":229136101,"installer_id":498338451,"facility_id":60006382,"location_id":60006382,"activity_id":1,"blueprint_id":1015116533326,"blueprint_type_id":2047,"blueprint_location_id":60006382,"output_location_id":60006382,"runs":1,"cost":118.01,"licensed_runs":200,"status":"active","duration":548,"start_date":"2014-07-19T15:47:06Z","end_date":"2014-07-19T15:56:14Z"}]},"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["job_id","installer_id","facility_id","location_id","activity_id","blueprint_id","blueprint_type_id","blueprint_location_id","output_location_id","runs","status","duration","start_date","end_date"],"properties":{"job_id":{"type":"integer","format":"int32","description":"Unique job ID","title":"get_corporations_corporation_id_industry_jobs_job_id"},"installer_id":{"type":"integer","format":"int32","description":"ID of the character which installed this job","title":"get_corporations_corporation_id_industry_jobs_installer_id"},"facility_id":{"type":"integer","format":"int64","description":"ID of the facility where this job is running","title":"get_corporations_corporation_id_industry_jobs_facility_id"},"location_id":{"type":"integer","format":"int64","description":"ID of the location for the industry facility","title":"get_corporations_corporation_id_industry_jobs_location_id"},"activity_id":{"type":"integer","format":"int32","description":"Job activity ID","title":"get_corporations_corporation_id_industry_jobs_activity_id"},"blueprint_id":{"type":"integer","format":"int64","title":"get_corporations_corporation_id_industry_jobs_blueprint_id","description":"blueprint_id integer"},"blueprint_type_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_industry_jobs_blueprint_type_id","description":"blueprint_type_id integer"},"blueprint_location_id":{"type":"integer","format":"int64","description":"Location ID of the location from which the blueprint was installed. Normally a station ID, but can also be an asset (e.g. container) or corporation facility","title":"get_corporations_corporation_id_industry_jobs_blueprint_location_id"},"output_location_id":{"type":"integer","format":"int64","description":"Location ID of the location to which the output of the job will be delivered. Normally a station ID, but can also be a corporation facility","title":"get_corporations_corporation_id_industry_jobs_output_location_id"},"runs":{"type":"integer","format":"int32","description":"Number of runs for a manufacturing job, or number of copies to make for a blueprint copy","title":"get_corporations_corporation_id_industry_jobs_runs"},"cost":{"type":"number","format":"double","description":"The sume of job installation fee and industry facility tax","title":"get_corporations_corporation_id_industry_jobs_cost"},"licensed_runs":{"type":"integer","format":"int32","description":"Number of runs blueprint is licensed for","title":"get_corporations_corporation_id_industry_jobs_licensed_runs"},"probability":{"type":"number","format":"float","description":"Chance of success for invention","title":"get_corporations_corporation_id_industry_jobs_probability"},"product_type_id":{"type":"integer","format":"int32","description":"Type ID of product (manufactured, copied or invented)","title":"get_corporations_corporation_id_industry_jobs_product_type_id"},"status":{"type":"string","enum":["active","cancelled","delivered","paused","ready","reverted"],"title":"get_corporations_corporation_id_industry_jobs_status","description":"status string"},"duration":{"type":"integer","format":"int32","description":"Job duration in seconds","title":"get_corporations_corporation_id_industry_jobs_duration"},"start_date":{"type":"string","format":"date-time","description":"Date and time when this job started","title":"get_corporations_corporation_id_industry_jobs_start_date"},"end_date":{"type":"string","format":"date-time","description":"Date and time when this job finished","title":"get_corporations_corporation_id_industry_jobs_end_date"},"pause_date":{"type":"string","format":"date-time","description":"Date and time when this job was paused (i.e. time when the facility where this job was installed went offline)","title":"get_corporations_corporation_id_industry_jobs_pause_date"},"completed_date":{"type":"string","format":"date-time","description":"Date and time when this job was completed","title":"get_corporations_corporation_id_industry_jobs_completed_date"},"completed_character_id":{"type":"integer","format":"int32","description":"ID of the character which completed this job","title":"get_corporations_corporation_id_industry_jobs_completed_character_id"},"successful_runs":{"type":"integer","format":"int32","description":"Number of successful runs for this job. Equal to runs unless this is an invention job","title":"get_corporations_corporation_id_industry_jobs_successful_runs"}},"title":"get_corporations_corporation_id_industry_jobs_200_ok","description":"200 ok object"},"title":"get_corporations_corporation_id_industry_jobs_ok","description":"200 ok array"},"headers":{"X-Pages":{"description":"Maximum page number","type":"integer","format":"int32","default":1},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"x-required-roles":["FactoryManager"],"security":[{"evesso":["esi-industry.read_corporation_jobs.v1"]}],"operationId":"get_corporations_corporation_id_industry_jobs","x-cached-seconds":300,"x-alternate-versions":["dev","legacy","v1"]}},"/corporation/{corporation_id}/mining/extractions/":{"get":{"summary":"Moon extraction timers","description":"Extraction timers for all moon chunks being extracted by refineries belonging to a corporation.\n\n\n---\nAlternate route: `/dev/corporation/{corporation_id}/mining/extractions/`\n\nAlternate route: `/legacy/corporation/{corporation_id}/mining/extractions/`\n\nAlternate route: `/v1/corporation/{corporation_id}/mining/extractions/`\n\n---\nThis route is cached for up to 1800 seconds\n\n---\nRequires one of the following EVE corporation role(s): Structure_manager\n","tags":["Industry"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of chunk timers","examples":{"application/json":[{"structure_id":1000000010579,"moon_id":40307229,"extraction_start_time":"2017-10-11T10:37:04Z","chunk_arrival_time":"2017-10-17T11:00:59Z","natural_decay_time":"2017-10-17T14:00:59Z"}]},"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["structure_id","moon_id","extraction_start_time","chunk_arrival_time","natural_decay_time"],"properties":{"structure_id":{"type":"integer","format":"int64","title":"get_corporation_corporation_id_mining_extractions_structure_id","description":"structure_id integer"},"moon_id":{"type":"integer","format":"int32","title":"get_corporation_corporation_id_mining_extractions_moon_id","description":"moon_id integer"},"extraction_start_time":{"description":"The time at which the current extraction was initiated.\n","type":"string","format":"date-time","title":"get_corporation_corporation_id_mining_extractions_extraction_start_time"},"chunk_arrival_time":{"description":"The time at which the chunk being extracted will arrive and can be fractured by the moon mining drill.\n","type":"string","format":"date-time","title":"get_corporation_corporation_id_mining_extractions_chunk_arrival_time"},"natural_decay_time":{"description":"The time at which the chunk being extracted will naturally fracture if it is not first fractured by the moon mining drill.\n","type":"string","format":"date-time","title":"get_corporation_corporation_id_mining_extractions_natural_decay_time"}},"title":"get_corporation_corporation_id_mining_extractions_200_ok","description":"200 ok object"},"title":"get_corporation_corporation_id_mining_extractions_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"x-required-roles":["Structure_manager"],"security":[{"evesso":["esi-industry.read_corporation_mining.v1"]}],"operationId":"get_corporation_corporation_id_mining_extractions","x-cached-seconds":1800,"x-alternate-versions":["dev","legacy","v1"]}},"/insurance/prices/":{"get":{"description":"Return available insurance levels for all ship types\n\n---\nAlternate route: `/dev/insurance/prices/`\n\nAlternate route: `/legacy/insurance/prices/`\n\nAlternate route: `/v1/insurance/prices/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"List insurance levels","tags":["Insurance"],"responses":{"200":{"description":"A list of insurance levels for all ship types","examples":{"application/json":[{"type_id":1,"levels":[{"cost":10.01,"payout":20.01,"name":"Basic"}]}]},"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["type_id","levels"],"properties":{"type_id":{"type":"integer","format":"int32","title":"get_insurance_prices_type_id","description":"type_id integer"},"levels":{"type":"array","description":"A list of a available insurance levels for this ship type","maxItems":6,"items":{"type":"object","required":["cost","payout","name"],"properties":{"cost":{"type":"number","format":"float","title":"get_insurance_prices_cost","description":"cost number"},"payout":{"type":"number","format":"float","title":"get_insurance_prices_payout","description":"payout number"},"name":{"type":"string","description":"Localized insurance level","title":"get_insurance_prices_name"}},"title":"get_insurance_prices_level","description":"level object"},"title":"get_insurance_prices_levels"}},"title":"get_insurance_prices_200_ok","description":"200 ok object"},"title":"get_insurance_prices_ok","description":"200 ok array"},"headers":{"Content-Language":{"description":"The language used in the response","type":"string","enum":["de","en-us","fr","ja","ru","zh"]},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/language"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"operationId":"get_insurance_prices","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/killmails/{killmail_id}/{killmail_hash}/":{"get":{"description":"Return a single killmail from its ID and hash\n\n---\nAlternate route: `/dev/killmails/{killmail_id}/{killmail_hash}/`\n\nAlternate route: `/legacy/killmails/{killmail_id}/{killmail_hash}/`\n\nAlternate route: `/v1/killmails/{killmail_id}/{killmail_hash}/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"Get a single killmail","tags":["Killmails"],"parameters":[{"$ref":"#/parameters/datasource"},{"name":"killmail_hash","in":"path","description":"The killmail hash for verification","required":true,"type":"string"},{"name":"killmail_id","in":"path","description":"The killmail ID to be queried","required":true,"type":"integer","format":"int32"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A killmail","examples":{"application/json":{"solar_system_id":30002976,"killmail_id":56733821,"killmail_time":"2016-10-22T17:13:36Z","attackers":[{"ship_type_id":17841,"faction_id":500003,"corporation_id":1000179,"character_id":95810944,"weapon_type_id":3074,"final_blow":true,"security_status":-0.3,"damage_done":5745}],"victim":{"alliance_id":621338554,"damage_taken":5745,"items":[{"singleton":0,"item_type_id":5973,"flag":20,"quantity_dropped":1}],"character_id":92796241,"ship_type_id":17812,"corporation_id":841363671,"position":{"y":146704961490.90222,"x":452186600569.4748,"z":109514596532.54477}}}},"schema":{"type":"object","required":["killmail_id","killmail_time","victim","attackers","solar_system_id"],"properties":{"killmail_id":{"type":"integer","format":"int32","description":"ID of the killmail","title":"get_killmails_killmail_id_killmail_hash_killmail_id"},"killmail_time":{"type":"string","format":"date-time","description":"Time that the victim was killed and the killmail generated\n","title":"get_killmails_killmail_id_killmail_hash_killmail_time"},"victim":{"type":"object","required":["damage_taken","ship_type_id"],"properties":{"character_id":{"type":"integer","format":"int32","title":"get_killmails_killmail_id_killmail_hash_character_id","description":"character_id integer"},"corporation_id":{"type":"integer","format":"int32","title":"get_killmails_killmail_id_killmail_hash_corporation_id","description":"corporation_id integer"},"alliance_id":{"type":"integer","format":"int32","title":"get_killmails_killmail_id_killmail_hash_alliance_id","description":"alliance_id integer"},"faction_id":{"type":"integer","format":"int32","title":"get_killmails_killmail_id_killmail_hash_faction_id","description":"faction_id integer"},"damage_taken":{"type":"integer","description":"How much total damage was taken by the victim\n","format":"int32","title":"get_killmails_killmail_id_killmail_hash_damage_taken"},"ship_type_id":{"type":"integer","format":"int32","description":"The ship that the victim was piloting and was destroyed\n","title":"get_killmails_killmail_id_killmail_hash_ship_type_id"},"items":{"type":"array","maxItems":10000,"items":{"type":"object","required":["item_type_id","singleton","flag"],"properties":{"item_type_id":{"type":"integer","format":"int32","title":"get_killmails_killmail_id_killmail_hash_item_type_id","description":"item_type_id integer"},"quantity_destroyed":{"type":"integer","description":"How many of the item were destroyed if any\n","format":"int64","title":"get_killmails_killmail_id_killmail_hash_quantity_destroyed"},"quantity_dropped":{"type":"integer","description":"How many of the item were dropped if any\n","format":"int64","title":"get_killmails_killmail_id_killmail_hash_quantity_dropped"},"singleton":{"type":"integer","format":"int32","title":"get_killmails_killmail_id_killmail_hash_singleton","description":"singleton integer"},"flag":{"type":"integer","description":"Flag for the location of the item\n","format":"int32","title":"get_killmails_killmail_id_killmail_hash_flag"},"items":{"type":"array","maxItems":10000,"items":{"type":"object","required":["item_type_id","singleton","flag"],"properties":{"item_type_id":{"type":"integer","format":"int32","title":"get_killmails_killmail_id_killmail_hash_item_type_id","description":"item_type_id integer"},"quantity_destroyed":{"type":"integer","format":"int64","title":"get_killmails_killmail_id_killmail_hash_quantity_destroyed","description":"quantity_destroyed integer"},"quantity_dropped":{"type":"integer","format":"int64","title":"get_killmails_killmail_id_killmail_hash_quantity_dropped","description":"quantity_dropped integer"},"singleton":{"type":"integer","format":"int32","title":"get_killmails_killmail_id_killmail_hash_singleton","description":"singleton integer"},"flag":{"type":"integer","format":"int32","title":"get_killmails_killmail_id_killmail_hash_flag","description":"flag integer"}},"title":"get_killmails_killmail_id_killmail_hash_item","description":"item object"},"title":"get_killmails_killmail_id_killmail_hash_items","description":"items array"}},"title":"get_killmails_killmail_id_killmail_hash_item","description":"item object"},"title":"get_killmails_killmail_id_killmail_hash_items","description":"items array"},"position":{"type":"object","description":"Coordinates of the victim in Cartesian space relative to the Sun\n","required":["x","y","z"],"properties":{"x":{"type":"number","format":"double","title":"get_killmails_killmail_id_killmail_hash_x","description":"x number"},"y":{"type":"number","format":"double","title":"get_killmails_killmail_id_killmail_hash_y","description":"y number"},"z":{"type":"number","format":"double","title":"get_killmails_killmail_id_killmail_hash_z","description":"z number"}},"title":"get_killmails_killmail_id_killmail_hash_position"}},"title":"get_killmails_killmail_id_killmail_hash_victim","description":"victim object"},"attackers":{"type":"array","maxItems":10000,"items":{"type":"object","required":["security_status","final_blow","damage_done"],"properties":{"character_id":{"type":"integer","format":"int32","title":"get_killmails_killmail_id_killmail_hash_character_id","description":"character_id integer"},"corporation_id":{"type":"integer","format":"int32","title":"get_killmails_killmail_id_killmail_hash_corporation_id","description":"corporation_id integer"},"alliance_id":{"type":"integer","format":"int32","title":"get_killmails_killmail_id_killmail_hash_alliance_id","description":"alliance_id integer"},"faction_id":{"type":"integer","format":"int32","title":"get_killmails_killmail_id_killmail_hash_faction_id","description":"faction_id integer"},"security_status":{"type":"number","format":"float","description":"Security status for the attacker\n","title":"get_killmails_killmail_id_killmail_hash_security_status"},"final_blow":{"type":"boolean","description":"Was the attacker the one to achieve the final blow\n","title":"get_killmails_killmail_id_killmail_hash_final_blow"},"damage_done":{"type":"integer","format":"int32","title":"get_killmails_killmail_id_killmail_hash_damage_done","description":"damage_done integer"},"ship_type_id":{"type":"integer","format":"int32","description":"What ship was the attacker flying\n","title":"get_killmails_killmail_id_killmail_hash_ship_type_id"},"weapon_type_id":{"type":"integer","format":"int32","description":"What weapon was used by the attacker for the kill\n","title":"get_killmails_killmail_id_killmail_hash_weapon_type_id"}},"title":"get_killmails_killmail_id_killmail_hash_attacker","description":"attacker object"},"title":"get_killmails_killmail_id_killmail_hash_attackers","description":"attackers array"},"solar_system_id":{"type":"integer","format":"int32","description":"Solar system that the kill took place in\n","title":"get_killmails_killmail_id_killmail_hash_solar_system_id"},"moon_id":{"type":"integer","format":"int32","description":"Moon if the kill took place at one","title":"get_killmails_killmail_id_killmail_hash_moon_id"},"war_id":{"type":"integer","format":"int32","description":"War if the killmail is generated in relation to an official war\n","title":"get_killmails_killmail_id_killmail_hash_war_id"}},"title":"get_killmails_killmail_id_killmail_hash_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"422":{"description":"Invalid killmail_id and/or killmail_hash","schema":{"type":"object","title":"get_killmails_killmail_id_killmail_hash_unprocessable_entity","description":"Unprocessable entity","properties":{"error":{"type":"string","description":"Unprocessable entity message","title":"get_killmails_killmail_id_killmail_hash_422_unprocessable_entity"}}},"examples":{"application/json":{"error":"Unprocessable entity message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_killmails_killmail_id_killmail_hash","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/killmails/recent/":{"get":{"description":"Return a list of character's recent kills and losses\n\n---\nAlternate route: `/dev/characters/{character_id}/killmails/recent/`\n\nAlternate route: `/legacy/characters/{character_id}/killmails/recent/`\n\nAlternate route: `/v1/characters/{character_id}/killmails/recent/`\n\n---\nThis route is cached for up to 120 seconds","summary":"Get character kills and losses","tags":["Killmails"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"name":"max_count","in":"query","description":"How many killmails to return at maximum","type":"integer","format":"int32","required":false,"default":50,"maximum":5000},{"name":"max_kill_id","in":"query","description":"Only return killmails with ID smaller than this.\n","required":false,"type":"integer","format":"int32"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of killmail IDs and hashes","examples":{"application/json":[{"killmail_id":2,"killmail_hash":"8eef5e8fb6b88fe3407c489df33822b2e3b57a5e"},{"killmail_id":1,"killmail_hash":"b41ccb498ece33d64019f64c0db392aa3aa701fb"}]},"schema":{"type":"array","maxItems":5000,"items":{"type":"object","required":["killmail_id","killmail_hash"],"properties":{"killmail_id":{"type":"integer","format":"int32","description":"ID of this killmail","title":"get_characters_character_id_killmails_recent_killmail_id"},"killmail_hash":{"type":"string","description":"A hash of this killmail","title":"get_characters_character_id_killmails_recent_killmail_hash"}},"title":"get_characters_character_id_killmails_recent_200_ok","description":"200 ok object"},"title":"get_characters_character_id_killmails_recent_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-killmails.read_killmails.v1"]}],"operationId":"get_characters_character_id_killmails_recent","x-cached-seconds":120,"x-alternate-versions":["dev","legacy","v1"]}},"/corporations/{corporation_id}/killmails/recent/":{"get":{"description":"Get a list of corporation's recent kills and losses\n\n---\nAlternate route: `/dev/corporations/{corporation_id}/killmails/recent/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/killmails/recent/`\n\nAlternate route: `/v1/corporations/{corporation_id}/killmails/recent/`\n\n---\nThis route is cached for up to 300 seconds\n\n---\nRequires one of the following EVE corporation role(s): Director\n","summary":"Get corporation kills and losses","tags":["Killmails"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"name":"max_kill_id","in":"query","description":"Only return killmails with ID smaller than this","required":false,"type":"integer","format":"int32"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of killmail IDs and hashes","examples":{"application/json":[{"killmail_id":2,"killmail_hash":"8eef5e8fb6b88fe3407c489df33822b2e3b57a5e"},{"killmail_id":1,"killmail_hash":"b41ccb498ece33d64019f64c0db392aa3aa701fb"}]},"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["killmail_id","killmail_hash"],"properties":{"killmail_id":{"type":"integer","format":"int32","description":"ID of this killmail","title":"get_corporations_corporation_id_killmails_recent_killmail_id"},"killmail_hash":{"type":"string","description":"A hash of this killmail","title":"get_corporations_corporation_id_killmails_recent_killmail_hash"}},"title":"get_corporations_corporation_id_killmails_recent_200_ok","description":"200 ok object"},"title":"get_corporations_corporation_id_killmails_recent_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"x-required-roles":["Director"],"security":[{"evesso":["esi-killmails.read_corporation_killmails.v1"]}],"operationId":"get_corporations_corporation_id_killmails_recent","x-cached-seconds":300,"x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/location/":{"get":{"description":"Information about the characters current location. Returns the current solar system id, and also the current station or structure ID if applicable.\n\n---\nAlternate route: `/dev/characters/{character_id}/location/`\n\nAlternate route: `/legacy/characters/{character_id}/location/`\n\nAlternate route: `/v1/characters/{character_id}/location/`\n\n---\nThis route is cached for up to 5 seconds","summary":"Get character location","tags":["Location"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Information about the characters current location. Returns the current solar system id, and also the current station or structure ID if applicable.","examples":{"application/json":{"solar_system_id":30002505,"structure_id":1000000016989}},"schema":{"type":"object","required":["solar_system_id"],"properties":{"solar_system_id":{"type":"integer","format":"int32","title":"get_characters_character_id_location_solar_system_id","description":"solar_system_id integer"},"station_id":{"type":"integer","format":"int32","title":"get_characters_character_id_location_station_id","description":"station_id integer"},"structure_id":{"type":"integer","format":"int64","title":"get_characters_character_id_location_structure_id","description":"structure_id integer"}},"title":"get_characters_character_id_location_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-location.read_location.v1"]}],"operationId":"get_characters_character_id_location","x-cached-seconds":5,"x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/ship/":{"get":{"description":"Get the current ship type, name and id\n\n---\nAlternate route: `/dev/characters/{character_id}/ship/`\n\nAlternate route: `/legacy/characters/{character_id}/ship/`\n\nAlternate route: `/v1/characters/{character_id}/ship/`\n\n---\nThis route is cached for up to 5 seconds","summary":"Get current ship","tags":["Location"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Get the current ship type, name and id","examples":{"application/json":{"ship_type_id":1233,"ship_name":"SPACESHIPS!!!","ship_item_id":1000000016991}},"schema":{"type":"object","required":["ship_type_id","ship_item_id","ship_name"],"properties":{"ship_type_id":{"type":"integer","format":"int32","title":"get_characters_character_id_ship_ship_type_id","description":"ship_type_id integer"},"ship_item_id":{"type":"integer","format":"int64","description":"Item id's are unique to a ship and persist until it is repackaged. This value can be used to track repeated uses of a ship, or detect when a pilot changes into a different instance of the same ship type.","title":"get_characters_character_id_ship_ship_item_id"},"ship_name":{"type":"string","title":"get_characters_character_id_ship_ship_name","description":"ship_name string"}},"title":"get_characters_character_id_ship_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-location.read_ship_type.v1"]}],"operationId":"get_characters_character_id_ship","x-cached-seconds":5,"x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/online/":{"get":{"description":"Checks if the character is currently online\n\n---\nAlternate route: `/legacy/characters/{character_id}/online/`\n\nAlternate route: `/v1/characters/{character_id}/online/`\n\n---\nThis route is cached for up to 60 seconds\n\n---\n[This route has an available update](https://esi.tech.ccp.is/diff/latest/dev/#GET-/characters/{character_id}/online/)","summary":"Get character online","tags":["Location"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Boolean of if the character is currently online","examples":{"application/json":true},"schema":{"type":"boolean","title":"get_characters_character_id_online_ok","description":"200 ok boolean"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-location.read_online.v1"]}],"operationId":"get_characters_character_id_online","x-cached-seconds":60,"x-alternate-versions":["legacy","v1"]}},"/loyalty/stores/{corporation_id}/offers/":{"get":{"description":"Return a list of offers from a specific corporation's loyalty store\n\n---\nAlternate route: `/dev/loyalty/stores/{corporation_id}/offers/`\n\nAlternate route: `/legacy/loyalty/stores/{corporation_id}/offers/`\n\nAlternate route: `/v1/loyalty/stores/{corporation_id}/offers/`\n\n---\nThis route expires daily at 11:05","summary":"List loyalty store offers","tags":["Loyalty"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of offers","examples":{"application/json":[{"offer_id":1,"type_id":123,"quantity":1,"lp_cost":100,"isk_cost":0,"required_items":[]},{"offer_id":2,"type_id":1235,"quantity":10,"lp_cost":100,"isk_cost":1000,"required_items":[{"type_id":1234,"quantity":10}]}]},"schema":{"type":"array","maxItems":10000,"items":{"type":"object","required":["offer_id","type_id","quantity","lp_cost","isk_cost","required_items"],"properties":{"offer_id":{"type":"integer","format":"int32","title":"get_loyalty_stores_corporation_id_offers_offer_id","description":"offer_id integer"},"type_id":{"type":"integer","format":"int32","title":"get_loyalty_stores_corporation_id_offers_type_id","description":"type_id integer"},"quantity":{"type":"integer","format":"int32","title":"get_loyalty_stores_corporation_id_offers_quantity","description":"quantity integer"},"lp_cost":{"type":"integer","format":"int32","title":"get_loyalty_stores_corporation_id_offers_lp_cost","description":"lp_cost integer"},"isk_cost":{"type":"number","format":"int32","title":"get_loyalty_stores_corporation_id_offers_isk_cost","description":"isk_cost number"},"required_items":{"type":"array","maxItems":100,"items":{"type":"object","required":["type_id","quantity"],"properties":{"type_id":{"type":"integer","format":"int32","title":"get_loyalty_stores_corporation_id_offers_type_id","description":"type_id integer"},"quantity":{"type":"integer","format":"int32","title":"get_loyalty_stores_corporation_id_offers_quantity","description":"quantity integer"}},"title":"get_loyalty_stores_corporation_id_offers_required_item","description":"required_item object"},"title":"get_loyalty_stores_corporation_id_offers_required_items","description":"required_items array"}},"title":"get_loyalty_stores_corporation_id_offers_200_ok","description":"200 ok object"},"title":"get_loyalty_stores_corporation_id_offers_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_loyalty_stores_corporation_id_offers","x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/loyalty/points/":{"get":{"description":"Return a list of loyalty points for all corporations the character has worked for\n\n---\nAlternate route: `/dev/characters/{character_id}/loyalty/points/`\n\nAlternate route: `/legacy/characters/{character_id}/loyalty/points/`\n\nAlternate route: `/v1/characters/{character_id}/loyalty/points/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"Get loyalty points","tags":["Loyalty"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of loyalty points","examples":{"application/json":[{"corporation_id":123,"loyalty_points":100}]},"schema":{"type":"array","maxItems":500,"items":{"type":"object","required":["corporation_id","loyalty_points"],"properties":{"corporation_id":{"type":"integer","format":"int32","title":"get_characters_character_id_loyalty_points_corporation_id","description":"corporation_id integer"},"loyalty_points":{"type":"integer","format":"int32","title":"get_characters_character_id_loyalty_points_loyalty_points","description":"loyalty_points integer"}},"title":"get_characters_character_id_loyalty_points_200_ok","description":"200 ok object"},"title":"get_characters_character_id_loyalty_points_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-characters.read_loyalty.v1"]}],"operationId":"get_characters_character_id_loyalty_points","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/mail/":{"get":{"description":"Return the 50 most recent mail headers belonging to the character that match the query criteria. Queries can be filtered by label, and last_mail_id can be used to paginate backwards.\n\n---\nAlternate route: `/dev/characters/{character_id}/mail/`\n\nAlternate route: `/legacy/characters/{character_id}/mail/`\n\nAlternate route: `/v1/characters/{character_id}/mail/`\n\n---\nThis route is cached for up to 30 seconds","summary":"Return mail headers","tags":["Mail"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"name":"labels","in":"query","required":false,"description":"Fetch only mails that match one or more of the given labels","type":"array","uniqueItems":true,"minItems":1,"maxItems":25,"items":{"type":"integer","format":"int64","minimum":0}},{"name":"last_mail_id","in":"query","description":"List only mail with an ID lower than the given ID, if present","type":"integer","format":"int32"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"The requested mail","examples":{"application/json":[{"mail_id":7,"subject":"Title for EVE Mail","from":90000001,"timestamp":"2015-09-30T16:07:00Z","labels":[3],"recipients":[{"recipient_type":"character","recipient_id":90000002}],"is_read":true}]},"schema":{"type":"array","maxItems":50,"items":{"type":"object","properties":{"mail_id":{"type":"integer","format":"int64","title":"get_characters_character_id_mail_mail_id","description":"mail_id integer"},"subject":{"type":"string","description":"Mail subject","title":"get_characters_character_id_mail_subject"},"from":{"type":"integer","format":"int32","description":"From whom the mail was sent","title":"get_characters_character_id_mail_from"},"timestamp":{"type":"string","format":"date-time","description":"When the mail was sent","title":"get_characters_character_id_mail_timestamp"},"labels":{"type":"array","uniqueItems":true,"maxItems":25,"minimum":0,"items":{"type":"integer","format":"int64","title":"get_characters_character_id_mail_label","description":"label integer"},"title":"get_characters_character_id_mail_labels","description":"labels array"},"recipients":{"type":"array","description":"Recipients of the mail","uniqueItems":true,"minItems":1,"maxItems":52,"items":{"type":"object","required":["recipient_type","recipient_id"],"properties":{"recipient_type":{"type":"string","enum":["alliance","character","corporation","mailing_list"],"title":"get_characters_character_id_mail_recipient_type","description":"recipient_type string"},"recipient_id":{"type":"integer","format":"int32","title":"get_characters_character_id_mail_recipient_id","description":"recipient_id integer"}},"title":"get_characters_character_id_mail_recipient","description":"recipient object"},"title":"get_characters_character_id_mail_recipients"},"is_read":{"type":"boolean","title":"get_characters_character_id_mail_is_read","description":"is_read boolean"}},"title":"get_characters_character_id_mail_200_ok","description":"200 ok object"},"title":"get_characters_character_id_mail_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-mail.read_mail.v1"]}],"operationId":"get_characters_character_id_mail","x-cached-seconds":30,"x-alternate-versions":["dev","legacy","v1"]},"post":{"description":"Create and send a new mail\n\n---\nAlternate route: `/dev/characters/{character_id}/mail/`\n\nAlternate route: `/legacy/characters/{character_id}/mail/`\n\nAlternate route: `/v1/characters/{character_id}/mail/`\n","summary":"Send a new mail","tags":["Mail"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"name":"mail","in":"body","required":true,"description":"The mail to send","schema":{"required":["recipients","subject","body"],"properties":{"recipients":{"type":"array","minItems":1,"maxItems":50,"items":{"type":"object","required":["recipient_type","recipient_id"],"properties":{"recipient_type":{"type":"string","enum":["alliance","character","corporation","mailing_list"],"title":"post_characters_character_id_mail_recipient_type","description":"recipient_type string"},"recipient_id":{"type":"integer","format":"int32","title":"post_characters_character_id_mail_recipient_id","description":"recipient_id integer"}},"title":"post_characters_character_id_mail_recipient","description":"recipient object"},"title":"post_characters_character_id_mail_recipients","description":"recipients array"},"subject":{"type":"string","maxLength":1000,"title":"post_characters_character_id_mail_subject","description":"subject string"},"body":{"type":"string","maxLength":10000,"title":"post_characters_character_id_mail_body","description":"body string"},"approved_cost":{"type":"integer","format":"int64","default":0,"title":"post_characters_character_id_mail_approved_cost","description":"approved_cost integer"}},"title":"post_characters_character_id_mail_mail","description":"mail schema"}},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"201":{"description":"Mail created","examples":{"application/json":13},"schema":{"type":"integer","format":"int32","description":"Mail ID","title":"post_characters_character_id_mail_created"}},"400":{"description":"Only one corporation, alliance, or mailing list can be the recipient of a mail","schema":{"type":"object","title":"post_characters_character_id_mail_bad_request","description":"Bad request","properties":{"error":{"type":"string","description":"Bad request message","title":"post_characters_character_id_mail_400_bad_request"}}},"examples":{"application/json":{"error":"Bad request message"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-mail.send_mail.v1"]}],"operationId":"post_characters_character_id_mail","x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/mail/labels/":{"get":{"description":"Return a list of the users mail labels, unread counts for each label and a total unread count.\n\n---\nAlternate route: `/dev/characters/{character_id}/mail/labels/`\n\nAlternate route: `/v3/characters/{character_id}/mail/labels/`\n\n---\nThis route is cached for up to 30 seconds","summary":"Get mail labels and unread counts","tags":["Mail"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of mail labels and unread counts","examples":{"application/json":{"total_unread_count":5,"labels":[{"label_id":16,"name":"PINK","color_hex":"#660066","unread_count":4},{"label_id":17,"name":"WHITE","color_hex":"#ffffff","unread_count":1}]}},"schema":{"type":"object","properties":{"total_unread_count":{"type":"integer","format":"int32","minimum":0,"title":"get_characters_character_id_mail_labels_total_unread_count","description":"total_unread_count integer"},"labels":{"type":"array","maxItems":30,"items":{"type":"object","properties":{"unread_count":{"type":"integer","format":"int32","minimum":0,"title":"get_characters_character_id_mail_labels_unread_count","description":"unread_count integer"},"label_id":{"type":"integer","format":"int32","minimum":0,"title":"get_characters_character_id_mail_labels_label_id","description":"label_id integer"},"name":{"type":"string","maxLength":40,"title":"get_characters_character_id_mail_labels_name","description":"name string"},"color":{"type":"string","default":"#ffffff","enum":["#0000fe","#006634","#0099ff","#00ff33","#01ffff","#349800","#660066","#666666","#999999","#99ffff","#9a0000","#ccff9a","#e6e6e6","#fe0000","#ff6600","#ffff01","#ffffcd","#ffffff"],"title":"get_characters_character_id_mail_labels_color","description":"color string"}},"title":"get_characters_character_id_mail_labels_label","description":"label object"},"title":"get_characters_character_id_mail_labels_labels","description":"labels array"}},"title":"get_characters_character_id_mail_labels_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-mail.read_mail.v1"]}],"operationId":"get_characters_character_id_mail_labels","x-cached-seconds":30,"x-alternate-versions":["dev","v3"]},"post":{"description":"Create a mail label\n\n---\nAlternate route: `/dev/characters/{character_id}/mail/labels/`\n\nAlternate route: `/legacy/characters/{character_id}/mail/labels/`\n\nAlternate route: `/v2/characters/{character_id}/mail/labels/`\n","summary":"Create a mail label","tags":["Mail"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"name":"label","description":"Label to create","in":"body","schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":40,"title":"post_characters_character_id_mail_labels_name","description":"name string"},"color":{"type":"string","description":"Hexadecimal string representing label color, in RGB format","default":"#ffffff","enum":["#0000fe","#006634","#0099ff","#00ff33","#01ffff","#349800","#660066","#666666","#999999","#99ffff","#9a0000","#ccff9a","#e6e6e6","#fe0000","#ff6600","#ffff01","#ffffcd","#ffffff"],"title":"post_characters_character_id_mail_labels_color"}},"title":"post_characters_character_id_mail_labels_label","description":"label object"}},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"201":{"description":"Label created","examples":{"application/json":128},"schema":{"type":"integer","format":"int64","description":"Label ID","title":"post_characters_character_id_mail_labels_created"}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-mail.organize_mail.v1"]}],"operationId":"post_characters_character_id_mail_labels","x-alternate-versions":["dev","legacy","v2"]}},"/characters/{character_id}/mail/labels/{label_id}/":{"delete":{"description":"Delete a mail label\n\n---\nAlternate route: `/dev/characters/{character_id}/mail/labels/{label_id}/`\n\nAlternate route: `/legacy/characters/{character_id}/mail/labels/{label_id}/`\n\nAlternate route: `/v1/characters/{character_id}/mail/labels/{label_id}/`\n","summary":"Delete a mail label","tags":["Mail"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"name":"label_id","in":"path","description":"An EVE label id","required":true,"type":"integer","format":"int32"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"204":{"description":"Label deleted"},"422":{"description":"Default labels cannot be deleted","schema":{"type":"object","title":"delete_characters_character_id_mail_labels_label_id_unprocessable_entity","description":"Unprocessable entity","properties":{"error":{"type":"string","description":"Unprocessable entity message","title":"delete_characters_character_id_mail_labels_label_id_422_unprocessable_entity"}}},"examples":{"application/json":{"error":"Unprocessable entity message"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-mail.organize_mail.v1"]}],"operationId":"delete_characters_character_id_mail_labels_label_id","x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/mail/lists/":{"get":{"description":"Return all mailing lists that the character is subscribed to\n\n---\nAlternate route: `/dev/characters/{character_id}/mail/lists/`\n\nAlternate route: `/legacy/characters/{character_id}/mail/lists/`\n\nAlternate route: `/v1/characters/{character_id}/mail/lists/`\n\n---\nThis route is cached for up to 120 seconds","summary":"Return mailing list subscriptions","tags":["Mail"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Mailing lists","examples":{"application/json":[{"mailing_list_id":1,"name":"test_mailing_list"}]},"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["mailing_list_id","name"],"properties":{"mailing_list_id":{"description":"Mailing list ID","format":"int32","type":"integer","title":"get_characters_character_id_mail_lists_mailing_list_id"},"name":{"type":"string","title":"get_characters_character_id_mail_lists_name","description":"name string"}},"title":"get_characters_character_id_mail_lists_200_ok","description":"200 ok object"},"title":"get_characters_character_id_mail_lists_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-mail.read_mail.v1"]}],"operationId":"get_characters_character_id_mail_lists","x-cached-seconds":120,"x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/mail/{mail_id}/":{"delete":{"description":"Delete a mail\n\n---\nAlternate route: `/dev/characters/{character_id}/mail/{mail_id}/`\n\nAlternate route: `/legacy/characters/{character_id}/mail/{mail_id}/`\n\nAlternate route: `/v1/characters/{character_id}/mail/{mail_id}/`\n","summary":"Delete a mail","tags":["Mail"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"name":"mail_id","in":"path","description":"An EVE mail ID","required":true,"type":"integer","format":"int32"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"204":{"description":"Mail deleted"},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-mail.organize_mail.v1"]}],"operationId":"delete_characters_character_id_mail_mail_id","x-alternate-versions":["dev","legacy","v1"]},"get":{"description":"Return the contents of an EVE mail\n\n---\nAlternate route: `/dev/characters/{character_id}/mail/{mail_id}/`\n\nAlternate route: `/legacy/characters/{character_id}/mail/{mail_id}/`\n\nAlternate route: `/v1/characters/{character_id}/mail/{mail_id}/`\n\n---\nThis route is cached for up to 30 seconds","summary":"Return a mail","tags":["Mail"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"name":"mail_id","in":"path","description":"An EVE mail ID","required":true,"type":"integer","format":"int32"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Contents of a mail","examples":{"application/json":{"subject":"test","from":90000001,"timestamp":"2015-09-30T16:07:00Z","body":"blah blah blah","labels":[2,32],"read":true}},"schema":{"type":"object","properties":{"subject":{"type":"string","description":"Mail subject","title":"get_characters_character_id_mail_mail_id_subject"},"from":{"type":"integer","format":"int32","description":"From whom the mail was sent","title":"get_characters_character_id_mail_mail_id_from"},"timestamp":{"type":"string","format":"date-time","description":"When the mail was sent","title":"get_characters_character_id_mail_mail_id_timestamp"},"recipients":{"type":"array","description":"Recipients of the mail","uniqueItems":true,"minItems":1,"maxItems":52,"items":{"type":"object","required":["recipient_type","recipient_id"],"properties":{"recipient_type":{"type":"string","enum":["alliance","character","corporation","mailing_list"],"title":"get_characters_character_id_mail_mail_id_recipient_type","description":"recipient_type string"},"recipient_id":{"type":"integer","format":"int32","title":"get_characters_character_id_mail_mail_id_recipient_id","description":"recipient_id integer"}},"title":"get_characters_character_id_mail_mail_id_recipient","description":"recipient object"},"title":"get_characters_character_id_mail_mail_id_recipients"},"body":{"type":"string","description":"Mail's body","title":"get_characters_character_id_mail_mail_id_body"},"labels":{"type":"array","maxItems":25,"description":"Labels attached to the mail","items":{"type":"integer","format":"int64","uniqueItems":true,"minimum":0,"title":"get_characters_character_id_mail_mail_id_label","description":"label integer"},"title":"get_characters_character_id_mail_mail_id_labels"},"read":{"type":"boolean","description":"Whether the mail is flagged as read","title":"get_characters_character_id_mail_mail_id_read"}},"title":"get_characters_character_id_mail_mail_id_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"404":{"description":"Mail not found","schema":{"type":"object","title":"get_characters_character_id_mail_mail_id_not_found","description":"Not found","properties":{"error":{"type":"string","description":"Not found message","title":"get_characters_character_id_mail_mail_id_404_not_found"}}},"examples":{"application/json":{"error":"Not found message"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-mail.read_mail.v1"]}],"operationId":"get_characters_character_id_mail_mail_id","x-cached-seconds":30,"x-alternate-versions":["dev","legacy","v1"]},"put":{"description":"Update metadata about a mail\n\n---\nAlternate route: `/dev/characters/{character_id}/mail/{mail_id}/`\n\nAlternate route: `/legacy/characters/{character_id}/mail/{mail_id}/`\n\nAlternate route: `/v1/characters/{character_id}/mail/{mail_id}/`\n","summary":"Update metadata about a mail","tags":["Mail"],"parameters":[{"$ref":"#/parameters/character_id"},{"name":"contents","in":"body","description":"Data used to update the mail","required":true,"schema":{"type":"object","properties":{"read":{"type":"boolean","description":"Whether the mail is flagged as read","title":"put_characters_character_id_mail_mail_id_read"},"labels":{"type":"array","maxItems":25,"description":"Labels to assign to the mail. Pre-existing labels are unassigned.","items":{"type":"integer","format":"int64","uniqueItems":true,"minimum":0,"title":"put_characters_character_id_mail_mail_id_label","description":"label integer"},"title":"put_characters_character_id_mail_mail_id_labels"}},"title":"put_characters_character_id_mail_mail_id_contents","description":"contents object"}},{"$ref":"#/parameters/datasource"},{"name":"mail_id","in":"path","description":"An EVE mail ID","required":true,"type":"integer","format":"int32"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"204":{"description":"Mail updated"},"400":{"description":"Invalid label ID; or No parameters in body -- nothing to do","schema":{"type":"object","title":"put_characters_character_id_mail_mail_id_bad_request","description":"Bad request","properties":{"error":{"type":"string","description":"Bad request message","title":"put_characters_character_id_mail_mail_id_400_bad_request"}}},"examples":{"application/json":{"error":"Bad request message"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-mail.organize_mail.v1"]}],"operationId":"put_characters_character_id_mail_mail_id","x-alternate-versions":["dev","legacy","v1"]}},"/markets/prices/":{"get":{"description":"Return a list of prices\n\n---\nAlternate route: `/dev/markets/prices/`\n\nAlternate route: `/legacy/markets/prices/`\n\nAlternate route: `/v1/markets/prices/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"List market prices","tags":["Market"],"responses":{"200":{"description":"A list of prices","examples":{"application/json":[{"type_id":32772,"average_price":306292.67,"adjusted_price":306988.09}]},"schema":{"type":"array","maxItems":20000,"items":{"type":"object","required":["type_id"],"properties":{"type_id":{"type":"integer","format":"int32","title":"get_markets_prices_type_id","description":"type_id integer"},"average_price":{"type":"number","format":"double","title":"get_markets_prices_average_price","description":"average_price number"},"adjusted_price":{"type":"number","format":"double","title":"get_markets_prices_adjusted_price","description":"adjusted_price number"}},"title":"get_markets_prices_200_ok","description":"200 ok object"},"title":"get_markets_prices_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"operationId":"get_markets_prices","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/markets/{region_id}/orders/":{"get":{"description":"Return a list of orders in a region\n\n---\nAlternate route: `/dev/markets/{region_id}/orders/`\n\nAlternate route: `/legacy/markets/{region_id}/orders/`\n\nAlternate route: `/v1/markets/{region_id}/orders/`\n\n---\nThis route is cached for up to 300 seconds","summary":"List orders in a region","tags":["Market"],"parameters":[{"$ref":"#/parameters/datasource"},{"name":"order_type","in":"query","description":"Filter buy/sell orders, return all orders by default. If you query without type_id, we always return both buy and sell orders.","required":true,"type":"string","enum":["buy","sell","all"],"default":"all"},{"$ref":"#/parameters/page"},{"name":"region_id","in":"path","description":"Return orders in this region","required":true,"type":"integer","format":"int32"},{"name":"type_id","in":"query","description":"Return orders only for this type","required":false,"type":"integer","format":"int32"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of orders","examples":{"application/json":[{"order_id":4623824223,"type_id":34,"location_id":60005599,"volume_total":2000000,"volume_remain":1296000,"min_volume":1,"price":9.9,"is_buy_order":false,"duration":90,"issued":"2016-09-03T05:12:25Z","range":"region"}]},"schema":{"type":"array","maxItems":10000,"items":{"type":"object","required":["order_id","type_id","location_id","volume_total","volume_remain","min_volume","price","is_buy_order","duration","issued","range"],"properties":{"order_id":{"type":"integer","format":"int64","title":"get_markets_region_id_orders_order_id","description":"order_id integer"},"type_id":{"type":"integer","format":"int32","title":"get_markets_region_id_orders_type_id","description":"type_id integer"},"location_id":{"type":"integer","format":"int64","title":"get_markets_region_id_orders_location_id","description":"location_id integer"},"volume_total":{"type":"integer","format":"int32","title":"get_markets_region_id_orders_volume_total","description":"volume_total integer"},"volume_remain":{"type":"integer","format":"int32","title":"get_markets_region_id_orders_volume_remain","description":"volume_remain integer"},"min_volume":{"type":"integer","format":"int32","title":"get_markets_region_id_orders_min_volume","description":"min_volume integer"},"price":{"type":"number","format":"double","title":"get_markets_region_id_orders_price","description":"price number"},"is_buy_order":{"type":"boolean","title":"get_markets_region_id_orders_is_buy_order","description":"is_buy_order boolean"},"duration":{"type":"integer","format":"int32","title":"get_markets_region_id_orders_duration","description":"duration integer"},"issued":{"type":"string","format":"date-time","title":"get_markets_region_id_orders_issued","description":"issued string"},"range":{"type":"string","enum":["station","region","solarsystem","1","2","3","4","5","10","20","30","40"],"title":"get_markets_region_id_orders_range","description":"range string"}},"title":"get_markets_region_id_orders_200_ok","description":"200 ok object"},"title":"get_markets_region_id_orders_ok","description":"200 ok array"},"headers":{"X-Pages":{"description":"Maximum page number","type":"integer","format":"int32","default":1},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"422":{"description":"Not found","schema":{"type":"object","title":"get_markets_region_id_orders_unprocessable_entity","description":"Unprocessable entity","properties":{"error":{"type":"string","description":"Unprocessable entity message","title":"get_markets_region_id_orders_422_unprocessable_entity"}}},"examples":{"application/json":{"error":"Unprocessable entity message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_markets_region_id_orders","x-cached-seconds":300,"x-alternate-versions":["dev","legacy","v1"]}},"/markets/{region_id}/history/":{"get":{"description":"Return a list of historical market statistics for the specified type in a region\n\n---\nAlternate route: `/dev/markets/{region_id}/history/`\n\nAlternate route: `/legacy/markets/{region_id}/history/`\n\nAlternate route: `/v1/markets/{region_id}/history/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"List historical market statistics in a region","tags":["Market"],"parameters":[{"$ref":"#/parameters/datasource"},{"name":"region_id","in":"path","description":"Return statistics in this region","required":true,"type":"integer","format":"int32"},{"name":"type_id","in":"query","description":"Return statistics for this type","required":true,"type":"integer","format":"int32"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of historical market statistics","examples":{"application/json":[{"date":"2015-05-01","order_count":2267,"volume":16276782035,"highest":5.27,"average":5.25,"lowest":5.11}]},"schema":{"type":"array","maxItems":500,"items":{"type":"object","required":["date","order_count","volume","highest","average","lowest"],"properties":{"date":{"type":"string","format":"date","description":"The date of this historical statistic entry","title":"get_markets_region_id_history_date"},"order_count":{"type":"integer","format":"int64","description":"Total number of orders happened that day","title":"get_markets_region_id_history_order_count"},"volume":{"type":"integer","format":"int64","description":"Total","title":"get_markets_region_id_history_volume"},"highest":{"type":"number","format":"double","title":"get_markets_region_id_history_highest","description":"highest number"},"average":{"type":"number","format":"double","title":"get_markets_region_id_history_average","description":"average number"},"lowest":{"type":"number","format":"double","title":"get_markets_region_id_history_lowest","description":"lowest number"}},"title":"get_markets_region_id_history_200_ok","description":"200 ok object"},"title":"get_markets_region_id_history_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"422":{"description":"Not found","schema":{"type":"object","title":"get_markets_region_id_history_unprocessable_entity","description":"Unprocessable entity","properties":{"error":{"type":"string","description":"Unprocessable entity message","title":"get_markets_region_id_history_422_unprocessable_entity"}}},"examples":{"application/json":{"error":"Unprocessable entity message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_markets_region_id_history","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/markets/structures/{structure_id}/":{"get":{"description":"Return all orders in a structure\n\n---\nAlternate route: `/dev/markets/structures/{structure_id}/`\n\nAlternate route: `/legacy/markets/structures/{structure_id}/`\n\nAlternate route: `/v1/markets/structures/{structure_id}/`\n\n---\nThis route is cached for up to 300 seconds","summary":"List orders in a structure","tags":["Market"],"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/page"},{"name":"structure_id","in":"path","description":"Return orders in this structure","required":true,"type":"integer","format":"int64"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of orders","examples":{"application/json":[{"order_id":4623824223,"type_id":34,"location_id":1020988381992,"volume_total":2000000,"volume_remain":1296000,"min_volume":1,"price":9.9,"is_buy_order":false,"duration":90,"issued":"2016-09-03T05:12:25Z","range":"region"}]},"schema":{"type":"array","maxItems":5000,"items":{"type":"object","required":["order_id","type_id","location_id","volume_total","volume_remain","min_volume","price","is_buy_order","duration","issued","range"],"properties":{"order_id":{"type":"integer","format":"int64","title":"get_markets_structures_structure_id_order_id","description":"order_id integer"},"type_id":{"type":"integer","format":"int32","title":"get_markets_structures_structure_id_type_id","description":"type_id integer"},"location_id":{"type":"integer","format":"int64","title":"get_markets_structures_structure_id_location_id","description":"location_id integer"},"volume_total":{"type":"integer","format":"int32","title":"get_markets_structures_structure_id_volume_total","description":"volume_total integer"},"volume_remain":{"type":"integer","format":"int32","title":"get_markets_structures_structure_id_volume_remain","description":"volume_remain integer"},"min_volume":{"type":"integer","format":"int32","title":"get_markets_structures_structure_id_min_volume","description":"min_volume integer"},"price":{"type":"number","format":"double","title":"get_markets_structures_structure_id_price","description":"price number"},"is_buy_order":{"type":"boolean","title":"get_markets_structures_structure_id_is_buy_order","description":"is_buy_order boolean"},"duration":{"type":"integer","format":"int32","title":"get_markets_structures_structure_id_duration","description":"duration integer"},"issued":{"type":"string","format":"date-time","title":"get_markets_structures_structure_id_issued","description":"issued string"},"range":{"type":"string","enum":["station","region","solarsystem","1","2","3","4","5","10","20","30","40"],"title":"get_markets_structures_structure_id_range","description":"range string"}},"title":"get_markets_structures_structure_id_200_ok","description":"200 ok object"},"title":"get_markets_structures_structure_id_ok","description":"200 ok array"},"headers":{"X-Pages":{"description":"Maximum page number","type":"integer","format":"int32","default":1},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-markets.structure_markets.v1"]}],"operationId":"get_markets_structures_structure_id","x-cached-seconds":300,"x-alternate-versions":["dev","legacy","v1"]}},"/markets/groups/":{"get":{"description":"Get a list of item groups\n\n---\nAlternate route: `/dev/markets/groups/`\n\nAlternate route: `/legacy/markets/groups/`\n\nAlternate route: `/v1/markets/groups/`\n\n---\nThis route expires daily at 11:05","summary":"Get item groups","tags":["Market"],"responses":{"200":{"description":"A list of item group ids","examples":{"application/json":[1,2,3]},"schema":{"type":"array","maxItems":5000,"items":{"type":"integer","format":"int32","title":"get_markets_groups_200_ok","description":"200 ok integer"},"title":"get_markets_groups_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"operationId":"get_markets_groups","x-alternate-versions":["dev","legacy","v1"]}},"/markets/groups/{market_group_id}/":{"get":{"description":"Get information on an item group\n\n---\nAlternate route: `/dev/markets/groups/{market_group_id}/`\n\nAlternate route: `/legacy/markets/groups/{market_group_id}/`\n\nAlternate route: `/v1/markets/groups/{market_group_id}/`\n\n---\nThis route expires daily at 11:05","summary":"Get item group information","tags":["Market"],"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/language"},{"name":"market_group_id","in":"path","description":"An Eve item group ID","required":true,"type":"integer","format":"int32"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Information about an item group","examples":{"application/json":{"market_group_id":5,"name":"Standard Frigates","description":"Small, fast vessels suited to a variety of purposes.","types":[582,583],"parent_group_id":1361}},"schema":{"type":"object","required":["market_group_id","name","description","types"],"properties":{"market_group_id":{"type":"integer","format":"int32","title":"get_markets_groups_market_group_id_market_group_id","description":"market_group_id integer"},"name":{"type":"string","title":"get_markets_groups_market_group_id_name","description":"name string"},"description":{"type":"string","title":"get_markets_groups_market_group_id_description","description":"description string"},"types":{"type":"array","maxItems":5000,"items":{"type":"integer","format":"int32","title":"get_markets_groups_market_group_id_type","description":"type integer"},"title":"get_markets_groups_market_group_id_types","description":"types array"},"parent_group_id":{"type":"integer","format":"int32","title":"get_markets_groups_market_group_id_parent_group_id","description":"parent_group_id integer"}},"title":"get_markets_groups_market_group_id_ok","description":"200 ok object"},"headers":{"Content-Language":{"description":"The language used in the response","type":"string","enum":["de","en-us","fr","ja","ru","zh"]},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"404":{"description":"Market group not found","schema":{"type":"object","title":"get_markets_groups_market_group_id_not_found","description":"Not found","properties":{"error":{"type":"string","description":"Not found message","title":"get_markets_groups_market_group_id_404_not_found"}}},"examples":{"application/json":{"error":"Not found message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_markets_groups_market_group_id","x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/orders/":{"get":{"summary":"List orders from a character","description":"List market orders placed by a character\n\n---\nAlternate route: `/dev/characters/{character_id}/orders/`\n\nAlternate route: `/legacy/characters/{character_id}/orders/`\n\nAlternate route: `/v1/characters/{character_id}/orders/`\n\n---\nThis route is cached for up to 3600 seconds","tags":["Market"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Market orders placed by a character","examples":{"application/json":[{"order_id":123,"type_id":456,"region_id":123,"location_id":456,"range":"station","is_buy_order":true,"price":33.3,"volume_total":123456,"volume_remain":4422,"issued":"2016-09-03T05:12:25Z","state":"open","min_volume":1,"account_id":1000,"duration":30,"is_corp":false,"escrow":45.6}]},"schema":{"type":"array","maxItems":500,"items":{"type":"object","required":["order_id","type_id","region_id","location_id","range","is_buy_order","price","volume_total","volume_remain","issued","state","min_volume","account_id","duration","is_corp","escrow"],"properties":{"order_id":{"type":"integer","format":"int64","description":"Unique order ID","title":"get_characters_character_id_orders_order_id"},"type_id":{"type":"integer","format":"int32","description":"The type ID of the item transacted in this order","title":"get_characters_character_id_orders_type_id"},"region_id":{"type":"integer","format":"int32","description":"ID of the region where order was placed","title":"get_characters_character_id_orders_region_id"},"location_id":{"type":"integer","format":"int64","description":"ID of the location where order was placed","title":"get_characters_character_id_orders_location_id"},"range":{"type":"string","description":"Valid order range, numbers are ranges in jumps","enum":["1","10","2","20","3","30","4","40","5","region","solarsystem","station"],"title":"get_characters_character_id_orders_range"},"is_buy_order":{"type":"boolean","description":"True for a bid (buy) order. False for an offer (sell) order","title":"get_characters_character_id_orders_is_buy_order"},"price":{"type":"number","format":"double","description":"Cost per unit for this order","title":"get_characters_character_id_orders_price"},"volume_total":{"type":"integer","format":"int32","description":"Quantity of items required or offered at time order was placed","title":"get_characters_character_id_orders_volume_total"},"volume_remain":{"type":"integer","format":"int32","description":"Quantity of items still required or offered","title":"get_characters_character_id_orders_volume_remain"},"issued":{"type":"string","format":"date-time","description":"Date and time when this order was issued","title":"get_characters_character_id_orders_issued"},"state":{"type":"string","description":"Current order state","enum":["cancelled","character_deleted","closed","expired","open","pending"],"title":"get_characters_character_id_orders_state"},"min_volume":{"type":"integer","format":"int32","description":"For bids (buy orders), the minimum quantity that will be accepted in a matching offer (sell order)","title":"get_characters_character_id_orders_min_volume"},"account_id":{"type":"integer","format":"int32","description":"Wallet division for the buyer or seller of this order. Always 1000 for characters. Currently 1000 through 1006 for corporations","title":"get_characters_character_id_orders_account_id"},"duration":{"type":"integer","format":"int32","description":"Numer of days for which order is valid (starting from the issued date). An order expires at time issued + duration","title":"get_characters_character_id_orders_duration"},"is_corp":{"type":"boolean","title":"get_characters_character_id_orders_is_corp","description":"is_corp boolean"},"escrow":{"type":"number","format":"double","description":"For buy orders, the amount of ISK in escrow","title":"get_characters_character_id_orders_escrow"}},"title":"get_characters_character_id_orders_200_ok","description":"200 ok object"},"title":"get_characters_character_id_orders_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-markets.read_character_orders.v1"]}],"operationId":"get_characters_character_id_orders","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/markets/{region_id}/types/":{"get":{"description":"Return a list of type IDs that have active orders in the region, for efficient market indexing.\n\n---\nAlternate route: `/dev/markets/{region_id}/types/`\n\nAlternate route: `/legacy/markets/{region_id}/types/`\n\nAlternate route: `/v1/markets/{region_id}/types/`\n\n---\nThis route is cached for up to 600 seconds","summary":"List type IDs relevant to a market","tags":["Market"],"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/page"},{"name":"region_id","in":"path","description":"Return statistics in this region","required":true,"type":"integer","format":"int32"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of type IDs","examples":{"application/json":[587,593,597]},"schema":{"type":"array","maxItems":1000,"items":{"type":"integer","format":"int32","title":"get_markets_region_id_types_200_ok","description":"200 ok integer"},"title":"get_markets_region_id_types_ok","description":"200 ok array"},"headers":{"X-Pages":{"description":"Maximum page number","type":"integer","format":"int32","default":1},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_markets_region_id_types","x-cached-seconds":600,"x-alternate-versions":["dev","legacy","v1"]}},"/corporations/{corporation_id}/orders/":{"get":{"summary":"List orders from a corporation","description":"List market orders placed on behalf of a corporation\n\n---\nAlternate route: `/dev/corporations/{corporation_id}/orders/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/orders/`\n\nAlternate route: `/v1/corporations/{corporation_id}/orders/`\n\n---\nThis route is cached for up to 3600 seconds\n\n---\nRequires one of the following EVE corporation role(s): Accountant, Trader\n","tags":["Market"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/page"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of market orders","examples":{"application/json":[{"order_id":123,"type_id":456,"region_id":123,"location_id":456,"range":"station","is_buy_order":true,"price":33.3,"volume_total":123456,"volume_remain":4422,"issued":"2016-09-03T05:12:25Z","state":"open","min_volume":1,"wallet_division":1,"duration":30,"escrow":45.6}]},"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["order_id","type_id","region_id","location_id","range","is_buy_order","price","volume_total","volume_remain","issued","state","min_volume","wallet_division","duration","escrow"],"properties":{"order_id":{"type":"integer","format":"int64","description":"Unique order ID","title":"get_corporations_corporation_id_orders_order_id"},"type_id":{"type":"integer","format":"int32","description":"The type ID of the item transacted in this order","title":"get_corporations_corporation_id_orders_type_id"},"region_id":{"type":"integer","format":"int32","description":"ID of the region where order was placed","title":"get_corporations_corporation_id_orders_region_id"},"location_id":{"type":"integer","format":"int64","description":"ID of the location where order was placed","title":"get_corporations_corporation_id_orders_location_id"},"range":{"type":"string","description":"Valid order range, numbers are ranges in jumps","enum":["1","10","2","20","3","30","4","40","5","region","solarsystem","station"],"title":"get_corporations_corporation_id_orders_range"},"is_buy_order":{"type":"boolean","description":"True for a bid (buy) order. False for an offer (sell) order","title":"get_corporations_corporation_id_orders_is_buy_order"},"price":{"type":"number","format":"double","description":"Cost per unit for this order","title":"get_corporations_corporation_id_orders_price"},"volume_total":{"type":"integer","format":"int32","description":"Quantity of items required or offered at time order was placed","title":"get_corporations_corporation_id_orders_volume_total"},"volume_remain":{"type":"integer","format":"int32","description":"Quantity of items still required or offered","title":"get_corporations_corporation_id_orders_volume_remain"},"issued":{"type":"string","format":"date-time","description":"Date and time when this order was issued","title":"get_corporations_corporation_id_orders_issued"},"state":{"type":"string","description":"Current order state","enum":["cancelled","character_deleted","closed","expired","open","pending"],"title":"get_corporations_corporation_id_orders_state"},"min_volume":{"type":"integer","format":"int32","description":"For bids (buy orders), the minimum quantity that will be accepted in a matching offer (sell order)","title":"get_corporations_corporation_id_orders_min_volume"},"wallet_division":{"type":"integer","format":"int32","minimum":1,"maximum":7,"description":"Wallet division of which this order used","title":"get_corporations_corporation_id_orders_wallet_division"},"duration":{"type":"integer","format":"int32","description":"Numer of days for which order is valid (starting from the issued date). An order expires at time issued + duration","title":"get_corporations_corporation_id_orders_duration"},"escrow":{"type":"number","format":"double","description":"For buy orders, the amount of ISK in escrow","title":"get_corporations_corporation_id_orders_escrow"}},"title":"get_corporations_corporation_id_orders_200_ok","description":"200 ok object"},"title":"get_corporations_corporation_id_orders_ok","description":"200 ok array"},"headers":{"X-Pages":{"description":"Maximum page number","type":"integer","format":"int32","default":1},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"x-required-roles":["Accountant","Trader"],"security":[{"evesso":["esi-markets.read_corporation_orders.v1"]}],"operationId":"get_corporations_corporation_id_orders","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/opportunities/groups/":{"get":{"description":"Return a list of opportunities groups\n\n---\nAlternate route: `/dev/opportunities/groups/`\n\nAlternate route: `/legacy/opportunities/groups/`\n\nAlternate route: `/v1/opportunities/groups/`\n\n---\nThis route expires daily at 11:05","summary":"Get opportunities groups","tags":["Opportunities"],"responses":{"200":{"description":"A list of opportunities group ids","examples":{"application/json":[100,101,102,103]},"schema":{"type":"array","maxItems":50,"items":{"type":"integer","format":"int32","title":"get_opportunities_groups_200_ok","description":"200 ok integer"},"title":"get_opportunities_groups_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"operationId":"get_opportunities_groups","x-alternate-versions":["dev","legacy","v1"]}},"/opportunities/groups/{group_id}/":{"get":{"description":"Return information of an opportunities group\n\n---\nAlternate route: `/dev/opportunities/groups/{group_id}/`\n\nAlternate route: `/legacy/opportunities/groups/{group_id}/`\n\nAlternate route: `/v1/opportunities/groups/{group_id}/`\n\n---\nThis route expires daily at 11:05","summary":"Get opportunities group","tags":["Opportunities"],"parameters":[{"$ref":"#/parameters/datasource"},{"name":"group_id","in":"path","description":"ID of an opportunities group","required":true,"type":"integer","format":"int32"},{"$ref":"#/parameters/language"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Details of an opportunities group","examples":{"application/json":{"group_id":103,"name":"Welcome to New Eden","description":"As a capsuleer...","notification":"Completed: Welcome to New Eden","required_tasks":[19],"connected_groups":[100]}},"schema":{"type":"object","required":["group_id","name","description","notification","required_tasks","connected_groups"],"properties":{"group_id":{"type":"integer","format":"int32","title":"get_opportunities_groups_group_id_group_id","description":"group_id integer"},"name":{"type":"string","title":"get_opportunities_groups_group_id_name","description":"name string"},"description":{"type":"string","title":"get_opportunities_groups_group_id_description","description":"description string"},"notification":{"type":"string","title":"get_opportunities_groups_group_id_notification","description":"notification string"},"required_tasks":{"description":"Tasks need to complete for this group","type":"array","maxItems":100,"items":{"type":"integer","format":"int32","title":"get_opportunities_groups_group_id_required_task","description":"required_task integer"},"title":"get_opportunities_groups_group_id_required_tasks"},"connected_groups":{"description":"The groups that are connected to this group on the opportunities map","type":"array","maxItems":50,"items":{"type":"integer","format":"int32","title":"get_opportunities_groups_group_id_connected_group","description":"connected_group integer"},"title":"get_opportunities_groups_group_id_connected_groups"}},"title":"get_opportunities_groups_group_id_ok","description":"200 ok object"},"headers":{"Content-Language":{"description":"The language used in the response","type":"string","enum":["de","en-us","fr","ja","ru","zh"]},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_opportunities_groups_group_id","x-alternate-versions":["dev","legacy","v1"]}},"/opportunities/tasks/":{"get":{"description":"Return a list of opportunities tasks\n\n---\nAlternate route: `/dev/opportunities/tasks/`\n\nAlternate route: `/legacy/opportunities/tasks/`\n\nAlternate route: `/v1/opportunities/tasks/`\n\n---\nThis route expires daily at 11:05","summary":"Get opportunities tasks","tags":["Opportunities"],"responses":{"200":{"description":"A list of opportunities task ids","examples":{"application/json":[1,2,3,4]},"schema":{"type":"array","maxItems":100,"items":{"type":"integer","format":"int32","title":"get_opportunities_tasks_200_ok","description":"200 ok integer"},"title":"get_opportunities_tasks_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"operationId":"get_opportunities_tasks","x-alternate-versions":["dev","legacy","v1"]}},"/opportunities/tasks/{task_id}/":{"get":{"description":"Return information of an opportunities task\n\n---\nAlternate route: `/dev/opportunities/tasks/{task_id}/`\n\nAlternate route: `/legacy/opportunities/tasks/{task_id}/`\n\nAlternate route: `/v1/opportunities/tasks/{task_id}/`\n\n---\nThis route expires daily at 11:05","summary":"Get opportunities task","tags":["Opportunities"],"parameters":[{"$ref":"#/parameters/datasource"},{"name":"task_id","in":"path","description":"ID of an opportunities task","required":true,"type":"integer","format":"int32"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Details of an opportunities task","examples":{"application/json":{"task_id":10,"name":"Dock in the station","description":"To use station services...","notification":"Completed: Docked in a station!"}},"schema":{"type":"object","required":["task_id","name","description","notification"],"properties":{"task_id":{"type":"integer","format":"int32","title":"get_opportunities_tasks_task_id_task_id","description":"task_id integer"},"name":{"type":"string","title":"get_opportunities_tasks_task_id_name","description":"name string"},"description":{"type":"string","title":"get_opportunities_tasks_task_id_description","description":"description string"},"notification":{"type":"string","title":"get_opportunities_tasks_task_id_notification","description":"notification string"}},"title":"get_opportunities_tasks_task_id_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_opportunities_tasks_task_id","x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/opportunities/":{"get":{"description":"Return a list of tasks finished by a character\n\n---\nAlternate route: `/dev/characters/{character_id}/opportunities/`\n\nAlternate route: `/legacy/characters/{character_id}/opportunities/`\n\nAlternate route: `/v1/characters/{character_id}/opportunities/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"Get a character's completed tasks","tags":["Opportunities"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of opportunities task ids","examples":{"application/json":[{"task_id":1,"completed_at":"2016-04-29T12:34:56Z"}]},"schema":{"type":"array","maxItems":100,"items":{"type":"object","required":["task_id","completed_at"],"properties":{"task_id":{"type":"integer","format":"int32","title":"get_characters_character_id_opportunities_task_id","description":"task_id integer"},"completed_at":{"type":"string","format":"date-time","title":"get_characters_character_id_opportunities_completed_at","description":"completed_at string"}},"title":"get_characters_character_id_opportunities_200_ok","description":"200 ok object"},"title":"get_characters_character_id_opportunities_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-characters.read_opportunities.v1"]}],"operationId":"get_characters_character_id_opportunities","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/planets/":{"get":{"description":"Returns a list of all planetary colonies owned by a character.\n\n---\nAlternate route: `/dev/characters/{character_id}/planets/`\n\nAlternate route: `/legacy/characters/{character_id}/planets/`\n\nAlternate route: `/v1/characters/{character_id}/planets/`\n\n---\nThis route is cached for up to 600 seconds","summary":"Get colonies","tags":["Planetary Interaction"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"List of colonies","examples":{"application/json":[{"solar_system_id":30000379,"upgrade_level":0,"planet_id":40023691,"last_update":"2016-11-28T16:42:51Z","owner_id":90000001,"planet_type":"plasma","num_pins":1},{"solar_system_id":30000379,"upgrade_level":0,"planet_id":40023697,"last_update":"2016-11-28T16:41:54Z","owner_id":90000001,"planet_type":"barren","num_pins":1}]},"schema":{"type":"array","maxItems":10,"items":{"type":"object","required":["solar_system_id","planet_id","planet_type","owner_id","last_update","upgrade_level","num_pins"],"properties":{"solar_system_id":{"type":"integer","format":"int32","title":"get_characters_character_id_planets_solar_system_id","description":"solar_system_id integer"},"planet_id":{"type":"integer","format":"int32","title":"get_characters_character_id_planets_planet_id","description":"planet_id integer"},"owner_id":{"type":"integer","format":"int32","title":"get_characters_character_id_planets_owner_id","description":"owner_id integer"},"upgrade_level":{"type":"integer","format":"int32","minimum":0,"maximum":5,"title":"get_characters_character_id_planets_upgrade_level","description":"upgrade_level integer"},"num_pins":{"type":"integer","format":"int32","minimum":1,"title":"get_characters_character_id_planets_num_pins","description":"num_pins integer"},"last_update":{"type":"string","format":"date-time","title":"get_characters_character_id_planets_last_update","description":"last_update string"},"planet_type":{"type":"string","enum":["temperate","barren","oceanic","ice","gas","lava","storm","plasma"],"title":"get_characters_character_id_planets_planet_type","description":"planet_type string"}},"title":"get_characters_character_id_planets_200_ok","description":"200 ok object"},"title":"get_characters_character_id_planets_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-planets.manage_planets.v1"]}],"operationId":"get_characters_character_id_planets","x-cached-seconds":600,"x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/planets/{planet_id}/":{"get":{"description":"Returns full details on the layout of a single planetary colony, including links, pins and routes. Note: Planetary information is only recalculated when the colony is viewed through the client. Information will not update until this criteria is met.\n\n---\nAlternate route: `/dev/characters/{character_id}/planets/{planet_id}/`\n\nAlternate route: `/v3/characters/{character_id}/planets/{planet_id}/`\n\n---\nThis route is cached for up to 600 seconds","summary":"Get colony layout","tags":["Planetary Interaction"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"description":"Planet id of the target planet","format":"int32","in":"path","name":"planet_id","required":true,"type":"integer"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Colony layout","examples":{"application/json":{"links":[{"source_pin_id":1000000017021,"destination_pin_id":1000000017022,"link_level":0}],"pins":[{"longitude":0.717145933308,"is_running":true,"type_id":2254,"pin_id":1000000017021,"latitude":1.55087844973},{"longitude":0.709775584394,"is_running":true,"type_id":2256,"pin_id":1000000017022,"latitude":1.53360639935}],"routes":[{"source_pin_id":1000000017029,"quantity":20,"content_type_id":2393,"route_id":4,"destination_pin_id":1000000017030}]}},"schema":{"type":"object","required":["links","pins","routes"],"properties":{"links":{"type":"array","maxItems":500,"items":{"type":"object","required":["source_pin_id","destination_pin_id","link_level"],"properties":{"source_pin_id":{"type":"integer","format":"int64","title":"get_characters_character_id_planets_planet_id_source_pin_id","description":"source_pin_id integer"},"destination_pin_id":{"type":"integer","format":"int64","title":"get_characters_character_id_planets_planet_id_destination_pin_id","description":"destination_pin_id integer"},"link_level":{"type":"integer","format":"int32","minimum":0,"maximum":10,"title":"get_characters_character_id_planets_planet_id_link_level","description":"link_level integer"}},"title":"get_characters_character_id_planets_planet_id_link","description":"link object"},"title":"get_characters_character_id_planets_planet_id_links","description":"links array"},"pins":{"type":"array","maxItems":100,"items":{"type":"object","required":["pin_id","type_id","latitude","longitude"],"properties":{"latitude":{"type":"number","format":"float","title":"get_characters_character_id_planets_planet_id_latitude","description":"latitude number"},"longitude":{"type":"number","format":"float","title":"get_characters_character_id_planets_planet_id_longitude","description":"longitude number"},"pin_id":{"type":"integer","format":"int64","title":"get_characters_character_id_planets_planet_id_pin_id","description":"pin_id integer"},"type_id":{"type":"integer","format":"int32","title":"get_characters_character_id_planets_planet_id_type_id","description":"type_id integer"},"schematic_id":{"type":"integer","format":"int32","title":"get_characters_character_id_planets_planet_id_schematic_id","description":"schematic_id integer"},"extractor_details":{"type":"object","required":["heads"],"properties":{"heads":{"type":"array","maxItems":10,"items":{"type":"object","required":["head_id","latitude","longitude"],"properties":{"head_id":{"type":"integer","format":"int32","minimum":0,"maximum":9,"title":"get_characters_character_id_planets_planet_id_head_id","description":"head_id integer"},"latitude":{"type":"number","format":"float","title":"get_characters_character_id_planets_planet_id_latitude","description":"latitude number"},"longitude":{"type":"number","format":"float","title":"get_characters_character_id_planets_planet_id_longitude","description":"longitude number"}},"title":"get_characters_character_id_planets_planet_id_head","description":"head object"},"title":"get_characters_character_id_planets_planet_id_heads","description":"heads array"},"product_type_id":{"type":"integer","format":"int32","title":"get_characters_character_id_planets_planet_id_product_type_id","description":"product_type_id integer"},"cycle_time":{"description":"in seconds","type":"integer","format":"int32","title":"get_characters_character_id_planets_planet_id_cycle_time"},"head_radius":{"type":"number","format":"float","title":"get_characters_character_id_planets_planet_id_head_radius","description":"head_radius number"},"qty_per_cycle":{"type":"integer","format":"int32","title":"get_characters_character_id_planets_planet_id_qty_per_cycle","description":"qty_per_cycle integer"}},"title":"get_characters_character_id_planets_planet_id_extractor_details","description":"extractor_details object"},"factory_details":{"type":"object","required":["schematic_id"],"properties":{"schematic_id":{"type":"integer","format":"int32","title":"get_characters_character_id_planets_planet_id_schematic_id","description":"schematic_id integer"}},"title":"get_characters_character_id_planets_planet_id_factory_details","description":"factory_details object"},"contents":{"type":"array","maxItems":90,"items":{"type":"object","required":["type_id","amount"],"properties":{"type_id":{"type":"integer","format":"int32","title":"get_characters_character_id_planets_planet_id_type_id","description":"type_id integer"},"amount":{"type":"integer","format":"int64","title":"get_characters_character_id_planets_planet_id_amount","description":"amount integer"}},"title":"get_characters_character_id_planets_planet_id_content","description":"content object"},"title":"get_characters_character_id_planets_planet_id_contents","description":"contents array"},"install_time":{"type":"string","format":"date-time","title":"get_characters_character_id_planets_planet_id_install_time","description":"install_time string"},"expiry_time":{"type":"string","format":"date-time","title":"get_characters_character_id_planets_planet_id_expiry_time","description":"expiry_time string"},"last_cycle_start":{"type":"string","format":"date-time","title":"get_characters_character_id_planets_planet_id_last_cycle_start","description":"last_cycle_start string"}},"title":"get_characters_character_id_planets_planet_id_pin","description":"pin object"},"title":"get_characters_character_id_planets_planet_id_pins","description":"pins array"},"routes":{"type":"array","maxItems":1000,"items":{"type":"object","required":["route_id","source_pin_id","destination_pin_id","content_type_id","quantity"],"properties":{"route_id":{"type":"integer","format":"int64","title":"get_characters_character_id_planets_planet_id_route_id","description":"route_id integer"},"source_pin_id":{"type":"integer","format":"int64","title":"get_characters_character_id_planets_planet_id_source_pin_id","description":"source_pin_id integer"},"destination_pin_id":{"type":"integer","format":"int64","title":"get_characters_character_id_planets_planet_id_destination_pin_id","description":"destination_pin_id integer"},"content_type_id":{"type":"integer","format":"int32","title":"get_characters_character_id_planets_planet_id_content_type_id","description":"content_type_id integer"},"quantity":{"type":"number","format":"float","title":"get_characters_character_id_planets_planet_id_quantity","description":"quantity number"},"waypoints":{"type":"array","maxItems":5,"description":"list of pin ID waypoints","items":{"type":"integer","format":"int64","title":"get_characters_character_id_planets_planet_id_waypoint","description":"waypoint integer"},"title":"get_characters_character_id_planets_planet_id_waypoints"}},"title":"get_characters_character_id_planets_planet_id_route","description":"route object"},"title":"get_characters_character_id_planets_planet_id_routes","description":"routes array"}},"title":"get_characters_character_id_planets_planet_id_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"404":{"description":"Colony not found","examples":{"application/json":{"error":"Colony not found"}},"schema":{"type":"object","description":"Colony not found","properties":{"error":{"type":"string","description":"error message","title":"get_characters_character_id_planets_planet_id_error"}},"title":"get_characters_character_id_planets_planet_id_not_found"}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-planets.manage_planets.v1"]}],"operationId":"get_characters_character_id_planets_planet_id","x-cached-seconds":600,"x-alternate-versions":["dev","v3"]}},"/universe/schematics/{schematic_id}/":{"get":{"description":"Get information on a planetary factory schematic\n\n---\nAlternate route: `/dev/universe/schematics/{schematic_id}/`\n\nAlternate route: `/legacy/universe/schematics/{schematic_id}/`\n\nAlternate route: `/v1/universe/schematics/{schematic_id}/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"Get schematic information","tags":["Planetary Interaction"],"parameters":[{"$ref":"#/parameters/datasource"},{"name":"schematic_id","in":"path","description":"A PI schematic ID","required":true,"type":"integer","format":"int32"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Public data about a schematic","examples":{"application/json":{"schematic_name":"Bacteria","cycle_time":1800}},"schema":{"type":"object","required":["schematic_name","cycle_time"],"properties":{"schematic_name":{"type":"string","title":"get_universe_schematics_schematic_id_schematic_name","description":"schematic_name string"},"cycle_time":{"type":"integer","format":"int32","description":"Time in seconds to process a run","title":"get_universe_schematics_schematic_id_cycle_time"}},"title":"get_universe_schematics_schematic_id_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"404":{"description":"Schematic not found","examples":{"application/json":{"error":"Schematic not found"}},"schema":{"type":"object","description":"Schematic not found","properties":{"error":{"type":"string","description":"error message","title":"get_universe_schematics_schematic_id_error"}},"title":"get_universe_schematics_schematic_id_not_found"}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_universe_schematics_schematic_id","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/corporations/{corporation_id}/customs_offices/":{"get":{"description":"List customs offices owned by a corporation\n\n---\nAlternate route: `/dev/corporations/{corporation_id}/customs_offices/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/customs_offices/`\n\nAlternate route: `/v1/corporations/{corporation_id}/customs_offices/`\n\n---\nThis route is cached for up to 3600 seconds\n\n---\nRequires one of the following EVE corporation role(s): Director\n","summary":"List corporation customs offices","tags":["Planetary Interaction"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/page"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of customs offices and their settings","examples":{"application/json":[{"office_id":1000000014530,"system_id":30003657,"reinforce_exit_start":23,"reinforce_exit_end":1,"allow_alliance_access":false,"allow_access_with_standings":true,"standing_level":"neutral","corporation_tax_rate":0.02,"alliance_tax_rate":0.1,"excellent_standing_tax_rate":0.05,"good_standing_tax_rate":0.2,"neutral_standing_tax_rate":0.5}]},"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["office_id","system_id","reinforce_exit_start","reinforce_exit_end","allow_alliance_access","allow_access_with_standings"],"properties":{"office_id":{"type":"integer","format":"int64","description":"unique ID of this customs office","title":"get_corporations_corporation_id_customs_offices_office_id"},"system_id":{"type":"integer","format":"int32","description":"ID of the solar system this customs office is located in","title":"get_corporations_corporation_id_customs_offices_system_id"},"reinforce_exit_start":{"type":"integer","format":"int32","minimum":0,"maximum":23,"description":"Together with reinforce_exit_end, marks a 2-hour period where this customs office could exit reinforcement mode during the day after initial attack","title":"get_corporations_corporation_id_customs_offices_reinforce_exit_start"},"reinforce_exit_end":{"type":"integer","format":"int32","minimum":0,"maximum":23,"title":"get_corporations_corporation_id_customs_offices_reinforce_exit_end","description":"reinforce_exit_end integer"},"corporation_tax_rate":{"type":"number","format":"float","title":"get_corporations_corporation_id_customs_offices_corporation_tax_rate","description":"corporation_tax_rate number"},"allow_alliance_access":{"type":"boolean","title":"get_corporations_corporation_id_customs_offices_allow_alliance_access","description":"allow_alliance_access boolean"},"alliance_tax_rate":{"type":"number","format":"float","description":"Only present if alliance access is allowed","title":"get_corporations_corporation_id_customs_offices_alliance_tax_rate"},"allow_access_with_standings":{"type":"boolean","description":"standing_level and any standing related tax rate only present when this is true","title":"get_corporations_corporation_id_customs_offices_allow_access_with_standings"},"standing_level":{"type":"string","enum":["bad","excellent","good","neutral","terrible"],"description":"Access is allowed only for entities with this level of standing or better","title":"get_corporations_corporation_id_customs_offices_standing_level"},"excellent_standing_tax_rate":{"type":"number","format":"float","description":"Tax rate for entities with excellent level of standing, only present if this level is allowed, same for all other standing related tax rates","title":"get_corporations_corporation_id_customs_offices_excellent_standing_tax_rate"},"good_standing_tax_rate":{"type":"number","format":"float","title":"get_corporations_corporation_id_customs_offices_good_standing_tax_rate","description":"good_standing_tax_rate number"},"neutral_standing_tax_rate":{"type":"number","format":"float","title":"get_corporations_corporation_id_customs_offices_neutral_standing_tax_rate","description":"neutral_standing_tax_rate number"},"bad_standing_tax_rate":{"type":"number","format":"float","title":"get_corporations_corporation_id_customs_offices_bad_standing_tax_rate","description":"bad_standing_tax_rate number"},"terrible_standing_tax_rate":{"type":"number","format":"float","title":"get_corporations_corporation_id_customs_offices_terrible_standing_tax_rate","description":"terrible_standing_tax_rate number"}},"title":"get_corporations_corporation_id_customs_offices_200_ok","description":"200 ok object"},"title":"get_corporations_corporation_id_customs_offices_ok","description":"200 ok array"},"headers":{"X-Pages":{"description":"Maximum page number","type":"integer","format":"int32","default":1},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"x-required-roles":["Director"],"security":[{"evesso":["esi-planets.read_customs_offices.v1"]}],"operationId":"get_corporations_corporation_id_customs_offices","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/route/{origin}/{destination}/":{"get":{"description":"Get the systems between origin and destination\n\n---\nAlternate route: `/dev/route/{origin}/{destination}/`\n\nAlternate route: `/legacy/route/{origin}/{destination}/`\n\nAlternate route: `/v1/route/{origin}/{destination}/`\n\n---\nThis route is cached for up to 86400 seconds","summary":"Get route","tags":["Routes"],"parameters":[{"name":"avoid","in":"query","description":"avoid solar system ID(s)","type":"array","maxItems":100,"uniqueItems":true,"items":{"type":"integer","format":"int32"}},{"name":"connections","in":"query","type":"array","description":"connected solar system pairs","maxItems":100,"uniqueItems":true,"items":{"type":"array","minItems":2,"maxItems":2,"uniqueItems":true,"collectionFormat":"pipes","items":{"type":"integer","format":"int32"}}},{"$ref":"#/parameters/datasource"},{"name":"destination","in":"path","description":"destination solar system ID","type":"integer","format":"int32","required":true},{"name":"flag","in":"query","description":"route security preference","default":"shortest","type":"string","enum":["shortest","secure","insecure"]},{"name":"origin","in":"path","description":"origin solar system ID","type":"integer","format":"int32","required":true},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Solar systems in route from origin to destination","examples":{"application/json":[30002771,30002770,30002769,30002772]},"schema":{"type":"array","maxItems":1000,"description":"Solar systems in route","items":{"description":"Solar system in route","type":"integer","format":"int32","title":"Solar system ID"},"title":"get_route_origin_destination_ok"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"404":{"description":"No route found","schema":{"type":"object","title":"get_route_origin_destination_not_found","description":"Not found","properties":{"error":{"type":"string","description":"Not found message","title":"get_route_origin_destination_404_not_found"}}},"examples":{"application/json":{"error":"Not found message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_route_origin_destination","x-cached-seconds":86400,"x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/search/":{"get":{"description":"Search for entities that match a given sub-string.\n\n---\nAlternate route: `/v2/characters/{character_id}/search/`\n\n---\nThis route is cached for up to 3600 seconds\n\n---\n[This route has an available update](https://esi.tech.ccp.is/diff/latest/dev/#GET-/characters/{character_id}/search/)","summary":"Search on a string","tags":["Search"],"parameters":[{"name":"categories","in":"query","description":"Type of entities to search for","required":true,"type":"array","minItems":1,"maxItems":12,"uniqueItems":true,"items":{"type":"string","enum":["agent","alliance","character","constellation","corporation","faction","inventorytype","region","solarsystem","station","structure","wormhole"]}},{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/language"},{"name":"search","in":"query","description":"The string to search on","required":true,"type":"string","minLength":3},{"name":"strict","in":"query","description":"Whether the search should be a strict match","type":"boolean","default":false},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of search results","examples":{"application/json":{"station":[60004588,60004594,60005725,60009106,60012721,60012724,60012727],"solarsystem":[30002510]}},"schema":{"type":"object","properties":{"agent":{"type":"array","maxItems":500,"items":{"type":"integer","format":"int32","title":"get_characters_character_id_search_agent","description":"agent integer"},"title":"get_characters_character_id_search_agent","description":"agent array"},"alliance":{"type":"array","maxItems":500,"items":{"type":"integer","format":"int32","title":"get_characters_character_id_search_alliance","description":"alliance integer"},"title":"get_characters_character_id_search_alliance","description":"alliance array"},"character":{"type":"array","maxItems":500,"items":{"type":"integer","format":"int32","title":"get_characters_character_id_search_character","description":"character integer"},"title":"get_characters_character_id_search_character","description":"character array"},"constellation":{"type":"array","maxItems":500,"items":{"type":"integer","format":"int32","title":"get_characters_character_id_search_constellation","description":"constellation integer"},"title":"get_characters_character_id_search_constellation","description":"constellation array"},"corporation":{"type":"array","maxItems":500,"items":{"type":"integer","format":"int32","title":"get_characters_character_id_search_corporation","description":"corporation integer"},"title":"get_characters_character_id_search_corporation","description":"corporation array"},"faction":{"type":"array","maxItems":500,"items":{"type":"integer","format":"int32","title":"get_characters_character_id_search_faction","description":"faction integer"},"title":"get_characters_character_id_search_faction","description":"faction array"},"inventorytype":{"type":"array","maxItems":500,"items":{"type":"integer","format":"int32","title":"get_characters_character_id_search_inventorytype","description":"inventorytype integer"},"title":"get_characters_character_id_search_inventorytype","description":"inventorytype array"},"region":{"type":"array","maxItems":500,"items":{"type":"integer","format":"int32","title":"get_characters_character_id_search_region","description":"region integer"},"title":"get_characters_character_id_search_region","description":"region array"},"solarsystem":{"type":"array","maxItems":500,"items":{"type":"integer","format":"int32","title":"get_characters_character_id_search_solarsystem","description":"solarsystem integer"},"title":"get_characters_character_id_search_solarsystem","description":"solarsystem array"},"station":{"type":"array","maxItems":500,"items":{"type":"integer","format":"int32","title":"get_characters_character_id_search_station","description":"station integer"},"title":"get_characters_character_id_search_station","description":"station array"},"structure":{"type":"array","maxItems":500,"items":{"type":"integer","format":"int64","title":"get_characters_character_id_search_structure","description":"structure integer"},"title":"get_characters_character_id_search_structure","description":"structure array"},"wormhole":{"type":"array","maxItems":500,"items":{"type":"integer","format":"int32","title":"get_characters_character_id_search_wormhole","description":"wormhole integer"},"title":"get_characters_character_id_search_wormhole","description":"wormhole array"}},"title":"get_characters_character_id_search_ok","description":"200 ok object"},"headers":{"Content-Language":{"description":"The language used in the response","type":"string","enum":["de","en-us","fr","ja","ru","zh"]},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-search.search_structures.v1"]}],"operationId":"get_characters_character_id_search","x-cached-seconds":3600,"x-alternate-versions":["v2"]}},"/search/":{"get":{"description":"Search for entities that match a given sub-string.\n\n---\nAlternate route: `/legacy/search/`\n\nAlternate route: `/v1/search/`\n\n---\nThis route is cached for up to 3600 seconds\n\n---\n[This route has an available update](https://esi.tech.ccp.is/diff/latest/dev/#GET-/search/)","summary":"Search on a string","tags":["Search"],"parameters":[{"name":"categories","in":"query","description":"Type of entities to search for","required":true,"type":"array","minItems":1,"maxItems":10,"uniqueItems":true,"items":{"type":"string","enum":["agent","alliance","character","constellation","corporation","faction","inventorytype","region","solarsystem","station","wormhole"]}},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/language"},{"name":"search","in":"query","description":"The string to search on","required":true,"type":"string","minLength":3},{"name":"strict","in":"query","description":"Whether the search should be a strict match","type":"boolean","default":false},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of search results","examples":{"application/json":{"station":[60004588,60004594,60005725,60009106,60012721,60012724,60012727],"solarsystem":[30002510]}},"schema":{"type":"object","properties":{"agent":{"type":"array","maxItems":500,"items":{"type":"integer","format":"int32","title":"get_search_agent","description":"agent integer"},"title":"get_search_agent","description":"agent array"},"alliance":{"type":"array","maxItems":500,"items":{"type":"integer","format":"int32","title":"get_search_alliance","description":"alliance integer"},"title":"get_search_alliance","description":"alliance array"},"character":{"type":"array","maxItems":500,"items":{"type":"integer","format":"int32","title":"get_search_character","description":"character integer"},"title":"get_search_character","description":"character array"},"constellation":{"type":"array","maxItems":500,"items":{"type":"integer","format":"int32","title":"get_search_constellation","description":"constellation integer"},"title":"get_search_constellation","description":"constellation array"},"corporation":{"type":"array","maxItems":500,"items":{"type":"integer","format":"int32","title":"get_search_corporation","description":"corporation integer"},"title":"get_search_corporation","description":"corporation array"},"faction":{"type":"array","maxItems":500,"items":{"type":"integer","format":"int32","title":"get_search_faction","description":"faction integer"},"title":"get_search_faction","description":"faction array"},"inventorytype":{"type":"array","maxItems":500,"items":{"type":"integer","format":"int32","title":"get_search_inventorytype","description":"inventorytype integer"},"title":"get_search_inventorytype","description":"inventorytype array"},"region":{"type":"array","maxItems":500,"items":{"type":"integer","format":"int32","title":"get_search_region","description":"region integer"},"title":"get_search_region","description":"region array"},"solarsystem":{"type":"array","maxItems":500,"items":{"type":"integer","format":"int32","title":"get_search_solarsystem","description":"solarsystem integer"},"title":"get_search_solarsystem","description":"solarsystem array"},"station":{"type":"array","maxItems":500,"items":{"type":"integer","format":"int32","title":"get_search_station","description":"station integer"},"title":"get_search_station","description":"station array"},"wormhole":{"type":"array","maxItems":500,"items":{"type":"integer","format":"int32","title":"get_search_wormhole","description":"wormhole integer"},"title":"get_search_wormhole","description":"wormhole array"}},"title":"get_search_ok","description":"200 ok object"},"headers":{"Content-Language":{"description":"The language used in the response","type":"string","enum":["de","en-us","fr","ja","ru","zh"]},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_search","x-cached-seconds":3600,"x-alternate-versions":["legacy","v1"]}},"/characters/{character_id}/skillqueue/":{"get":{"description":"List the configured skill queue for the given character\n\n---\nAlternate route: `/dev/characters/{character_id}/skillqueue/`\n\nAlternate route: `/legacy/characters/{character_id}/skillqueue/`\n\nAlternate route: `/v2/characters/{character_id}/skillqueue/`\n\n---\nThis route is cached for up to 120 seconds","summary":"Get character's skill queue","tags":["Skills"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"The current skill queue, sorted ascending by finishing time","examples":{"application/json":[{"skill_id":1,"finish_date":"2016-06-29T10:47:00Z","start_date":"2016-06-29T10:46:00Z","finished_level":3,"queue_position":0},{"skill_id":1,"finish_date":"2016-07-15T10:47:00Z","start_date":"2016-06-29T10:47:00Z","finished_level":4,"queue_position":1},{"skill_id":2,"finish_date":"2016-08-30T10:47:00Z","start_date":"2016-07-15T10:47:00Z","finished_level":2,"queue_position":2}]},"schema":{"type":"array","maxItems":51,"items":{"type":"object","required":["skill_id","finished_level","queue_position"],"properties":{"skill_id":{"type":"integer","format":"int32","title":"get_characters_character_id_skillqueue_skill_id","description":"skill_id integer"},"finish_date":{"type":"string","format":"date-time","title":"get_characters_character_id_skillqueue_finish_date","description":"finish_date string"},"start_date":{"type":"string","format":"date-time","title":"get_characters_character_id_skillqueue_start_date","description":"start_date string"},"finished_level":{"type":"integer","format":"int32","minimum":0,"maximum":5,"title":"get_characters_character_id_skillqueue_finished_level","description":"finished_level integer"},"queue_position":{"type":"integer","format":"int32","title":"get_characters_character_id_skillqueue_queue_position","description":"queue_position integer"},"training_start_sp":{"type":"integer","format":"int32","title":"get_characters_character_id_skillqueue_training_start_sp","description":"training_start_sp integer"},"level_end_sp":{"type":"integer","format":"int32","title":"get_characters_character_id_skillqueue_level_end_sp","description":"level_end_sp integer"},"level_start_sp":{"type":"integer","format":"int32","description":"Amount of SP that was in the skill when it started training it's current level. Used to calculate % of current level complete.","title":"get_characters_character_id_skillqueue_level_start_sp"}},"title":"get_characters_character_id_skillqueue_200_ok","description":"200 ok object"},"title":"get_characters_character_id_skillqueue_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-skills.read_skillqueue.v1"]}],"operationId":"get_characters_character_id_skillqueue","x-cached-seconds":120,"x-alternate-versions":["dev","legacy","v2"]}},"/characters/{character_id}/skills/":{"get":{"description":"List all trained skills for the given character\n\n---\nAlternate route: `/v3/characters/{character_id}/skills/`\n\n---\nThis route is cached for up to 120 seconds\n\n---\n[This route has an available update](https://esi.tech.ccp.is/diff/latest/dev/#GET-/characters/{character_id}/skills/)","summary":"Get character skills","tags":["Skills"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Known skills for the character","examples":{"application/json":{"skills":[{"skill_id":1,"skillpoints_in_skill":10000,"current_skill_level":1},{"skill_id":2,"skillpoints_in_skill":10000,"current_skill_level":1}],"total_sp":20000}},"schema":{"type":"object","properties":{"skills":{"type":"array","maxItems":1000,"items":{"type":"object","properties":{"skill_id":{"type":"integer","format":"int32","title":"get_characters_character_id_skills_skill_id","description":"skill_id integer"},"skillpoints_in_skill":{"type":"integer","format":"int64","title":"get_characters_character_id_skills_skillpoints_in_skill","description":"skillpoints_in_skill integer"},"current_skill_level":{"type":"integer","format":"int32","title":"get_characters_character_id_skills_current_skill_level","description":"current_skill_level integer"}},"title":"get_characters_character_id_skills_skill","description":"skill object"},"title":"get_characters_character_id_skills_skills","description":"skills array"},"total_sp":{"type":"integer","format":"int64","title":"get_characters_character_id_skills_total_sp","description":"total_sp integer"}},"title":"get_characters_character_id_skills_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-skills.read_skills.v1"]}],"operationId":"get_characters_character_id_skills","x-cached-seconds":120,"x-alternate-versions":["v3"]}},"/characters/{character_id}/attributes/":{"get":{"description":"Return attributes of a character\n\n---\nAlternate route: `/dev/characters/{character_id}/attributes/`\n\nAlternate route: `/legacy/characters/{character_id}/attributes/`\n\nAlternate route: `/v1/characters/{character_id}/attributes/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"Get character attributes","tags":["Skills"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Attributes of a character","examples":{"application/json":{"charisma":20,"intelligence":20,"memory":20,"perception":20,"willpower":20}},"schema":{"type":"object","required":["charisma","intelligence","memory","perception","willpower"],"properties":{"charisma":{"type":"integer","format":"int32","title":"get_characters_character_id_attributes_charisma","description":"charisma integer"},"intelligence":{"type":"integer","format":"int32","title":"get_characters_character_id_attributes_intelligence","description":"intelligence integer"},"memory":{"type":"integer","format":"int32","title":"get_characters_character_id_attributes_memory","description":"memory integer"},"perception":{"type":"integer","format":"int32","title":"get_characters_character_id_attributes_perception","description":"perception integer"},"willpower":{"type":"integer","format":"int32","title":"get_characters_character_id_attributes_willpower","description":"willpower integer"},"bonus_remaps":{"type":"integer","format":"int32","description":"Number of available bonus character neural remaps","title":"get_characters_character_id_attributes_bonus_remaps"},"last_remap_date":{"type":"string","format":"date-time","description":"Datetime of last neural remap, including usage of bonus remaps","title":"get_characters_character_id_attributes_last_remap_date"},"accrued_remap_cooldown_date":{"type":"string","format":"date-time","description":"Neural remapping cooldown after a character uses remap accrued over time","title":"get_characters_character_id_attributes_accrued_remap_cooldown_date"}},"title":"get_characters_character_id_attributes_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-skills.read_skills.v1"]}],"operationId":"get_characters_character_id_attributes","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/sovereignty/structures/":{"get":{"description":"Shows sovereignty data for structures.\n\n---\nAlternate route: `/dev/sovereignty/structures/`\n\nAlternate route: `/legacy/sovereignty/structures/`\n\nAlternate route: `/v1/sovereignty/structures/`\n\n---\nThis route is cached for up to 120 seconds","summary":"List sovereignty structures","tags":["Sovereignty"],"responses":{"200":{"description":"A list of sovereignty structures","examples":{"application/json":[{"alliance_id":498125261,"solar_system_id":30000570,"structure_id":1018253388776,"structure_type_id":32226,"vulnerability_occupancy_level":2,"vulnerable_start_time":"2016-10-28T20:30:00Z","vulnerable_end_time":"2016-10-29T05:30:00Z"}]},"schema":{"type":"array","maxItems":10000,"items":{"type":"object","required":["alliance_id","solar_system_id","structure_id","structure_type_id"],"properties":{"alliance_id":{"type":"integer","format":"int32","description":"The alliance that owns the structure.\n","title":"get_sovereignty_structures_alliance_id"},"solar_system_id":{"type":"integer","format":"int32","description":"Solar system in which the structure is located.\n","title":"get_sovereignty_structures_solar_system_id"},"structure_id":{"type":"integer","format":"int64","description":"Unique item ID for this structure.","title":"get_sovereignty_structures_structure_id"},"structure_type_id":{"type":"integer","format":"int32","description":"A reference to the type of structure this is.\n","title":"get_sovereignty_structures_structure_type_id"},"vulnerability_occupancy_level":{"type":"number","format":"float","description":"The occupancy level for the next or current vulnerability window. This takes into account all development indexes and capital system bonuses. Also known as Activity Defense Multiplier from in the client. It increases the time that attackers must spend using their entosis links on the structure.\n","title":"get_sovereignty_structures_vulnerability_occupancy_level"},"vulnerable_start_time":{"type":"string","format":"date-time","description":"The next time at which the structure will become vulnerable. Or the start time of the current window if current time is between this and vulnerableEndTime.\n","title":"get_sovereignty_structures_vulnerable_start_time"},"vulnerable_end_time":{"type":"string","format":"date-time","description":"The time at which the next or current vulnerability window ends. At the end of a vulnerability window the next window is recalculated and locked in along with the vulnerabilityOccupancyLevel. If the structure is not in 100% entosis control of the defender, it will go in to 'overtime' and stay vulnerable for as long as that situation persists. Only once the defenders have 100% entosis control and has the vulnerableEndTime passed does the vulnerability interval expire and a new one is calculated.\n","title":"get_sovereignty_structures_vulnerable_end_time"}},"title":"get_sovereignty_structures_200_ok","description":"200 ok object"},"title":"get_sovereignty_structures_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"operationId":"get_sovereignty_structures","x-cached-seconds":120,"x-alternate-versions":["dev","legacy","v1"]}},"/sovereignty/campaigns/":{"get":{"description":"Shows sovereignty data for campaigns.\n\n---\nAlternate route: `/dev/sovereignty/campaigns/`\n\nAlternate route: `/legacy/sovereignty/campaigns/`\n\nAlternate route: `/v1/sovereignty/campaigns/`\n\n---\nThis route is cached for up to 5 seconds","summary":"List sovereignty campaigns","tags":["Sovereignty"],"responses":{"200":{"description":"A list of sovereignty campaigns","examples":{"application/json":[{"campaign_id":32833,"structure_id":61001096,"solar_system_id":30000856,"constellation_id":20000125,"event_type":"station_defense","start_time":"2016-10-29T14:34:40Z","defender_id":1695357456,"defender_score":0.6,"attackers_score":0.4}]},"schema":{"type":"array","maxItems":10000,"items":{"type":"object","required":["campaign_id","structure_id","solar_system_id","constellation_id","event_type","start_time"],"properties":{"campaign_id":{"type":"integer","format":"int32","description":"Unique ID for this campaign.","title":"get_sovereignty_campaigns_campaign_id"},"structure_id":{"type":"integer","format":"int64","description":"The structure item ID that is related to this campaign.\n","title":"get_sovereignty_campaigns_structure_id"},"solar_system_id":{"type":"integer","format":"int32","description":"The solar system the structure is located in.\n","title":"get_sovereignty_campaigns_solar_system_id"},"constellation_id":{"type":"integer","format":"int32","description":"The constellation in which the campaign will take place.\n","title":"get_sovereignty_campaigns_constellation_id"},"event_type":{"type":"string","description":"Type of event this campaign is for. tcu_defense, ihub_defense and station_defense are referred to as \"Defense Events\", station_freeport as \"Freeport Events\".\n","enum":["tcu_defense","ihub_defense","station_defense","station_freeport"],"title":"get_sovereignty_campaigns_event_type"},"start_time":{"type":"string","format":"date-time","description":"Time the event is scheduled to start.\n","title":"get_sovereignty_campaigns_start_time"},"defender_id":{"type":"integer","format":"int32","description":"Defending alliance, only present in Defense Events\n","title":"get_sovereignty_campaigns_defender_id"},"defender_score":{"type":"number","format":"float","description":"Score for the defending alliance, only present in Defense Events.\n","title":"get_sovereignty_campaigns_defender_score"},"attackers_score":{"type":"number","format":"float","description":"Score for all attacking parties, only present in Defense Events.\n","title":"get_sovereignty_campaigns_attackers_score"},"participants":{"type":"array","description":"Alliance participating and their respective scores, only present in Freeport Events.\n","maxItems":5000,"items":{"type":"object","required":["alliance_id","score"],"properties":{"alliance_id":{"type":"integer","format":"int32","title":"get_sovereignty_campaigns_alliance_id","description":"alliance_id integer"},"score":{"type":"number","format":"float","title":"get_sovereignty_campaigns_score","description":"score number"}},"title":"get_sovereignty_campaigns_participant","description":"participant object"},"title":"get_sovereignty_campaigns_participants"}},"title":"get_sovereignty_campaigns_200_ok","description":"200 ok object"},"title":"get_sovereignty_campaigns_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"operationId":"get_sovereignty_campaigns","x-cached-seconds":5,"x-alternate-versions":["dev","legacy","v1"]}},"/sovereignty/map/":{"get":{"description":"Shows sovereignty information for solar systems\n\n---\nAlternate route: `/dev/sovereignty/map/`\n\nAlternate route: `/legacy/sovereignty/map/`\n\nAlternate route: `/v1/sovereignty/map/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"List sovereignty of systems","tags":["Sovereignty"],"responses":{"200":{"description":"A list of sovereignty information for solar systems in New Eden","examples":{"application/json":[{"system_id":30045334,"faction_id":500001}]},"schema":{"type":"array","maxItems":10000,"items":{"type":"object","required":["system_id"],"properties":{"system_id":{"type":"integer","format":"int32","title":"get_sovereignty_map_system_id","description":"system_id integer"},"alliance_id":{"type":"integer","format":"int32","title":"get_sovereignty_map_alliance_id","description":"alliance_id integer"},"corporation_id":{"type":"integer","format":"int32","title":"get_sovereignty_map_corporation_id","description":"corporation_id integer"},"faction_id":{"type":"integer","format":"int32","title":"get_sovereignty_map_faction_id","description":"faction_id integer"}},"title":"get_sovereignty_map_200_ok","description":"200 ok object"},"title":"get_sovereignty_map_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"operationId":"get_sovereignty_map","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/status/":{"get":{"description":"EVE Server status\n\n---\nAlternate route: `/dev/status/`\n\nAlternate route: `/legacy/status/`\n\nAlternate route: `/v1/status/`\n\n---\nThis route is cached for up to 30 seconds","summary":"Retrieve the uptime and player counts","tags":["Status"],"responses":{"200":{"description":"Server status","examples":{"application/json":{"start_time":"2017-01-02T12:34:56Z","players":12345,"server_version":"1132976"}},"schema":{"type":"object","required":["start_time","players","server_version"],"properties":{"start_time":{"type":"string","format":"date-time","description":"Server start timestamp","title":"get_status_start_time"},"players":{"type":"integer","description":"Current online player count","title":"get_status_players"},"server_version":{"type":"string","description":"Running version as string","title":"get_status_server_version"},"vip":{"type":"boolean","description":"If the server is in VIP mode","title":"get_status_vip"}},"title":"get_status_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"operationId":"get_status","x-cached-seconds":30,"x-alternate-versions":["dev","legacy","v1"]}},"/universe/planets/{planet_id}/":{"get":{"description":"Get information on a planet\n\n---\nAlternate route: `/dev/universe/planets/{planet_id}/`\n\nAlternate route: `/legacy/universe/planets/{planet_id}/`\n\nAlternate route: `/v1/universe/planets/{planet_id}/`\n\n---\nThis route expires daily at 11:05","summary":"Get planet information","tags":["Universe"],"parameters":[{"$ref":"#/parameters/datasource"},{"name":"planet_id","in":"path","required":true,"type":"integer","format":"int32","description":"planet_id integer"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Information about a planet","examples":{"application/json":{"planet_id":40000046,"name":"Akpivem III","type_id":13,"position":{"x":-189226344497,"y":9901605317,"z":-254852632979},"system_id":30000003}},"schema":{"type":"object","required":["planet_id","name","type_id","position","system_id"],"properties":{"planet_id":{"type":"integer","format":"int32","title":"get_universe_planets_planet_id_planet_id","description":"planet_id integer"},"name":{"type":"string","title":"get_universe_planets_planet_id_name","description":"name string"},"type_id":{"type":"integer","format":"int32","title":"get_universe_planets_planet_id_type_id","description":"type_id integer"},"position":{"type":"object","required":["x","y","z"],"properties":{"x":{"type":"number","format":"double","title":"get_universe_planets_planet_id_x","description":"x number"},"y":{"type":"number","format":"double","title":"get_universe_planets_planet_id_y","description":"y number"},"z":{"type":"number","format":"double","title":"get_universe_planets_planet_id_z","description":"z number"}},"title":"get_universe_planets_planet_id_position","description":"position object"},"system_id":{"type":"integer","format":"int32","description":"The solar system this planet is in","title":"get_universe_planets_planet_id_system_id"}},"title":"get_universe_planets_planet_id_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"404":{"description":"Planet not found","schema":{"type":"object","title":"get_universe_planets_planet_id_not_found","description":"Not found","properties":{"error":{"type":"string","description":"Not found message","title":"get_universe_planets_planet_id_404_not_found"}}},"examples":{"application/json":{"error":"Not found message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_universe_planets_planet_id","x-alternate-versions":["dev","legacy","v1"]}},"/universe/stations/{station_id}/":{"get":{"description":"Get information on a station\n\n---\nAlternate route: `/dev/universe/stations/{station_id}/`\n\nAlternate route: `/v2/universe/stations/{station_id}/`\n\n---\nThis route is cached for up to 300 seconds","summary":"Get station information","tags":["Universe"],"parameters":[{"$ref":"#/parameters/datasource"},{"name":"station_id","in":"path","required":true,"type":"integer","format":"int32","description":"station_id integer"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Information about a station","examples":{"application/json":{"station_id":60000277,"name":"Jakanerva III - Moon 15 - Prompt Delivery Storage","type_id":1531,"position":{"x":165632286720,"y":2771804160,"z":-2455331266560},"system_id":30000148,"reprocessing_efficiency":0.5,"reprocessing_stations_take":0.05,"max_dockable_ship_volume":50000000,"office_rental_cost":10000,"services":["courier-missions","reprocessing-plant","market","repair-facilities","fitting","news","storage","insurance","docking","office-rental","loyalty-point-store","navy-offices"],"owner":1000003,"race_id":1}},"schema":{"type":"object","required":["station_id","name","type_id","position","system_id","reprocessing_efficiency","reprocessing_stations_take","max_dockable_ship_volume","office_rental_cost","services"],"properties":{"station_id":{"type":"integer","format":"int32","title":"get_universe_stations_station_id_station_id","description":"station_id integer"},"name":{"type":"string","title":"get_universe_stations_station_id_name","description":"name string"},"owner":{"type":"integer","format":"int32","description":"ID of the corporation that controls this station","title":"get_universe_stations_station_id_owner"},"type_id":{"type":"integer","format":"int32","title":"get_universe_stations_station_id_type_id","description":"type_id integer"},"race_id":{"type":"integer","format":"int32","title":"get_universe_stations_station_id_race_id","description":"race_id integer"},"position":{"type":"object","required":["x","y","z"],"properties":{"x":{"type":"number","format":"double","title":"get_universe_stations_station_id_x","description":"x number"},"y":{"type":"number","format":"double","title":"get_universe_stations_station_id_y","description":"y number"},"z":{"type":"number","format":"double","title":"get_universe_stations_station_id_z","description":"z number"}},"title":"get_universe_stations_station_id_position","description":"position object"},"system_id":{"type":"integer","format":"int32","description":"The solar system this station is in","title":"get_universe_stations_station_id_system_id"},"reprocessing_efficiency":{"type":"number","format":"float","title":"get_universe_stations_station_id_reprocessing_efficiency","description":"reprocessing_efficiency number"},"reprocessing_stations_take":{"type":"number","format":"float","title":"get_universe_stations_station_id_reprocessing_stations_take","description":"reprocessing_stations_take number"},"max_dockable_ship_volume":{"type":"number","format":"float","title":"get_universe_stations_station_id_max_dockable_ship_volume","description":"max_dockable_ship_volume number"},"office_rental_cost":{"type":"number","format":"float","title":"get_universe_stations_station_id_office_rental_cost","description":"office_rental_cost number"},"services":{"type":"array","maxItems":30,"items":{"type":"string","enum":["bounty-missions","assasination-missions","courier-missions","interbus","reprocessing-plant","refinery","market","black-market","stock-exchange","cloning","surgery","dna-therapy","repair-facilities","factory","labratory","gambling","fitting","paintshop","news","storage","insurance","docking","office-rental","jump-clone-facility","loyalty-point-store","navy-offices","security-offices"],"title":"get_universe_stations_station_id_service","description":"service string"},"title":"get_universe_stations_station_id_services","description":"services array"}},"title":"get_universe_stations_station_id_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"404":{"description":"Station not found","schema":{"type":"object","title":"get_universe_stations_station_id_not_found","description":"Not found","properties":{"error":{"type":"string","description":"Not found message","title":"get_universe_stations_station_id_404_not_found"}}},"examples":{"application/json":{"error":"Not found message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_universe_stations_station_id","x-cached-seconds":300,"x-alternate-versions":["dev","v2"]}},"/universe/structures/{structure_id}/":{"get":{"description":"Returns information on requested structure, if you are on the ACL. Otherwise, returns \"Forbidden\" for all inputs.\n\n---\nAlternate route: `/dev/universe/structures/{structure_id}/`\n\nAlternate route: `/legacy/universe/structures/{structure_id}/`\n\nAlternate route: `/v1/universe/structures/{structure_id}/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"Get structure information","tags":["Universe"],"parameters":[{"$ref":"#/parameters/datasource"},{"name":"structure_id","in":"path","description":"An Eve structure ID","required":true,"type":"integer","format":"int64"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Data about a structure","examples":{"application/json":{"name":"V-3YG7 VI - The Capital","solar_system_id":30000142}},"schema":{"type":"object","required":["name","solar_system_id"],"properties":{"name":{"type":"string","description":"The full name of the structure","title":"get_universe_structures_structure_id_name"},"solar_system_id":{"type":"integer","format":"int32","title":"get_universe_structures_structure_id_solar_system_id","description":"solar_system_id integer"},"type_id":{"type":"integer","format":"int32","title":"get_universe_structures_structure_id_type_id","description":"type_id integer"},"position":{"type":"object","description":"Coordinates of the structure in Cartesian space relative to the Sun, in metres.\n","required":["x","y","z"],"properties":{"x":{"type":"number","format":"double","title":"get_universe_structures_structure_id_x","description":"x number"},"y":{"type":"number","format":"double","title":"get_universe_structures_structure_id_y","description":"y number"},"z":{"type":"number","format":"double","title":"get_universe_structures_structure_id_z","description":"z number"}},"title":"get_universe_structures_structure_id_position"}},"title":"get_universe_structures_structure_id_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"404":{"description":"Structure not found","schema":{"type":"object","title":"get_universe_structures_structure_id_not_found","description":"Not found","properties":{"error":{"type":"string","description":"Not found message","title":"get_universe_structures_structure_id_404_not_found"}}},"examples":{"application/json":{"error":"Not found message"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-universe.read_structures.v1"]}],"operationId":"get_universe_structures_structure_id","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/universe/systems/{system_id}/":{"get":{"description":"Get information on a solar system\n\n---\nAlternate route: `/dev/universe/systems/{system_id}/`\n\nAlternate route: `/v3/universe/systems/{system_id}/`\n\n---\nThis route expires daily at 11:05","summary":"Get solar system information","tags":["Universe"],"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/language"},{"name":"system_id","in":"path","required":true,"type":"integer","format":"int32","description":"system_id integer"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Information about a solar system","examples":{"application/json":{"system_id":30000003,"name":"Akpivem","position":{"x":-91174141133075340,"y":43938227486247170,"z":-56482824383339900},"security_status":0.8462923765182495,"constellation_id":20000001,"planets":[{"planet_id":40000041,"moons":[40000042]},{"planet_id":40000043}],"stargates":[50000342],"star_id":40000040,"security_class":"B"}},"schema":{"type":"object","required":["star_id","system_id","name","position","security_status","constellation_id","planets"],"properties":{"star_id":{"type":"integer","format":"int32","title":"get_universe_systems_system_id_star_id","description":"star_id integer"},"system_id":{"type":"integer","format":"int32","title":"get_universe_systems_system_id_system_id","description":"system_id integer"},"name":{"type":"string","title":"get_universe_systems_system_id_name","description":"name string"},"position":{"type":"object","required":["x","y","z"],"properties":{"x":{"type":"number","format":"double","title":"get_universe_systems_system_id_x","description":"x number"},"y":{"type":"number","format":"double","title":"get_universe_systems_system_id_y","description":"y number"},"z":{"type":"number","format":"double","title":"get_universe_systems_system_id_z","description":"z number"}},"title":"get_universe_systems_system_id_position","description":"position object"},"security_status":{"type":"number","format":"float","title":"get_universe_systems_system_id_security_status","description":"security_status number"},"security_class":{"type":"string","title":"get_universe_systems_system_id_security_class","description":"security_class string"},"constellation_id":{"type":"integer","format":"int32","description":"The constellation this solar system is in","title":"get_universe_systems_system_id_constellation_id"},"planets":{"type":"array","maxItems":1000,"items":{"type":"object","required":["planet_id"],"properties":{"planet_id":{"type":"integer","format":"int32","title":"get_universe_systems_system_id_planet_id","description":"planet_id integer"},"moons":{"type":"array","maxItems":1000,"items":{"type":"integer","format":"int32","title":"get_universe_systems_system_id_moon","description":"moon integer"},"title":"get_universe_systems_system_id_moons","description":"moons array"}},"title":"get_universe_systems_system_id_planet","description":"planet object"},"title":"get_universe_systems_system_id_planets","description":"planets array"},"stargates":{"type":"array","maxItems":25,"items":{"type":"integer","format":"int32","title":"get_universe_systems_system_id_stargate","description":"stargate integer"},"title":"get_universe_systems_system_id_stargates","description":"stargates array"},"stations":{"type":"array","maxItems":25,"items":{"type":"integer","format":"int32","title":"get_universe_systems_system_id_station","description":"station integer"},"title":"get_universe_systems_system_id_stations","description":"stations array"}},"title":"get_universe_systems_system_id_ok","description":"200 ok object"},"headers":{"Content-Language":{"description":"The language used in the response","type":"string","enum":["de","en-us","fr","ja","ru","zh"]},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"404":{"description":"Solar system not found","schema":{"type":"object","title":"get_universe_systems_system_id_not_found","description":"Not found","properties":{"error":{"type":"string","description":"Not found message","title":"get_universe_systems_system_id_404_not_found"}}},"examples":{"application/json":{"error":"Not found message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_universe_systems_system_id","x-alternate-versions":["dev","v3"]}},"/universe/systems/":{"get":{"description":"Get a list of solar systems\n\n---\nAlternate route: `/dev/universe/systems/`\n\nAlternate route: `/legacy/universe/systems/`\n\nAlternate route: `/v1/universe/systems/`\n\n---\nThis route expires daily at 11:05","summary":"Get solar systems","tags":["Universe"],"responses":{"200":{"description":"A list of solar system ids","examples":{"application/json":[30000001,30000002]},"schema":{"type":"array","maxItems":10000,"items":{"type":"integer","format":"int32","title":"get_universe_systems_200_ok","description":"200 ok integer"},"title":"get_universe_systems_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"operationId":"get_universe_systems","x-alternate-versions":["dev","legacy","v1"]}},"/universe/types/{type_id}/":{"get":{"description":"Get information on a type\n\n---\nAlternate route: `/dev/universe/types/{type_id}/`\n\nAlternate route: `/v3/universe/types/{type_id}/`\n\n---\nThis route expires daily at 11:05","summary":"Get type information","tags":["Universe"],"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/language"},{"name":"type_id","in":"path","description":"An Eve item type ID","required":true,"type":"integer","format":"int32"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Information about a type","examples":{"application/json":{"type_id":587,"name":"Rifter","description":"The Rifter is a...","published":true,"group_id":25}},"schema":{"type":"object","required":["type_id","name","description","published","group_id"],"properties":{"type_id":{"type":"integer","format":"int32","title":"get_universe_types_type_id_type_id","description":"type_id integer"},"name":{"type":"string","title":"get_universe_types_type_id_name","description":"name string"},"description":{"type":"string","title":"get_universe_types_type_id_description","description":"description string"},"published":{"type":"boolean","title":"get_universe_types_type_id_published","description":"published boolean"},"group_id":{"type":"integer","format":"int32","title":"get_universe_types_type_id_group_id","description":"group_id integer"},"market_group_id":{"type":"integer","format":"int32","description":"This only exists for types that can be put on the market","title":"get_universe_types_type_id_market_group_id"},"radius":{"type":"number","format":"float","title":"get_universe_types_type_id_radius","description":"radius number"},"volume":{"type":"number","format":"float","title":"get_universe_types_type_id_volume","description":"volume number"},"packaged_volume":{"type":"number","format":"float","title":"get_universe_types_type_id_packaged_volume","description":"packaged_volume number"},"icon_id":{"type":"integer","format":"int32","title":"get_universe_types_type_id_icon_id","description":"icon_id integer"},"capacity":{"type":"number","format":"float","title":"get_universe_types_type_id_capacity","description":"capacity number"},"portion_size":{"type":"integer","format":"int32","title":"get_universe_types_type_id_portion_size","description":"portion_size integer"},"mass":{"type":"number","format":"float","title":"get_universe_types_type_id_mass","description":"mass number"},"graphic_id":{"type":"integer","format":"int32","title":"get_universe_types_type_id_graphic_id","description":"graphic_id integer"},"dogma_attributes":{"type":"array","maxItems":1000,"items":{"type":"object","required":["attribute_id","value"],"properties":{"attribute_id":{"type":"integer","format":"int32","title":"get_universe_types_type_id_attribute_id","description":"attribute_id integer"},"value":{"type":"number","format":"float","title":"get_universe_types_type_id_value","description":"value number"}},"title":"get_universe_types_type_id_dogma_attribute","description":"dogma_attribute object"},"title":"get_universe_types_type_id_dogma_attributes","description":"dogma_attributes array"},"dogma_effects":{"type":"array","maxItems":1000,"items":{"type":"object","required":["effect_id","is_default"],"properties":{"effect_id":{"type":"integer","format":"int32","title":"get_universe_types_type_id_effect_id","description":"effect_id integer"},"is_default":{"type":"boolean","title":"get_universe_types_type_id_is_default","description":"is_default boolean"}},"title":"get_universe_types_type_id_dogma_effect","description":"dogma_effect object"},"title":"get_universe_types_type_id_dogma_effects","description":"dogma_effects array"}},"title":"get_universe_types_type_id_ok","description":"200 ok object"},"headers":{"Content-Language":{"description":"The language used in the response","type":"string","enum":["de","en-us","fr","ja","ru","zh"]},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"404":{"description":"Type not found","schema":{"type":"object","title":"get_universe_types_type_id_not_found","description":"Not found","properties":{"error":{"type":"string","description":"Not found message","title":"get_universe_types_type_id_404_not_found"}}},"examples":{"application/json":{"error":"Not found message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_universe_types_type_id","x-alternate-versions":["dev","v3"]}},"/universe/types/":{"get":{"description":"Get a list of type ids\n\n---\nAlternate route: `/dev/universe/types/`\n\nAlternate route: `/legacy/universe/types/`\n\nAlternate route: `/v1/universe/types/`\n\n---\nThis route expires daily at 11:05","summary":"Get types","tags":["Universe"],"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/page"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of type ids","examples":{"application/json":[1,2,3]},"schema":{"type":"array","maxItems":1000,"items":{"type":"integer","format":"int32","title":"get_universe_types_200_ok","description":"200 ok integer"},"title":"get_universe_types_ok","description":"200 ok array"},"headers":{"X-Pages":{"description":"Maximum page number","type":"integer","format":"int32","default":1},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_universe_types","x-alternate-versions":["dev","legacy","v1"]}},"/universe/groups/":{"get":{"description":"Get a list of item groups\n\n---\nAlternate route: `/dev/universe/groups/`\n\nAlternate route: `/legacy/universe/groups/`\n\nAlternate route: `/v1/universe/groups/`\n\n---\nThis route expires daily at 11:05","summary":"Get item groups","tags":["Universe"],"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/page"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of item group ids","examples":{"application/json":[1,2,3]},"schema":{"type":"array","maxItems":1000,"items":{"type":"integer","format":"int32","title":"get_universe_groups_200_ok","description":"200 ok integer"},"title":"get_universe_groups_ok","description":"200 ok array"},"headers":{"X-Pages":{"description":"Maximum page number","type":"integer","format":"int32","default":1},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_universe_groups","x-alternate-versions":["dev","legacy","v1"]}},"/universe/groups/{group_id}/":{"get":{"description":"Get information on an item group\n\n---\nAlternate route: `/dev/universe/groups/{group_id}/`\n\nAlternate route: `/legacy/universe/groups/{group_id}/`\n\nAlternate route: `/v1/universe/groups/{group_id}/`\n\n---\nThis route expires daily at 11:05","summary":"Get item group information","tags":["Universe"],"parameters":[{"$ref":"#/parameters/datasource"},{"name":"group_id","in":"path","description":"An Eve item group ID","required":true,"type":"integer","format":"int32"},{"$ref":"#/parameters/language"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Information about an item group","examples":{"application/json":{"group_id":25,"name":"Frigate","published":true,"category_id":6,"types":[587,586,585]}},"schema":{"type":"object","required":["group_id","name","published","category_id","types"],"properties":{"group_id":{"type":"integer","format":"int32","title":"get_universe_groups_group_id_group_id","description":"group_id integer"},"name":{"type":"string","title":"get_universe_groups_group_id_name","description":"name string"},"published":{"type":"boolean","title":"get_universe_groups_group_id_published","description":"published boolean"},"category_id":{"type":"integer","format":"int32","title":"get_universe_groups_group_id_category_id","description":"category_id integer"},"types":{"type":"array","maxItems":10000,"items":{"type":"integer","format":"int32","title":"get_universe_groups_group_id_type","description":"type integer"},"title":"get_universe_groups_group_id_types","description":"types array"}},"title":"get_universe_groups_group_id_ok","description":"200 ok object"},"headers":{"Content-Language":{"description":"The language used in the response","type":"string","enum":["de","en-us","fr","ja","ru","zh"]},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"404":{"description":"Group not found","schema":{"type":"object","title":"get_universe_groups_group_id_not_found","description":"Not found","properties":{"error":{"type":"string","description":"Not found message","title":"get_universe_groups_group_id_404_not_found"}}},"examples":{"application/json":{"error":"Not found message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_universe_groups_group_id","x-alternate-versions":["dev","legacy","v1"]}},"/universe/categories/":{"get":{"description":"Get a list of item categories\n\n---\nAlternate route: `/dev/universe/categories/`\n\nAlternate route: `/legacy/universe/categories/`\n\nAlternate route: `/v1/universe/categories/`\n\n---\nThis route expires daily at 11:05","summary":"Get item categories","tags":["Universe"],"responses":{"200":{"description":"A list of item category ids","examples":{"application/json":[1,2,3]},"schema":{"type":"array","maxItems":10000,"items":{"type":"integer","format":"int32","title":"get_universe_categories_200_ok","description":"200 ok integer"},"title":"get_universe_categories_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"operationId":"get_universe_categories","x-alternate-versions":["dev","legacy","v1"]}},"/universe/categories/{category_id}/":{"get":{"description":"Get information of an item category\n\n---\nAlternate route: `/dev/universe/categories/{category_id}/`\n\nAlternate route: `/legacy/universe/categories/{category_id}/`\n\nAlternate route: `/v1/universe/categories/{category_id}/`\n\n---\nThis route expires daily at 11:05","summary":"Get item category information","tags":["Universe"],"parameters":[{"name":"category_id","in":"path","description":"An Eve item category ID","required":true,"type":"integer","format":"int32"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/language"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Information about an item category","examples":{"application/json":{"category_id":6,"name":"Ship","published":true,"groups":[25,26,27]}},"schema":{"type":"object","required":["category_id","name","published","groups"],"properties":{"category_id":{"type":"integer","format":"int32","title":"get_universe_categories_category_id_category_id","description":"category_id integer"},"name":{"type":"string","title":"get_universe_categories_category_id_name","description":"name string"},"published":{"type":"boolean","title":"get_universe_categories_category_id_published","description":"published boolean"},"groups":{"type":"array","maxItems":10000,"items":{"type":"integer","format":"int32","title":"get_universe_categories_category_id_group","description":"group integer"},"title":"get_universe_categories_category_id_groups","description":"groups array"}},"title":"get_universe_categories_category_id_ok","description":"200 ok object"},"headers":{"Content-Language":{"description":"The language used in the response","type":"string","enum":["de","en-us","fr","ja","ru","zh"]},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"404":{"description":"Category not found","schema":{"type":"object","title":"get_universe_categories_category_id_not_found","description":"Not found","properties":{"error":{"type":"string","description":"Not found message","title":"get_universe_categories_category_id_404_not_found"}}},"examples":{"application/json":{"error":"Not found message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_universe_categories_category_id","x-alternate-versions":["dev","legacy","v1"]}},"/universe/names/":{"post":{"description":"Resolve a set of IDs to names and categories. Supported ID's for resolving are: Characters, Corporations, Alliances, Stations, Solar Systems, Constellations, Regions, Types.\n\n---\nAlternate route: `/dev/universe/names/`\n\nAlternate route: `/v2/universe/names/`\n","summary":"Get names and categories for a set of ID's","tags":["Universe"],"parameters":[{"$ref":"#/parameters/datasource"},{"name":"ids","in":"body","description":"The ids to resolve","required":true,"schema":{"type":"array","minItems":1,"maxItems":1000,"uniqueItems":true,"items":{"type":"integer","format":"int32","title":"post_universe_names_id","description":"id integer"},"example":[95465499,30000142],"title":"post_universe_names_ids","description":"ids array"}},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"List of id/name associations for a set of ID's. All ID's must resolve to a name, or nothing will be returned.","examples":{"application/json":[{"id":95465499,"name":"CCP Bartender","category":"character"},{"id":30000142,"name":"Jita","category":"solar_system"}]},"schema":{"type":"array","maxItems":1000,"items":{"type":"object","required":["id","name","category"],"properties":{"id":{"type":"integer","format":"int32","title":"post_universe_names_id","description":"id integer"},"name":{"type":"string","title":"post_universe_names_name","description":"name string"},"category":{"type":"string","enum":["alliance","character","constellation","corporation","inventory_type","region","solar_system","station"],"title":"post_universe_names_category","description":"category string"}},"title":"post_universe_names_200_ok","description":"200 ok object"},"title":"post_universe_names_ok","description":"200 ok array"}},"404":{"description":"Ensure all IDs are valid before resolving.","schema":{"type":"object","title":"post_universe_names_not_found","description":"Not found","properties":{"error":{"type":"string","description":"Not found message","title":"post_universe_names_404_not_found"}}},"examples":{"application/json":{"error":"Not found message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"post_universe_names","x-alternate-versions":["dev","v2"]}},"/universe/structures/":{"get":{"description":"List all public structures\n\n---\nAlternate route: `/dev/universe/structures/`\n\nAlternate route: `/legacy/universe/structures/`\n\nAlternate route: `/v1/universe/structures/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"List all public structures","tags":["Universe"],"responses":{"200":{"description":"List of public structure IDs","examples":{"application/json":[1020988381992,1020988381991]},"schema":{"type":"array","maxItems":10000,"uniqueItems":true,"items":{"type":"integer","format":"int64","minimum":0,"title":"get_universe_structures_200_ok","description":"200 ok integer"},"title":"get_universe_structures_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"operationId":"get_universe_structures","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/universe/races/":{"get":{"description":"Get a list of character races\n\n---\nAlternate route: `/dev/universe/races/`\n\nAlternate route: `/legacy/universe/races/`\n\nAlternate route: `/v1/universe/races/`\n\n---\nThis route expires daily at 11:05","summary":"Get character races","tags":["Universe"],"responses":{"200":{"description":"A list of character races","examples":{"application/json":[{"race_id":1,"name":"Caldari","description":"Founded on the tenets of patriotism and hard work...","alliance_id":500001}]},"schema":{"type":"array","maxItems":4,"items":{"type":"object","required":["race_id","name","description","alliance_id"],"properties":{"race_id":{"type":"integer","format":"int32","title":"get_universe_races_race_id","description":"race_id integer"},"name":{"type":"string","title":"get_universe_races_name","description":"name string"},"description":{"type":"string","title":"get_universe_races_description","description":"description string"},"alliance_id":{"type":"integer","format":"int32","description":"The alliance generally associated with this race","title":"get_universe_races_alliance_id"}},"title":"get_universe_races_200_ok","description":"200 ok object"},"title":"get_universe_races_ok","description":"200 ok array"},"headers":{"Content-Language":{"description":"The language used in the response","type":"string","enum":["de","en-us","fr","ja","ru","zh"]},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/language"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"operationId":"get_universe_races","x-alternate-versions":["dev","legacy","v1"]}},"/universe/factions/":{"get":{"description":"Get a list of factions\n\n---\nAlternate route: `/dev/universe/factions/`\n\nAlternate route: `/v2/universe/factions/`\n\n---\nThis route expires daily at 11:05","summary":"Get factions","tags":["Universe"],"responses":{"200":{"description":"A list of factions","examples":{"application/json":[{"faction_id":1,"name":"Faction","description":"blah blah","solar_system_id":123,"corporation_id":456,"size_factor":1.0,"station_count":1000,"station_system_count":100,"is_unique":true}]},"schema":{"type":"array","maxItems":10000,"items":{"type":"object","required":["faction_id","name","description","size_factor","station_count","station_system_count","is_unique"],"properties":{"faction_id":{"type":"integer","format":"int32","title":"get_universe_factions_faction_id","description":"faction_id integer"},"name":{"type":"string","title":"get_universe_factions_name","description":"name string"},"description":{"type":"string","title":"get_universe_factions_description","description":"description string"},"solar_system_id":{"type":"integer","format":"int32","title":"get_universe_factions_solar_system_id","description":"solar_system_id integer"},"corporation_id":{"type":"integer","format":"int32","title":"get_universe_factions_corporation_id","description":"corporation_id integer"},"militia_corporation_id":{"type":"integer","format":"int32","title":"get_universe_factions_militia_corporation_id","description":"militia_corporation_id integer"},"size_factor":{"type":"number","format":"float","title":"get_universe_factions_size_factor","description":"size_factor number"},"station_count":{"type":"integer","format":"int32","title":"get_universe_factions_station_count","description":"station_count integer"},"station_system_count":{"type":"integer","format":"int32","title":"get_universe_factions_station_system_count","description":"station_system_count integer"},"is_unique":{"type":"boolean","title":"get_universe_factions_is_unique","description":"is_unique boolean"}},"title":"get_universe_factions_200_ok","description":"200 ok object"},"title":"get_universe_factions_ok","description":"200 ok array"},"headers":{"Content-Language":{"description":"The language used in the response","type":"string","enum":["de","en-us","fr","ja","ru","zh"]},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/language"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"operationId":"get_universe_factions","x-alternate-versions":["dev","v2"]}},"/universe/bloodlines/":{"get":{"description":"Get a list of bloodlines\n\n---\nAlternate route: `/dev/universe/bloodlines/`\n\nAlternate route: `/legacy/universe/bloodlines/`\n\nAlternate route: `/v1/universe/bloodlines/`\n\n---\nThis route expires daily at 11:05","summary":"Get bloodlines","tags":["Universe"],"responses":{"200":{"description":"A list of bloodlines","examples":{"application/json":[{"bloodline_id":1,"name":"Deteis","description":"The Deteis are regarded as ...","race_id":1,"ship_type_id":601,"corporation_id":1000006,"perception":5,"willpower":5,"charisma":6,"memory":7,"intelligence":7}]},"schema":{"type":"array","maxItems":100,"items":{"type":"object","required":["bloodline_id","name","description","race_id","ship_type_id","corporation_id","perception","willpower","charisma","memory","intelligence"],"properties":{"bloodline_id":{"type":"integer","format":"int32","title":"get_universe_bloodlines_bloodline_id","description":"bloodline_id integer"},"name":{"type":"string","title":"get_universe_bloodlines_name","description":"name string"},"description":{"type":"string","title":"get_universe_bloodlines_description","description":"description string"},"race_id":{"type":"integer","format":"int32","title":"get_universe_bloodlines_race_id","description":"race_id integer"},"ship_type_id":{"type":"integer","format":"int32","title":"get_universe_bloodlines_ship_type_id","description":"ship_type_id integer"},"corporation_id":{"type":"integer","format":"int32","title":"get_universe_bloodlines_corporation_id","description":"corporation_id integer"},"perception":{"type":"integer","format":"int32","title":"get_universe_bloodlines_perception","description":"perception integer"},"willpower":{"type":"integer","format":"int32","title":"get_universe_bloodlines_willpower","description":"willpower integer"},"charisma":{"type":"integer","format":"int32","title":"get_universe_bloodlines_charisma","description":"charisma integer"},"memory":{"type":"integer","format":"int32","title":"get_universe_bloodlines_memory","description":"memory integer"},"intelligence":{"type":"integer","format":"int32","title":"get_universe_bloodlines_intelligence","description":"intelligence integer"}},"title":"get_universe_bloodlines_200_ok","description":"200 ok object"},"title":"get_universe_bloodlines_ok","description":"200 ok array"},"headers":{"Content-Language":{"description":"The language used in the response","type":"string","enum":["de","en-us","fr","ja","ru","zh"]},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/language"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"operationId":"get_universe_bloodlines","x-alternate-versions":["dev","legacy","v1"]}},"/universe/regions/":{"get":{"description":"Get a list of regions\n\n---\nAlternate route: `/dev/universe/regions/`\n\nAlternate route: `/legacy/universe/regions/`\n\nAlternate route: `/v1/universe/regions/`\n\n---\nThis route expires daily at 11:05","summary":"Get regions","tags":["Universe"],"responses":{"200":{"description":"A list of region ids","examples":{"application/json":[11000001,11000002]},"schema":{"type":"array","maxItems":1000,"items":{"type":"integer","format":"int32","title":"get_universe_regions_200_ok","description":"200 ok integer"},"title":"get_universe_regions_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"operationId":"get_universe_regions","x-alternate-versions":["dev","legacy","v1"]}},"/universe/regions/{region_id}/":{"get":{"description":"Get information on a region\n\n---\nAlternate route: `/dev/universe/regions/{region_id}/`\n\nAlternate route: `/legacy/universe/regions/{region_id}/`\n\nAlternate route: `/v1/universe/regions/{region_id}/`\n\n---\nThis route expires daily at 11:05","summary":"Get region information","tags":["Universe"],"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/language"},{"name":"region_id","in":"path","required":true,"type":"integer","format":"int32","description":"region_id integer"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Information about a region","examples":{"application/json":{"region_id":10000042,"name":"Metropolis","description":"It has long been an established fact of civilization...","constellations":[20000302,20000303]}},"schema":{"type":"object","required":["region_id","name","constellations"],"properties":{"region_id":{"type":"integer","format":"int32","title":"get_universe_regions_region_id_region_id","description":"region_id integer"},"name":{"type":"string","title":"get_universe_regions_region_id_name","description":"name string"},"description":{"type":"string","title":"get_universe_regions_region_id_description","description":"description string"},"constellations":{"type":"array","maxItems":1000,"items":{"type":"integer","format":"int32","title":"get_universe_regions_region_id_constellation","description":"constellation integer"},"title":"get_universe_regions_region_id_constellations","description":"constellations array"}},"title":"get_universe_regions_region_id_ok","description":"200 ok object"},"headers":{"Content-Language":{"description":"The language used in the response","type":"string","enum":["de","en-us","fr","ja","ru","zh"]},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"404":{"description":"Region not found","schema":{"type":"object","title":"get_universe_regions_region_id_not_found","description":"Not found","properties":{"error":{"type":"string","description":"Not found message","title":"get_universe_regions_region_id_404_not_found"}}},"examples":{"application/json":{"error":"Not found message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_universe_regions_region_id","x-alternate-versions":["dev","legacy","v1"]}},"/universe/constellations/":{"get":{"description":"Get a list of constellations\n\n---\nAlternate route: `/dev/universe/constellations/`\n\nAlternate route: `/legacy/universe/constellations/`\n\nAlternate route: `/v1/universe/constellations/`\n\n---\nThis route expires daily at 11:05","summary":"Get constellations","tags":["Universe"],"responses":{"200":{"description":"A list of constellation ids","examples":{"application/json":[20000001,20000002]},"schema":{"type":"array","maxItems":10000,"items":{"type":"integer","format":"int32","title":"get_universe_constellations_200_ok","description":"200 ok integer"},"title":"get_universe_constellations_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"operationId":"get_universe_constellations","x-alternate-versions":["dev","legacy","v1"]}},"/universe/constellations/{constellation_id}/":{"get":{"description":"Get information on a constellation\n\n---\nAlternate route: `/dev/universe/constellations/{constellation_id}/`\n\nAlternate route: `/legacy/universe/constellations/{constellation_id}/`\n\nAlternate route: `/v1/universe/constellations/{constellation_id}/`\n\n---\nThis route expires daily at 11:05","summary":"Get constellation information","tags":["Universe"],"parameters":[{"name":"constellation_id","in":"path","required":true,"type":"integer","format":"int32","description":"constellation_id integer"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/language"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Information about a constellation","examples":{"application/json":{"constellation_id":20000009,"name":"Mekashtad","position":{"x":67796138757472320,"y":-70591121348560960,"z":-59587016159270070},"region_id":10000001,"systems":[20000302,20000303]}},"schema":{"type":"object","required":["constellation_id","name","position","region_id","systems"],"properties":{"constellation_id":{"type":"integer","format":"int32","title":"get_universe_constellations_constellation_id_constellation_id","description":"constellation_id integer"},"name":{"type":"string","title":"get_universe_constellations_constellation_id_name","description":"name string"},"position":{"type":"object","required":["x","y","z"],"properties":{"x":{"type":"number","format":"double","title":"get_universe_constellations_constellation_id_x","description":"x number"},"y":{"type":"number","format":"double","title":"get_universe_constellations_constellation_id_y","description":"y number"},"z":{"type":"number","format":"double","title":"get_universe_constellations_constellation_id_z","description":"z number"}},"title":"get_universe_constellations_constellation_id_position","description":"position object"},"region_id":{"type":"integer","format":"int32","description":"The region this constellation is in","title":"get_universe_constellations_constellation_id_region_id"},"systems":{"type":"array","maxItems":10000,"items":{"type":"integer","format":"int32","title":"get_universe_constellations_constellation_id_system","description":"system integer"},"title":"get_universe_constellations_constellation_id_systems","description":"systems array"}},"title":"get_universe_constellations_constellation_id_ok","description":"200 ok object"},"headers":{"Content-Language":{"description":"The language used in the response","type":"string","enum":["de","en-us","fr","ja","ru","zh"]},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"404":{"description":"Constellation not found","schema":{"type":"object","title":"get_universe_constellations_constellation_id_not_found","description":"Not found","properties":{"error":{"type":"string","description":"Not found message","title":"get_universe_constellations_constellation_id_404_not_found"}}},"examples":{"application/json":{"error":"Not found message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_universe_constellations_constellation_id","x-alternate-versions":["dev","legacy","v1"]}},"/universe/moons/{moon_id}/":{"get":{"description":"Get information on a moon\n\n---\nAlternate route: `/dev/universe/moons/{moon_id}/`\n\nAlternate route: `/legacy/universe/moons/{moon_id}/`\n\nAlternate route: `/v1/universe/moons/{moon_id}/`\n\n---\nThis route expires daily at 11:05","summary":"Get moon information","tags":["Universe"],"parameters":[{"$ref":"#/parameters/datasource"},{"name":"moon_id","in":"path","required":true,"type":"integer","format":"int32","description":"moon_id integer"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Information about a moon","examples":{"application/json":{"moon_id":40000042,"name":"Akpivem I - Moon 1","position":{"x":58605102008,"y":-3066616285,"z":-55193617920},"system_id":30000003}},"schema":{"type":"object","required":["moon_id","name","position","system_id"],"properties":{"moon_id":{"type":"integer","format":"int32","title":"get_universe_moons_moon_id_moon_id","description":"moon_id integer"},"name":{"type":"string","title":"get_universe_moons_moon_id_name","description":"name string"},"position":{"type":"object","required":["x","y","z"],"properties":{"x":{"type":"number","format":"double","title":"get_universe_moons_moon_id_x","description":"x number"},"y":{"type":"number","format":"double","title":"get_universe_moons_moon_id_y","description":"y number"},"z":{"type":"number","format":"double","title":"get_universe_moons_moon_id_z","description":"z number"}},"title":"get_universe_moons_moon_id_position","description":"position object"},"system_id":{"type":"integer","format":"int32","description":"The solar system this moon is in","title":"get_universe_moons_moon_id_system_id"}},"title":"get_universe_moons_moon_id_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"404":{"description":"Moon not found","schema":{"type":"object","title":"get_universe_moons_moon_id_not_found","description":"Not found","properties":{"error":{"type":"string","description":"Not found message","title":"get_universe_moons_moon_id_404_not_found"}}},"examples":{"application/json":{"error":"Not found message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_universe_moons_moon_id","x-alternate-versions":["dev","legacy","v1"]}},"/universe/stargates/{stargate_id}/":{"get":{"description":"Get information on a stargate\n\n---\nAlternate route: `/dev/universe/stargates/{stargate_id}/`\n\nAlternate route: `/legacy/universe/stargates/{stargate_id}/`\n\nAlternate route: `/v1/universe/stargates/{stargate_id}/`\n\n---\nThis route expires daily at 11:05","summary":"Get stargate information","tags":["Universe"],"parameters":[{"$ref":"#/parameters/datasource"},{"name":"stargate_id","in":"path","required":true,"type":"integer","format":"int32","description":"stargate_id integer"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Information about a stargate","examples":{"application/json":{"stargate_id":50000342,"name":"Stargate (Tanoo)","type_id":29624,"position":{"x":-101092761600,"y":5279539200,"z":1550503403520},"system_id":30000003,"destination":{"system_id":30000001,"stargate_id":50000056}}},"schema":{"type":"object","required":["stargate_id","name","type_id","position","system_id","destination"],"properties":{"stargate_id":{"type":"integer","format":"int32","title":"get_universe_stargates_stargate_id_stargate_id","description":"stargate_id integer"},"name":{"type":"string","title":"get_universe_stargates_stargate_id_name","description":"name string"},"type_id":{"type":"integer","format":"int32","title":"get_universe_stargates_stargate_id_type_id","description":"type_id integer"},"position":{"type":"object","required":["x","y","z"],"properties":{"x":{"type":"number","format":"double","title":"get_universe_stargates_stargate_id_x","description":"x number"},"y":{"type":"number","format":"double","title":"get_universe_stargates_stargate_id_y","description":"y number"},"z":{"type":"number","format":"double","title":"get_universe_stargates_stargate_id_z","description":"z number"}},"title":"get_universe_stargates_stargate_id_position","description":"position object"},"system_id":{"type":"integer","format":"int32","description":"The solar system this stargate is in","title":"get_universe_stargates_stargate_id_system_id"},"destination":{"type":"object","required":["system_id","stargate_id"],"properties":{"system_id":{"type":"integer","format":"int32","description":"The solar system this stargate connects to","title":"get_universe_stargates_stargate_id_system_id"},"stargate_id":{"type":"integer","format":"int32","description":"The stargate this stargate connects to","title":"get_universe_stargates_stargate_id_stargate_id"}},"title":"get_universe_stargates_stargate_id_destination","description":"destination object"}},"title":"get_universe_stargates_stargate_id_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"404":{"description":"Stargate not found","schema":{"type":"object","title":"get_universe_stargates_stargate_id_not_found","description":"Not found","properties":{"error":{"type":"string","description":"Not found message","title":"get_universe_stargates_stargate_id_404_not_found"}}},"examples":{"application/json":{"error":"Not found message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_universe_stargates_stargate_id","x-alternate-versions":["dev","legacy","v1"]}},"/universe/graphics/":{"get":{"description":"Get a list of graphics\n\n---\nAlternate route: `/dev/universe/graphics/`\n\nAlternate route: `/legacy/universe/graphics/`\n\nAlternate route: `/v1/universe/graphics/`\n\n---\nThis route expires daily at 11:05","summary":"Get graphics","tags":["Universe"],"responses":{"200":{"description":"A list of graphic ids","examples":{"application/json":[10,4106]},"schema":{"type":"array","maxItems":10000,"items":{"type":"integer","format":"int32","title":"get_universe_graphics_200_ok","description":"200 ok integer"},"title":"get_universe_graphics_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"operationId":"get_universe_graphics","x-alternate-versions":["dev","legacy","v1"]}},"/universe/graphics/{graphic_id}/":{"get":{"description":"Get information on a graphic\n\n---\nAlternate route: `/dev/universe/graphics/{graphic_id}/`\n\nAlternate route: `/legacy/universe/graphics/{graphic_id}/`\n\nAlternate route: `/v1/universe/graphics/{graphic_id}/`\n\n---\nThis route expires daily at 11:05","summary":"Get graphic information","tags":["Universe"],"parameters":[{"$ref":"#/parameters/datasource"},{"name":"graphic_id","in":"path","required":true,"type":"integer","format":"int32","description":"graphic_id integer"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Information about a graphic","examples":{"application/json":{"graphic_id":10,"graphic_file":"res:/dx9/model/worldobject/planet/moon.red"}},"schema":{"type":"object","required":["graphic_id"],"properties":{"graphic_id":{"type":"integer","format":"int32","title":"get_universe_graphics_graphic_id_graphic_id","description":"graphic_id integer"},"graphic_file":{"type":"string","title":"get_universe_graphics_graphic_id_graphic_file","description":"graphic_file string"},"sof_race_name":{"type":"string","title":"get_universe_graphics_graphic_id_sof_race_name","description":"sof_race_name string"},"sof_fation_name":{"type":"string","title":"get_universe_graphics_graphic_id_sof_fation_name","description":"sof_fation_name string"},"sof_dna":{"type":"string","title":"get_universe_graphics_graphic_id_sof_dna","description":"sof_dna string"},"sof_hull_name":{"type":"string","title":"get_universe_graphics_graphic_id_sof_hull_name","description":"sof_hull_name string"},"collision_file":{"type":"string","title":"get_universe_graphics_graphic_id_collision_file","description":"collision_file string"},"icon_folder":{"type":"string","title":"get_universe_graphics_graphic_id_icon_folder","description":"icon_folder string"}},"title":"get_universe_graphics_graphic_id_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"404":{"description":"Graphic not found","schema":{"type":"object","title":"get_universe_graphics_graphic_id_not_found","description":"Not found","properties":{"error":{"type":"string","description":"Not found message","title":"get_universe_graphics_graphic_id_404_not_found"}}},"examples":{"application/json":{"error":"Not found message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_universe_graphics_graphic_id","x-alternate-versions":["dev","legacy","v1"]}},"/universe/system_jumps/":{"get":{"description":"Get the number of jumps in solar systems within the last hour ending at the timestamp of the Last-Modified header, excluding wormhole space. Only systems with jumps will be listed\n\n---\nAlternate route: `/dev/universe/system_jumps/`\n\nAlternate route: `/legacy/universe/system_jumps/`\n\nAlternate route: `/v1/universe/system_jumps/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"Get system jumps","tags":["Universe"],"responses":{"200":{"description":"A list of systems and number of jumps","examples":{"application/json":[{"system_id":30002410,"ship_jumps":42}]},"schema":{"type":"array","maxItems":10000,"items":{"type":"object","required":["system_id","ship_jumps"],"properties":{"system_id":{"type":"integer","format":"int32","title":"get_universe_system_jumps_system_id","description":"system_id integer"},"ship_jumps":{"type":"integer","format":"int32","title":"get_universe_system_jumps_ship_jumps","description":"ship_jumps integer"}},"title":"get_universe_system_jumps_200_ok","description":"200 ok object"},"title":"get_universe_system_jumps_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"operationId":"get_universe_system_jumps","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/universe/system_kills/":{"get":{"description":"Get the number of ship, pod and NPC kills per solar system within the last hour ending at the timestamp of the Last-Modified header, excluding wormhole space. Only systems with kills will be listed\n\n---\nAlternate route: `/dev/universe/system_kills/`\n\nAlternate route: `/v2/universe/system_kills/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"Get system kills","tags":["Universe"],"responses":{"200":{"description":"A list of systems and number of ship, pod and NPC kills","examples":{"application/json":[{"system_id":30002410,"ship_kills":42,"npc_kills":0,"pod_kills":24}]},"schema":{"type":"array","maxItems":10000,"items":{"type":"object","required":["system_id","ship_kills","npc_kills","pod_kills"],"properties":{"system_id":{"type":"integer","format":"int32","title":"get_universe_system_kills_system_id","description":"system_id integer"},"ship_kills":{"type":"integer","format":"int32","description":"Number of player ships killed in this system","title":"get_universe_system_kills_ship_kills"},"npc_kills":{"type":"integer","format":"int32","description":"Number of NPC ships killed in this system","title":"get_universe_system_kills_npc_kills"},"pod_kills":{"type":"integer","format":"int32","description":"Number of pods killed in this system","title":"get_universe_system_kills_pod_kills"}},"title":"get_universe_system_kills_200_ok","description":"200 ok object"},"title":"get_universe_system_kills_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"operationId":"get_universe_system_kills","x-cached-seconds":3600,"x-alternate-versions":["dev","v2"]}},"/universe/stars/{star_id}/":{"get":{"description":"Get information on a star\n\n---\nAlternate route: `/dev/universe/stars/{star_id}/`\n\nAlternate route: `/legacy/universe/stars/{star_id}/`\n\nAlternate route: `/v1/universe/stars/{star_id}/`\n\n---\nThis route expires daily at 11:05","summary":"Get star information","tags":["Universe"],"parameters":[{"$ref":"#/parameters/datasource"},{"name":"star_id","in":"path","required":true,"type":"integer","format":"int32","description":"star_id integer"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Information about a star","examples":{"application/json":{"type_id":45033,"age":9398686722,"name":"BKG-Q2 - Star","luminosity":0.06615000218153,"radius":346600000,"spectral_class":"K2 V","temperature":3953,"solar_system_id":30004333}},"schema":{"type":"object","required":["name","type_id","age","luminosity","radius","spectral_class","temperature","solar_system_id"],"properties":{"name":{"type":"string","title":"get_universe_stars_star_id_name","description":"name string"},"solar_system_id":{"type":"integer","format":"int32","title":"get_universe_stars_star_id_solar_system_id","description":"solar_system_id integer"},"type_id":{"type":"integer","format":"int32","title":"get_universe_stars_star_id_type_id","description":"type_id integer"},"age":{"type":"integer","format":"int64","description":"Age of star in years","title":"get_universe_stars_star_id_age"},"luminosity":{"type":"number","format":"float","title":"get_universe_stars_star_id_luminosity","description":"luminosity number"},"radius":{"type":"integer","format":"int64","title":"get_universe_stars_star_id_radius","description":"radius integer"},"spectral_class":{"type":"string","enum":["K2 V","K4 V","G2 V","G8 V","M7 V","K7 V","M2 V","K5 V","M3 V","G0 V","G7 V","G3 V","F9 V","G5 V","F6 V","K8 V","K9 V","K6 V","G9 V","G6 V","G4 VI","G4 V","F8 V","F2 V","F1 V","K3 V","F0 VI","G1 VI","G0 VI","K1 V","M4 V","M1 V","M6 V","M0 V","K2 IV","G2 VI","K0 V","K5 IV","F5 VI","G6 VI","F6 VI","F2 IV","G3 VI","M8 V","F1 VI","K1 IV","F7 V","G5 VI","M5 V","G7 VI","F5 V","F4 VI","F8 VI","K3 IV","F4 IV","F0 V","G7 IV","G8 VI","F2 VI","F4 V","F7 VI","F3 V","G1 V","G9 VI","F3 IV","F9 VI","M9 V","K0 IV","F1 IV","G4 IV","F3 VI","K4 IV","G5 IV","G3 IV","G1 IV","K7 IV","G0 IV","K6 IV","K9 IV","G2 IV","F9 IV","F0 IV","K8 IV","G8 IV","F6 IV","F5 IV","A0","A0IV","A0IV2"],"title":"get_universe_stars_star_id_spectral_class","description":"spectral_class string"},"temperature":{"type":"integer","format":"int32","title":"get_universe_stars_star_id_temperature","description":"temperature integer"}},"title":"get_universe_stars_star_id_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_universe_stars_star_id","x-alternate-versions":["dev","legacy","v1"]}},"/universe/ids/":{"post":{"description":"Resolve a set of names to IDs in the following categories: agents, alliances, characters, constellations, corporations factions, inventory_types, regions, stations, and systems. Only exact matches will be returned. All names searched for are cached for 12 hours.\n\n---\nAlternate route: `/dev/universe/ids/`\n\nAlternate route: `/legacy/universe/ids/`\n\nAlternate route: `/v1/universe/ids/`\n","summary":"Bulk names to IDs","tags":["Universe"],"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/language"},{"name":"names","in":"body","description":"The names to resolve","required":true,"schema":{"type":"array","minItems":1,"maxItems":1000,"uniqueItems":true,"items":{"type":"string","minLength":1,"maxLength":100,"title":"post_universe_ids_name","description":"name string"},"example":["CCP Zoetrope"],"title":"post_universe_ids_names","description":"names array"}},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"List of id/name associations for a set of names divided by category. Any name passed in that did not have a match will be ommitted.","examples":{"application/json":{"characters":[{"id":95465499,"name":"CCP Bartender"},{"id":2112625428,"name":"CCP Zoetrope"}],"systems":[{"id":30000142,"name":"Jita"}]}},"schema":{"type":"object","properties":{"agents":{"type":"array","maxItems":1000,"items":{"type":"object","properties":{"id":{"type":"integer","format":"int32","title":"post_universe_ids_id","description":"id integer"},"name":{"type":"string","title":"post_universe_ids_name","description":"name string"}},"title":"post_universe_ids_agent","description":"agent object"},"title":"post_universe_ids_agents","description":"agents array"},"alliances":{"type":"array","maxItems":1000,"items":{"type":"object","properties":{"id":{"type":"integer","format":"int32","title":"post_universe_ids_id","description":"id integer"},"name":{"type":"string","title":"post_universe_ids_name","description":"name string"}},"title":"post_universe_ids_alliance","description":"alliance object"},"title":"post_universe_ids_alliances","description":"alliances array"},"characters":{"type":"array","maxItems":1000,"items":{"type":"object","properties":{"id":{"type":"integer","format":"int32","title":"post_universe_ids_id","description":"id integer"},"name":{"type":"string","title":"post_universe_ids_name","description":"name string"}},"title":"post_universe_ids_character","description":"character object"},"title":"post_universe_ids_characters","description":"characters array"},"constellations":{"type":"array","maxItems":1000,"items":{"type":"object","properties":{"id":{"type":"integer","format":"int32","title":"post_universe_ids_id","description":"id integer"},"name":{"type":"string","title":"post_universe_ids_name","description":"name string"}},"title":"post_universe_ids_constellation","description":"constellation object"},"title":"post_universe_ids_constellations","description":"constellations array"},"corporations":{"type":"array","maxItems":1000,"items":{"type":"object","properties":{"id":{"type":"integer","format":"int32","title":"post_universe_ids_id","description":"id integer"},"name":{"type":"string","title":"post_universe_ids_name","description":"name string"}},"title":"post_universe_ids_corporation","description":"corporation object"},"title":"post_universe_ids_corporations","description":"corporations array"},"factions":{"type":"array","maxItems":1000,"items":{"type":"object","properties":{"id":{"type":"integer","format":"int32","title":"post_universe_ids_id","description":"id integer"},"name":{"type":"string","title":"post_universe_ids_name","description":"name string"}},"title":"post_universe_ids_faction","description":"faction object"},"title":"post_universe_ids_factions","description":"factions array"},"inventory_types":{"type":"array","maxItems":1000,"items":{"type":"object","properties":{"id":{"type":"integer","format":"int32","title":"post_universe_ids_id","description":"id integer"},"name":{"type":"string","title":"post_universe_ids_name","description":"name string"}},"title":"post_universe_ids_inventory_type","description":"inventory_type object"},"title":"post_universe_ids_inventory_types","description":"inventory_types array"},"regions":{"type":"array","maxItems":1000,"items":{"type":"object","properties":{"id":{"type":"integer","format":"int32","title":"post_universe_ids_id","description":"id integer"},"name":{"type":"string","title":"post_universe_ids_name","description":"name string"}},"title":"post_universe_ids_region","description":"region object"},"title":"post_universe_ids_regions","description":"regions array"},"systems":{"type":"array","maxItems":1000,"items":{"type":"object","properties":{"id":{"type":"integer","format":"int32","title":"post_universe_ids_id","description":"id integer"},"name":{"type":"string","title":"post_universe_ids_name","description":"name string"}},"title":"post_universe_ids_system","description":"system object"},"title":"post_universe_ids_systems","description":"systems array"},"stations":{"type":"array","maxItems":1000,"items":{"type":"object","properties":{"id":{"type":"integer","format":"int32","title":"post_universe_ids_id","description":"id integer"},"name":{"type":"string","title":"post_universe_ids_name","description":"name string"}},"title":"post_universe_ids_station","description":"station object"},"title":"post_universe_ids_stations","description":"stations array"}},"title":"post_universe_ids_ok","description":"200 ok object"},"headers":{"Content-Language":{"description":"The language used in the response","type":"string","enum":["de","en-us","fr","ja","ru","zh"]}}},"503":{"description":"Search backend is unreachable, try again later.","schema":{"type":"object","title":"post_universe_ids_service_unavailable","description":"Service unavailable","properties":{"error":{"type":"string","description":"Service unavailable message","title":"post_universe_ids_503_service_unavailable"}}},"examples":{"application/json":{"error":"Service unavailable message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"post_universe_ids","x-alternate-versions":["dev","legacy","v1"]}},"/ui/openwindow/marketdetails/":{"post":{"description":"Open the market details window for a specific typeID inside the client\n\n---\nAlternate route: `/dev/ui/openwindow/marketdetails/`\n\nAlternate route: `/legacy/ui/openwindow/marketdetails/`\n\nAlternate route: `/v1/ui/openwindow/marketdetails/`\n","summary":"Open Market Details","tags":["User Interface"],"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"name":"type_id","in":"query","description":"The item type to open in market window","required":true,"type":"integer","format":"int32"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"204":{"description":"Open window request received"},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-ui.open_window.v1"]}],"operationId":"post_ui_openwindow_marketdetails","x-alternate-versions":["dev","legacy","v1"]}},"/ui/openwindow/contract/":{"post":{"description":"Open the contract window inside the client\n\n---\nAlternate route: `/dev/ui/openwindow/contract/`\n\nAlternate route: `/legacy/ui/openwindow/contract/`\n\nAlternate route: `/v1/ui/openwindow/contract/`\n","summary":"Open Contract Window","tags":["User Interface"],"parameters":[{"name":"contract_id","in":"query","description":"The contract to open","required":true,"type":"integer","format":"int32"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"204":{"description":"Open window request received"},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-ui.open_window.v1"]}],"operationId":"post_ui_openwindow_contract","x-alternate-versions":["dev","legacy","v1"]}},"/ui/openwindow/information/":{"post":{"description":"Open the information window for a character, corporation or alliance inside the client\n\n---\nAlternate route: `/dev/ui/openwindow/information/`\n\nAlternate route: `/legacy/ui/openwindow/information/`\n\nAlternate route: `/v1/ui/openwindow/information/`\n","summary":"Open Information Window","tags":["User Interface"],"parameters":[{"$ref":"#/parameters/datasource"},{"name":"target_id","in":"query","description":"The target to open","required":true,"type":"integer","format":"int32"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"204":{"description":"Open window request received"},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-ui.open_window.v1"]}],"operationId":"post_ui_openwindow_information","x-alternate-versions":["dev","legacy","v1"]}},"/ui/autopilot/waypoint/":{"post":{"description":"Set a solar system as autopilot waypoint\n\n---\nAlternate route: `/dev/ui/autopilot/waypoint/`\n\nAlternate route: `/v2/ui/autopilot/waypoint/`\n","summary":"Set Autopilot Waypoint","tags":["User Interface"],"parameters":[{"name":"add_to_beginning","in":"query","description":"Whether this solar system should be added to the beginning of all waypoints","required":true,"type":"boolean","default":false},{"name":"clear_other_waypoints","in":"query","description":"Whether clean other waypoints beforing adding this one","required":true,"type":"boolean","default":false},{"$ref":"#/parameters/datasource"},{"name":"destination_id","in":"query","description":"The destination to travel to, can be solar system, station or structure's id","required":true,"type":"integer","format":"int64"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"204":{"description":"Open window request received"},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-ui.write_waypoint.v1"]}],"operationId":"post_ui_autopilot_waypoint","x-alternate-versions":["dev","v2"]}},"/ui/openwindow/newmail/":{"post":{"description":"Open the New Mail window, according to settings from the request if applicable\n\n---\nAlternate route: `/dev/ui/openwindow/newmail/`\n\nAlternate route: `/legacy/ui/openwindow/newmail/`\n\nAlternate route: `/v1/ui/openwindow/newmail/`\n","summary":"Open New Mail Window","tags":["User Interface"],"parameters":[{"$ref":"#/parameters/datasource"},{"name":"new_mail","in":"body","description":"The details of mail to create","required":true,"schema":{"type":"object","required":["subject","body","recipients"],"properties":{"subject":{"type":"string","maxLength":1000,"title":"post_ui_openwindow_newmail_subject","description":"subject string"},"body":{"type":"string","maxLength":10000,"title":"post_ui_openwindow_newmail_body","description":"body string"},"recipients":{"type":"array","minItems":1,"maxItems":50,"items":{"type":"integer","format":"int32","title":"post_ui_openwindow_newmail_recipient","description":"recipient integer"},"title":"post_ui_openwindow_newmail_recipients","description":"recipients array"},"to_mailing_list_id":{"type":"integer","format":"int32","description":"Corporations, alliances and mailing lists are all types of mailing groups. You may only send to one mailing group, at a time, so you may fill out either this field or the to_corp_or_alliance_ids field","title":"post_ui_openwindow_newmail_to_mailing_list_id"},"to_corp_or_alliance_id":{"type":"integer","format":"int32","title":"post_ui_openwindow_newmail_to_corp_or_alliance_id","description":"to_corp_or_alliance_id integer"}},"title":"post_ui_openwindow_newmail_new_mail","description":"new_mail object"}},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"204":{"description":"Open window request received"},"422":{"description":"Invalid request","schema":{"type":"object","title":"post_ui_openwindow_newmail_unprocessable_entity","description":"Unprocessable entity","properties":{"error":{"type":"string","description":"Unprocessable entity message","title":"post_ui_openwindow_newmail_422_unprocessable_entity"}}},"examples":{"application/json":{"error":"Unprocessable entity message"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-ui.open_window.v1"]}],"operationId":"post_ui_openwindow_newmail","x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/wallet/":{"get":{"summary":"Get a character's wallet balance","description":"Returns a character's wallet balance\n\n---\nAlternate route: `/dev/characters/{character_id}/wallet/`\n\nAlternate route: `/legacy/characters/{character_id}/wallet/`\n\nAlternate route: `/v1/characters/{character_id}/wallet/`\n\n---\nThis route is cached for up to 120 seconds","tags":["Wallet"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Wallet balance","examples":{"application/json":29500.01},"schema":{"type":"number","format":"double","description":"Wallet balance","title":"get_characters_character_id_wallet_ok"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}}},"security":[{"evesso":["esi-wallet.read_character_wallet.v1"]}],"operationId":"get_characters_character_id_wallet","x-cached-seconds":120,"x-alternate-versions":["dev","legacy","v1"]}},"/characters/{character_id}/wallet/journal/":{"get":{"description":"Retrieve character wallet journal\n\n---\nAlternate route: `/v2/characters/{character_id}/wallet/journal/`\n\n---\nThis route is cached for up to 3600 seconds\n\n---\n[This route has an available update](https://esi.tech.ccp.is/diff/latest/dev/#GET-/characters/{character_id}/wallet/journal/)","summary":"Get character wallet journal","tags":["Wallet"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"name":"from_id","in":"query","description":"Only show journal entries happened before the transaction referenced by this id","required":false,"type":"integer","format":"int64"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Journal entries","examples":{"application/json":[{"date":"2016-10-24T09:00:00Z","ref_id":1234567890,"ref_type":"player_trading"}]},"schema":{"type":"array","description":"Journal entries","maxItems":2500,"items":{"type":"object","required":["date","ref_id","ref_type"],"properties":{"date":{"type":"string","format":"date-time","description":"Date and time of transaction","title":"get_characters_character_id_wallet_journal_date"},"ref_id":{"type":"integer","format":"int64","description":"Unique journal reference ID","title":"get_characters_character_id_wallet_journal_ref_id"},"ref_type":{"type":"string","description":"Transaction type, different type of transaction will populate different fields in `extra_info` Note: If you have an existing XML API application that is using ref_types, you will need to know which string ESI ref_type maps to which integer. You can use the following gist to see string->int mappings: https://gist.github.com/ccp-zoetrope/c03db66d90c2148724c06171bc52e0ec","enum":["acceleration_gate_fee","advertisement_listing_fee","agent_donation","agent_location_services","agent_miscellaneous","agent_mission_collateral_paid","agent_mission_collateral_refunded","agent_mission_reward","agent_mission_reward_corporation_tax","agent_mission_time_bonus_reward","agent_mission_time_bonus_reward_corporation_tax","agent_security_services","agent_services_rendered","agents_preward","alliance_maintainance_fee","alliance_registration_fee","asset_safety_recovery_tax","bounty","bounty_prize","bounty_prize_corporation_tax","bounty_prizes","bounty_reimbursement","bounty_surcharge","brokers_fee","clone_activation","clone_transfer","contraband_fine","contract_auction_bid","contract_auction_bid_corp","contract_auction_bid_refund","contract_auction_sold","contract_brokers_fee","contract_brokers_fee_corp","contract_collateral","contract_collateral_deposited_corp","contract_collateral_payout","contract_collateral_refund","contract_deposit","contract_deposit_corp","contract_deposit_refund","contract_deposit_sales_tax","contract_price","contract_price_payment_corp","contract_reversal","contract_reward","contract_reward_deposited","contract_reward_deposited_corp","contract_reward_refund","contract_sales_tax","copying","corporate_reward_payout","corporate_reward_tax","corporation_account_withdrawal","corporation_bulk_payment","corporation_dividend_payment","corporation_liquidation","corporation_logo_change_cost","corporation_payment","corporation_registration_fee","courier_mission_escrow","cspa","cspaofflinerefund","datacore_fee","dna_modification_fee","docking_fee","duel_wager_escrow","duel_wager_payment","duel_wager_refund","factory_slot_rental_fee","gm_cash_transfer","industry_job_tax","infrastructure_hub_maintenance","inheritance","insurance","jump_clone_activation_fee","jump_clone_installation_fee","kill_right_fee","lp_store","manufacturing","market_escrow","market_fine_paid","market_transaction","medal_creation","medal_issued","mission_completion","mission_cost","mission_expiration","mission_reward","office_rental_fee","operation_bonus","opportunity_reward","planetary_construction","planetary_export_tax","planetary_import_tax","player_donation","player_trading","project_discovery_reward","project_discovery_tax","reaction","release_of_impounded_property","repair_bill","reprocessing_tax","researching_material_productivity","researching_technology","researching_time_productivity","resource_wars_reward","reverse_engineering","security_processing_fee","shares","sovereignity_bill","store_purchase","store_purchase_refund","transaction_tax","upkeep_adjustment_fee","war_ally_contract","war_fee","war_fee_surrender"],"title":"get_characters_character_id_wallet_journal_ref_type"},"first_party_id":{"type":"integer","format":"int32","title":"get_characters_character_id_wallet_journal_first_party_id","description":"first_party_id integer"},"first_party_type":{"type":"string","enum":["character","corporation","alliance","faction","system"],"title":"get_characters_character_id_wallet_journal_first_party_type","description":"first_party_type string"},"second_party_id":{"type":"integer","format":"int32","title":"get_characters_character_id_wallet_journal_second_party_id","description":"second_party_id integer"},"second_party_type":{"type":"string","enum":["character","corporation","alliance","faction","system"],"title":"get_characters_character_id_wallet_journal_second_party_type","description":"second_party_type string"},"amount":{"type":"number","format":"double","description":"Transaction amount. Positive when value transferred to the first party. Negative otherwise","title":"get_characters_character_id_wallet_journal_amount"},"balance":{"type":"number","format":"double","description":"Wallet balance after transaction occurred","title":"get_characters_character_id_wallet_journal_balance"},"reason":{"type":"string","title":"get_characters_character_id_wallet_journal_reason","description":"reason string"},"tax_reciever_id":{"type":"integer","format":"int32","description":"the corporation ID receiving any tax paid","title":"get_characters_character_id_wallet_journal_tax_reciever_id"},"tax":{"type":"number","format":"double","description":"Tax amount received for tax related transactions","title":"get_characters_character_id_wallet_journal_tax"},"extra_info":{"type":"object","description":"Extra information for different type of transaction","properties":{"location_id":{"type":"integer","format":"int64","title":"get_characters_character_id_wallet_journal_location_id","description":"location_id integer"},"transaction_id":{"type":"integer","format":"int64","title":"get_characters_character_id_wallet_journal_transaction_id","description":"transaction_id integer"},"npc_name":{"type":"string","title":"get_characters_character_id_wallet_journal_npc_name","description":"npc_name string"},"npc_id":{"type":"integer","format":"int32","title":"get_characters_character_id_wallet_journal_npc_id","description":"npc_id integer"},"destroyed_ship_type_id":{"type":"integer","format":"int32","title":"get_characters_character_id_wallet_journal_destroyed_ship_type_id","description":"destroyed_ship_type_id integer"},"character_id":{"type":"integer","format":"int32","title":"get_characters_character_id_wallet_journal_character_id","description":"character_id integer"},"corporation_id":{"type":"integer","format":"int32","title":"get_characters_character_id_wallet_journal_corporation_id","description":"corporation_id integer"},"alliance_id":{"type":"integer","format":"int32","title":"get_characters_character_id_wallet_journal_alliance_id","description":"alliance_id integer"},"job_id":{"type":"integer","format":"int32","title":"get_characters_character_id_wallet_journal_job_id","description":"job_id integer"},"contract_id":{"type":"integer","format":"int32","title":"get_characters_character_id_wallet_journal_contract_id","description":"contract_id integer"},"system_id":{"type":"integer","format":"int32","title":"get_characters_character_id_wallet_journal_system_id","description":"system_id integer"},"planet_id":{"type":"integer","format":"int32","title":"get_characters_character_id_wallet_journal_planet_id","description":"planet_id integer"}},"title":"get_characters_character_id_wallet_journal_extra_info"}},"title":"get_characters_character_id_wallet_journal_200_ok","description":"200 ok object"},"title":"get_characters_character_id_wallet_journal_ok"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-wallet.read_character_wallet.v1"]}],"operationId":"get_characters_character_id_wallet_journal","x-cached-seconds":3600,"x-alternate-versions":["v2"]}},"/characters/{character_id}/wallet/transactions/":{"get":{"description":"Get wallet transactions of a character\n\n---\nAlternate route: `/dev/characters/{character_id}/wallet/transactions/`\n\nAlternate route: `/legacy/characters/{character_id}/wallet/transactions/`\n\nAlternate route: `/v1/characters/{character_id}/wallet/transactions/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"Get wallet transactions","tags":["Wallet"],"parameters":[{"$ref":"#/parameters/character_id"},{"$ref":"#/parameters/datasource"},{"name":"from_id","in":"query","description":"Only show transactions happened before the one referenced by this id","required":false,"type":"integer","format":"int64"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Wallet transactions","examples":{"application/json":[{"transaction_id":1234567890,"date":"2016-10-24T09:00:00Z","location_id":60014719,"type_id":587,"unit_price":1,"quantity":1,"client_id":54321,"is_buy":true,"is_personal":true,"journal_ref_id":67890}]},"schema":{"type":"array","description":"Wallet transactions","maxItems":2500,"items":{"type":"object","description":"wallet transaction","required":["transaction_id","date","location_id","type_id","unit_price","quantity","client_id","is_buy","is_personal","journal_ref_id"],"properties":{"transaction_id":{"type":"integer","format":"int64","description":"Unique transaction ID","title":"get_characters_character_id_wallet_transactions_transaction_id"},"date":{"type":"string","format":"date-time","description":"Date and time of transaction","title":"get_characters_character_id_wallet_transactions_date"},"type_id":{"type":"integer","format":"int32","title":"get_characters_character_id_wallet_transactions_type_id","description":"type_id integer"},"location_id":{"type":"integer","format":"int64","title":"get_characters_character_id_wallet_transactions_location_id","description":"location_id integer"},"unit_price":{"type":"number","format":"double","description":"Amount paid per unit","title":"get_characters_character_id_wallet_transactions_unit_price"},"quantity":{"type":"integer","format":"int32","title":"get_characters_character_id_wallet_transactions_quantity","description":"quantity integer"},"client_id":{"type":"integer","format":"int32","title":"get_characters_character_id_wallet_transactions_client_id","description":"client_id integer"},"is_buy":{"type":"boolean","title":"get_characters_character_id_wallet_transactions_is_buy","description":"is_buy boolean"},"is_personal":{"type":"boolean","title":"get_characters_character_id_wallet_transactions_is_personal","description":"is_personal boolean"},"journal_ref_id":{"type":"integer","format":"int64","title":"get_characters_character_id_wallet_transactions_journal_ref_id","description":"journal_ref_id integer"}},"title":"get_characters_character_id_wallet_transactions_200_ok"},"title":"get_characters_character_id_wallet_transactions_ok"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"security":[{"evesso":["esi-wallet.read_character_wallet.v1"]}],"operationId":"get_characters_character_id_wallet_transactions","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/corporations/{corporation_id}/wallets/":{"get":{"description":"Get a corporation's wallets\n\n---\nAlternate route: `/dev/corporations/{corporation_id}/wallets/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/wallets/`\n\nAlternate route: `/v1/corporations/{corporation_id}/wallets/`\n\n---\nThis route is cached for up to 300 seconds\n\n---\nRequires one of the following EVE corporation role(s): Accountant, Junior_Accountant\n","summary":"Returns a corporation's wallet balance","tags":["Wallet"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"List of corporation wallets","examples":{"application/json":[{"division":1,"balance":123.45},{"division":2,"balance":123.45},{"division":3,"balance":123.45},{"division":4,"balance":123.45},{"division":5,"balance":123.45},{"division":6,"balance":123.45},{"division":7,"balance":123.45}]},"schema":{"type":"array","maxItems":7,"items":{"type":"object","required":["division","balance"],"properties":{"division":{"type":"integer","format":"int32","minimum":1,"maximum":7,"title":"get_corporations_corporation_id_wallets_division","description":"division integer"},"balance":{"type":"number","format":"double","title":"get_corporations_corporation_id_wallets_balance","description":"balance number"}},"title":"get_corporations_corporation_id_wallets_200_ok","description":"200 ok object"},"title":"get_corporations_corporation_id_wallets_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"x-required-roles":["Accountant","Junior_Accountant"],"security":[{"evesso":["esi-wallet.read_corporation_wallets.v1"]}],"operationId":"get_corporations_corporation_id_wallets","x-cached-seconds":300,"x-alternate-versions":["dev","legacy","v1"]}},"/corporations/{corporation_id}/wallets/{division}/journal/":{"get":{"description":"Retrieve corporation wallet journal\n\n---\nAlternate route: `/legacy/corporations/{corporation_id}/wallets/{division}/journal/`\n\nAlternate route: `/v1/corporations/{corporation_id}/wallets/{division}/journal/`\n\n---\nThis route is cached for up to 3600 seconds\n\n---\nRequires one of the following EVE corporation role(s): Accountant, Junior_Accountant\n\n\n---\n[This route has an available update](https://esi.tech.ccp.is/diff/latest/dev/#GET-/corporations/{corporation_id}/wallets/{division}/journal/)","summary":"Get corporation wallet journal","tags":["Wallet"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"name":"division","in":"path","description":"Wallet key of the division to fetch journals from","required":true,"type":"integer","format":"int32","minimum":1,"maximum":7},{"name":"from_id","in":"query","description":"Only show journal entries happened before the transaction referenced by this id","required":false,"type":"integer","format":"int64"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Journal entries","examples":{"application/json":[{"date":"2016-10-24T09:00:00Z","ref_id":1234567890,"ref_type":"player_trading"}]},"schema":{"type":"array","description":"Journal entries","maxItems":2500,"items":{"type":"object","required":["date","ref_id","ref_type"],"properties":{"date":{"type":"string","format":"date-time","description":"Date and time of transaction","title":"get_corporations_corporation_id_wallets_division_journal_date"},"ref_id":{"type":"integer","format":"int64","description":"Unique journal reference ID","title":"get_corporations_corporation_id_wallets_division_journal_ref_id"},"ref_type":{"type":"string","description":"Transaction type, different type of transaction will populate different fields in `extra_info` Note: If you have an existing XML API application that is using ref_types, you will need to know which string ESI ref_type maps to which integer. You can use the following gist to see string->int mappings: https://gist.github.com/ccp-zoetrope/c03db66d90c2148724c06171bc52e0ec","enum":["acceleration_gate_fee","advertisement_listing_fee","agent_donation","agent_location_services","agent_miscellaneous","agent_mission_collateral_paid","agent_mission_collateral_refunded","agent_mission_reward","agent_mission_reward_corporation_tax","agent_mission_time_bonus_reward","agent_mission_time_bonus_reward_corporation_tax","agent_security_services","agent_services_rendered","agents_preward","alliance_maintainance_fee","alliance_registration_fee","asset_safety_recovery_tax","bounty","bounty_prize","bounty_prize_corporation_tax","bounty_prizes","bounty_reimbursement","bounty_surcharge","brokers_fee","clone_activation","clone_transfer","contraband_fine","contract_auction_bid","contract_auction_bid_corp","contract_auction_bid_refund","contract_auction_sold","contract_brokers_fee","contract_brokers_fee_corp","contract_collateral","contract_collateral_deposited_corp","contract_collateral_payout","contract_collateral_refund","contract_deposit","contract_deposit_corp","contract_deposit_refund","contract_deposit_sales_tax","contract_price","contract_price_payment_corp","contract_reversal","contract_reward","contract_reward_deposited","contract_reward_deposited_corp","contract_reward_refund","contract_sales_tax","copying","corporate_reward_payout","corporate_reward_tax","corporation_account_withdrawal","corporation_bulk_payment","corporation_dividend_payment","corporation_liquidation","corporation_logo_change_cost","corporation_payment","corporation_registration_fee","courier_mission_escrow","cspa","cspaofflinerefund","datacore_fee","dna_modification_fee","docking_fee","duel_wager_escrow","duel_wager_payment","duel_wager_refund","factory_slot_rental_fee","gm_cash_transfer","industry_job_tax","infrastructure_hub_maintenance","inheritance","insurance","jump_clone_activation_fee","jump_clone_installation_fee","kill_right_fee","lp_store","manufacturing","market_escrow","market_fine_paid","market_transaction","medal_creation","medal_issued","mission_completion","mission_cost","mission_expiration","mission_reward","office_rental_fee","operation_bonus","opportunity_reward","planetary_construction","planetary_export_tax","planetary_import_tax","player_donation","player_trading","project_discovery_reward","project_discovery_tax","reaction","release_of_impounded_property","repair_bill","reprocessing_tax","researching_material_productivity","researching_technology","researching_time_productivity","resource_wars_reward","reverse_engineering","security_processing_fee","shares","sovereignity_bill","store_purchase","store_purchase_refund","transaction_tax","upkeep_adjustment_fee","war_ally_contract","war_fee","war_fee_surrender"],"title":"get_corporations_corporation_id_wallets_division_journal_ref_type"},"first_party_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_wallets_division_journal_first_party_id","description":"first_party_id integer"},"first_party_type":{"type":"string","enum":["character","corporation","alliance","faction","system"],"title":"get_corporations_corporation_id_wallets_division_journal_first_party_type","description":"first_party_type string"},"second_party_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_wallets_division_journal_second_party_id","description":"second_party_id integer"},"second_party_type":{"type":"string","enum":["character","corporation","alliance","faction","system"],"title":"get_corporations_corporation_id_wallets_division_journal_second_party_type","description":"second_party_type string"},"amount":{"type":"number","format":"double","description":"Transaction amount. Positive when value transferred to the first party. Negative otherwise","title":"get_corporations_corporation_id_wallets_division_journal_amount"},"balance":{"type":"number","format":"double","description":"Wallet balance after transaction occurred","title":"get_corporations_corporation_id_wallets_division_journal_balance"},"reason":{"type":"string","title":"get_corporations_corporation_id_wallets_division_journal_reason","description":"reason string"},"tax_reciever_id":{"type":"integer","format":"int32","description":"the corporation ID receiving any tax paid","title":"get_corporations_corporation_id_wallets_division_journal_tax_reciever_id"},"tax":{"type":"number","format":"double","description":"Tax amount received for tax related transactions","title":"get_corporations_corporation_id_wallets_division_journal_tax"},"extra_info":{"type":"object","description":"Extra information for different type of transaction","properties":{"location_id":{"type":"integer","format":"int64","title":"get_corporations_corporation_id_wallets_division_journal_location_id","description":"location_id integer"},"transaction_id":{"type":"integer","format":"int64","title":"get_corporations_corporation_id_wallets_division_journal_transaction_id","description":"transaction_id integer"},"npc_name":{"type":"string","title":"get_corporations_corporation_id_wallets_division_journal_npc_name","description":"npc_name string"},"npc_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_wallets_division_journal_npc_id","description":"npc_id integer"},"destroyed_ship_type_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_wallets_division_journal_destroyed_ship_type_id","description":"destroyed_ship_type_id integer"},"character_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_wallets_division_journal_character_id","description":"character_id integer"},"corporation_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_wallets_division_journal_corporation_id","description":"corporation_id integer"},"alliance_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_wallets_division_journal_alliance_id","description":"alliance_id integer"},"job_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_wallets_division_journal_job_id","description":"job_id integer"},"contract_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_wallets_division_journal_contract_id","description":"contract_id integer"},"system_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_wallets_division_journal_system_id","description":"system_id integer"},"planet_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_wallets_division_journal_planet_id","description":"planet_id integer"}},"title":"get_corporations_corporation_id_wallets_division_journal_extra_info"}},"title":"get_corporations_corporation_id_wallets_division_journal_200_ok","description":"200 ok object"},"title":"get_corporations_corporation_id_wallets_division_journal_ok"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"x-required-roles":["Accountant","Junior_Accountant"],"security":[{"evesso":["esi-wallet.read_corporation_wallets.v1"]}],"operationId":"get_corporations_corporation_id_wallets_division_journal","x-cached-seconds":3600,"x-alternate-versions":["legacy","v1"]}},"/corporations/{corporation_id}/wallets/{division}/transactions/":{"get":{"description":"Get wallet transactions of a corporation\n\n---\nAlternate route: `/dev/corporations/{corporation_id}/wallets/{division}/transactions/`\n\nAlternate route: `/legacy/corporations/{corporation_id}/wallets/{division}/transactions/`\n\nAlternate route: `/v1/corporations/{corporation_id}/wallets/{division}/transactions/`\n\n---\nThis route is cached for up to 3600 seconds\n\n---\nRequires one of the following EVE corporation role(s): Accountant, Junior_Accountant\n","summary":"Get corporation wallet transactions","tags":["Wallet"],"parameters":[{"$ref":"#/parameters/corporation_id"},{"$ref":"#/parameters/datasource"},{"name":"division","in":"path","description":"Wallet key of the division to fetch journals from","required":true,"type":"integer","format":"int32","minimum":1,"maximum":7},{"name":"from_id","in":"query","description":"Only show journal entries happened before the transaction referenced by this id","required":false,"type":"integer","format":"int64"},{"$ref":"#/parameters/token"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Wallet transactions","examples":{"application/json":[{"transaction_id":1234567890,"date":"2016-10-24T09:00:00Z","location_id":60014719,"type_id":587,"unit_price":1,"quantity":1,"client_id":54321,"is_buy":true,"journal_ref_id":67890}]},"schema":{"type":"array","description":"Wallet transactions","maxItems":2500,"items":{"type":"object","description":"wallet transaction","required":["transaction_id","date","location_id","type_id","unit_price","quantity","client_id","is_buy","journal_ref_id"],"properties":{"transaction_id":{"type":"integer","format":"int64","description":"Unique transaction ID","title":"get_corporations_corporation_id_wallets_division_transactions_transaction_id"},"date":{"type":"string","format":"date-time","description":"Date and time of transaction","title":"get_corporations_corporation_id_wallets_division_transactions_date"},"type_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_wallets_division_transactions_type_id","description":"type_id integer"},"location_id":{"type":"integer","format":"int64","title":"get_corporations_corporation_id_wallets_division_transactions_location_id","description":"location_id integer"},"unit_price":{"type":"number","format":"double","description":"Amount paid per unit","title":"get_corporations_corporation_id_wallets_division_transactions_unit_price"},"quantity":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_wallets_division_transactions_quantity","description":"quantity integer"},"client_id":{"type":"integer","format":"int32","title":"get_corporations_corporation_id_wallets_division_transactions_client_id","description":"client_id integer"},"is_buy":{"type":"boolean","title":"get_corporations_corporation_id_wallets_division_transactions_is_buy","description":"is_buy boolean"},"journal_ref_id":{"type":"integer","format":"int64","title":"get_corporations_corporation_id_wallets_division_transactions_journal_ref_id","description":"journal_ref_id integer"}},"title":"get_corporations_corporation_id_wallets_division_transactions_200_ok"},"title":"get_corporations_corporation_id_wallets_division_transactions_ok"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/forbidden"},"examples":{"application/json":{"error":"Forbidden message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"x-required-roles":["Accountant","Junior_Accountant"],"security":[{"evesso":["esi-wallet.read_corporation_wallets.v1"]}],"operationId":"get_corporations_corporation_id_wallets_division_transactions","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/wars/":{"get":{"description":"Return a list of wars\n\n---\nAlternate route: `/dev/wars/`\n\nAlternate route: `/legacy/wars/`\n\nAlternate route: `/v1/wars/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"List wars","tags":["Wars"],"parameters":[{"$ref":"#/parameters/datasource"},{"name":"max_war_id","in":"query","description":"Only return wars with ID smaller than this.","required":false,"type":"integer","format":"int32"},{"$ref":"#/parameters/user_agent"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of war IDs, in decending order by war_id.","examples":{"application/json":[3,2,1]},"schema":{"type":"array","maxItems":2000,"items":{"type":"integer","format":"int32","title":"get_wars_200_ok","description":"200 ok integer"},"title":"get_wars_ok","description":"200 ok array"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_wars","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/wars/{war_id}/":{"get":{"description":"Return details about a war\n\n---\nAlternate route: `/dev/wars/{war_id}/`\n\nAlternate route: `/legacy/wars/{war_id}/`\n\nAlternate route: `/v1/wars/{war_id}/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"Get war information","tags":["Wars"],"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/user_agent"},{"name":"war_id","in":"path","description":"ID for a war","required":true,"type":"integer","format":"int32"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"Details about a war","examples":{"application/json":{"id":1941,"declared":"2004-05-22T05:20:00Z","mutual":false,"open_for_allies":false,"aggressor":{"corporation_id":986665792,"ships_killed":0,"isk_destroyed":0},"defender":{"corporation_id":1001562011,"ships_killed":0,"isk_destroyed":0}}},"schema":{"type":"object","required":["id","declared","mutual","open_for_allies","aggressor","defender"],"properties":{"id":{"type":"integer","format":"int32","description":"ID of the specified war","title":"get_wars_war_id_id"},"declared":{"type":"string","format":"date-time","description":"Time that the war was declared","title":"get_wars_war_id_declared"},"started":{"type":"string","format":"date-time","description":"Time when the war started and both sides could shoot each other","title":"get_wars_war_id_started"},"retracted":{"type":"string","format":"date-time","description":"Time the war was retracted but both sides could still shoot each other","title":"get_wars_war_id_retracted"},"finished":{"type":"string","format":"date-time","description":"Time the war ended and shooting was no longer allowed","title":"get_wars_war_id_finished"},"mutual":{"type":"boolean","description":"Was the war declared mutual by both parties","title":"get_wars_war_id_mutual"},"open_for_allies":{"type":"boolean","description":"Is the war currently open for allies or not","title":"get_wars_war_id_open_for_allies"},"aggressor":{"type":"object","description":"The aggressor corporation or alliance that declared this war, only contains either corporation_id or alliance_id","required":["ships_killed","isk_destroyed"],"properties":{"corporation_id":{"type":"integer","format":"int32","description":"Corporation ID if and only if the aggressor is a corporation","title":"get_wars_war_id_corporation_id"},"alliance_id":{"type":"integer","format":"int32","description":"Alliance ID if and only if the aggressor is an alliance","title":"get_wars_war_id_alliance_id"},"ships_killed":{"type":"integer","format":"int32","description":"The number of ships the aggressor has killed","title":"get_wars_war_id_ships_killed"},"isk_destroyed":{"type":"number","format":"float","description":"ISK value of ships the aggressor has destroyed","title":"get_wars_war_id_isk_destroyed"}},"title":"get_wars_war_id_aggressor"},"defender":{"type":"object","description":"The defending corporation or alliance that declared this war, only contains either corporation_id or alliance_id","required":["ships_killed","isk_destroyed"],"properties":{"corporation_id":{"type":"integer","format":"int32","description":"Corporation ID if and only if the defender is a corporation","title":"get_wars_war_id_corporation_id"},"alliance_id":{"type":"integer","format":"int32","description":"Alliance ID if and only if the defender is an alliance","title":"get_wars_war_id_alliance_id"},"ships_killed":{"type":"integer","format":"int32","description":"The number of ships the defender has killed","title":"get_wars_war_id_ships_killed"},"isk_destroyed":{"type":"number","format":"float","description":"ISK value of ships the defender has killed","title":"get_wars_war_id_isk_destroyed"}},"title":"get_wars_war_id_defender"},"allies":{"type":"array","description":"allied corporations or alliances, each object contains either corporation_id or alliance_id","maxItems":10000,"items":{"type":"object","properties":{"corporation_id":{"type":"integer","format":"int32","description":"Corporation ID if and only if this ally is a corporation","title":"get_wars_war_id_corporation_id"},"alliance_id":{"type":"integer","format":"int32","description":"Alliance ID if and only if this ally is an alliance","title":"get_wars_war_id_alliance_id"}},"title":"get_wars_war_id_ally","description":"ally object"},"title":"get_wars_war_id_allies"}},"title":"get_wars_war_id_ok","description":"200 ok object"},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"422":{"description":"War not found","schema":{"type":"object","title":"get_wars_war_id_unprocessable_entity","description":"Unprocessable entity","properties":{"error":{"type":"string","description":"Unprocessable entity message","title":"get_wars_war_id_422_unprocessable_entity"}}},"examples":{"application/json":{"error":"Unprocessable entity message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_wars_war_id","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}},"/wars/{war_id}/killmails/":{"get":{"description":"Return a list of kills related to a war\n\n---\nAlternate route: `/dev/wars/{war_id}/killmails/`\n\nAlternate route: `/legacy/wars/{war_id}/killmails/`\n\nAlternate route: `/v1/wars/{war_id}/killmails/`\n\n---\nThis route is cached for up to 3600 seconds","summary":"List kills for a war","tags":["Wars"],"parameters":[{"$ref":"#/parameters/datasource"},{"$ref":"#/parameters/page"},{"$ref":"#/parameters/user_agent"},{"name":"war_id","in":"path","description":"A valid war ID","required":true,"type":"integer","format":"int32"},{"$ref":"#/parameters/X-User-Agent"}],"responses":{"200":{"description":"A list of killmail IDs and hashes","examples":{"application/json":[{"killmail_id":2,"killmail_hash":"8eef5e8fb6b88fe3407c489df33822b2e3b57a5e"},{"killmail_id":1,"killmail_hash":"b41ccb498ece33d64019f64c0db392aa3aa701fb"}]},"schema":{"type":"array","maxItems":2000,"items":{"type":"object","required":["killmail_id","killmail_hash"],"properties":{"killmail_id":{"type":"integer","format":"int32","description":"ID of this killmail","title":"get_wars_war_id_killmails_killmail_id"},"killmail_hash":{"type":"string","description":"A hash of this killmail","title":"get_wars_war_id_killmails_killmail_hash"}},"title":"get_wars_war_id_killmails_200_ok","description":"200 ok object"},"title":"get_wars_war_id_killmails_ok","description":"200 ok array"},"headers":{"X-Pages":{"description":"Maximum page number","type":"integer","format":"int32","default":1},"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"}}},"422":{"description":"War not found","schema":{"type":"object","title":"get_wars_war_id_killmails_unprocessable_entity","description":"Unprocessable entity","properties":{"error":{"type":"string","description":"Unprocessable entity message","title":"get_wars_war_id_killmails_422_unprocessable_entity"}}},"examples":{"application/json":{"error":"Unprocessable entity message"}}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/internal_server_error"},"examples":{"application/json":{"error":"Internal server error message"}}}},"operationId":"get_wars_war_id_killmails","x-cached-seconds":3600,"x-alternate-versions":["dev","legacy","v1"]}}},"securityDefinitions":{"evesso":{"type":"oauth2","authorizationUrl":"https://login.eveonline.com/oauth/authorize","flow":"implicit","scopes":{"esi-alliances.read_contacts.v1":"EVE SSO scope esi-alliances.read_contacts.v1","esi-assets.read_assets.v1":"EVE SSO scope esi-assets.read_assets.v1","esi-assets.read_corporation_assets.v1":"EVE SSO scope esi-assets.read_corporation_assets.v1","esi-bookmarks.read_character_bookmarks.v1":"EVE SSO scope esi-bookmarks.read_character_bookmarks.v1","esi-bookmarks.read_corporation_bookmarks.v1":"EVE SSO scope esi-bookmarks.read_corporation_bookmarks.v1","esi-calendar.read_calendar_events.v1":"EVE SSO scope esi-calendar.read_calendar_events.v1","esi-calendar.respond_calendar_events.v1":"EVE SSO scope esi-calendar.respond_calendar_events.v1","esi-characters.read_agents_research.v1":"EVE SSO scope esi-characters.read_agents_research.v1","esi-characters.read_blueprints.v1":"EVE SSO scope esi-characters.read_blueprints.v1","esi-characters.read_chat_channels.v1":"EVE SSO scope esi-characters.read_chat_channels.v1","esi-characters.read_contacts.v1":"EVE SSO scope esi-characters.read_contacts.v1","esi-characters.read_corporation_roles.v1":"EVE SSO scope esi-characters.read_corporation_roles.v1","esi-characters.read_fatigue.v1":"EVE SSO scope esi-characters.read_fatigue.v1","esi-characters.read_fw_stats.v1":"EVE SSO scope esi-characters.read_fw_stats.v1","esi-characters.read_loyalty.v1":"EVE SSO scope esi-characters.read_loyalty.v1","esi-characters.read_medals.v1":"EVE SSO scope esi-characters.read_medals.v1","esi-characters.read_notifications.v1":"EVE SSO scope esi-characters.read_notifications.v1","esi-characters.read_opportunities.v1":"EVE SSO scope esi-characters.read_opportunities.v1","esi-characters.read_standings.v1":"EVE SSO scope esi-characters.read_standings.v1","esi-characters.read_titles.v1":"EVE SSO scope esi-characters.read_titles.v1","esi-characters.write_contacts.v1":"EVE SSO scope esi-characters.write_contacts.v1","esi-characterstats.read.v1":"EVE SSO scope esi-characterstats.read.v1","esi-clones.read_clones.v1":"EVE SSO scope esi-clones.read_clones.v1","esi-clones.read_implants.v1":"EVE SSO scope esi-clones.read_implants.v1","esi-contracts.read_character_contracts.v1":"EVE SSO scope esi-contracts.read_character_contracts.v1","esi-contracts.read_corporation_contracts.v1":"EVE SSO scope esi-contracts.read_corporation_contracts.v1","esi-corporations.read_blueprints.v1":"EVE SSO scope esi-corporations.read_blueprints.v1","esi-corporations.read_contacts.v1":"EVE SSO scope esi-corporations.read_contacts.v1","esi-corporations.read_container_logs.v1":"EVE SSO scope esi-corporations.read_container_logs.v1","esi-corporations.read_corporation_membership.v1":"EVE SSO scope esi-corporations.read_corporation_membership.v1","esi-corporations.read_divisions.v1":"EVE SSO scope esi-corporations.read_divisions.v1","esi-corporations.read_facilities.v1":"EVE SSO scope esi-corporations.read_facilities.v1","esi-corporations.read_fw_stats.v1":"EVE SSO scope esi-corporations.read_fw_stats.v1","esi-corporations.read_medals.v1":"EVE SSO scope esi-corporations.read_medals.v1","esi-corporations.read_outposts.v1":"EVE SSO scope esi-corporations.read_outposts.v1","esi-corporations.read_standings.v1":"EVE SSO scope esi-corporations.read_standings.v1","esi-corporations.read_starbases.v1":"EVE SSO scope esi-corporations.read_starbases.v1","esi-corporations.read_structures.v1":"EVE SSO scope esi-corporations.read_structures.v1","esi-corporations.read_titles.v1":"EVE SSO scope esi-corporations.read_titles.v1","esi-corporations.track_members.v1":"EVE SSO scope esi-corporations.track_members.v1","esi-corporations.write_structures.v1":"EVE SSO scope esi-corporations.write_structures.v1","esi-fittings.read_fittings.v1":"EVE SSO scope esi-fittings.read_fittings.v1","esi-fittings.write_fittings.v1":"EVE SSO scope esi-fittings.write_fittings.v1","esi-fleets.read_fleet.v1":"EVE SSO scope esi-fleets.read_fleet.v1","esi-fleets.write_fleet.v1":"EVE SSO scope esi-fleets.write_fleet.v1","esi-industry.read_character_jobs.v1":"EVE SSO scope esi-industry.read_character_jobs.v1","esi-industry.read_character_mining.v1":"EVE SSO scope esi-industry.read_character_mining.v1","esi-industry.read_corporation_jobs.v1":"EVE SSO scope esi-industry.read_corporation_jobs.v1","esi-industry.read_corporation_mining.v1":"EVE SSO scope esi-industry.read_corporation_mining.v1","esi-killmails.read_corporation_killmails.v1":"EVE SSO scope esi-killmails.read_corporation_killmails.v1","esi-killmails.read_killmails.v1":"EVE SSO scope esi-killmails.read_killmails.v1","esi-location.read_location.v1":"EVE SSO scope esi-location.read_location.v1","esi-location.read_online.v1":"EVE SSO scope esi-location.read_online.v1","esi-location.read_ship_type.v1":"EVE SSO scope esi-location.read_ship_type.v1","esi-mail.organize_mail.v1":"EVE SSO scope esi-mail.organize_mail.v1","esi-mail.read_mail.v1":"EVE SSO scope esi-mail.read_mail.v1","esi-mail.send_mail.v1":"EVE SSO scope esi-mail.send_mail.v1","esi-markets.read_character_orders.v1":"EVE SSO scope esi-markets.read_character_orders.v1","esi-markets.read_corporation_orders.v1":"EVE SSO scope esi-markets.read_corporation_orders.v1","esi-markets.structure_markets.v1":"EVE SSO scope esi-markets.structure_markets.v1","esi-planets.manage_planets.v1":"EVE SSO scope esi-planets.manage_planets.v1","esi-planets.read_customs_offices.v1":"EVE SSO scope esi-planets.read_customs_offices.v1","esi-search.search_structures.v1":"EVE SSO scope esi-search.search_structures.v1","esi-skills.read_skillqueue.v1":"EVE SSO scope esi-skills.read_skillqueue.v1","esi-skills.read_skills.v1":"EVE SSO scope esi-skills.read_skills.v1","esi-ui.open_window.v1":"EVE SSO scope esi-ui.open_window.v1","esi-ui.write_waypoint.v1":"EVE SSO scope esi-ui.write_waypoint.v1","esi-universe.read_structures.v1":"EVE SSO scope esi-universe.read_structures.v1","esi-wallet.read_character_wallet.v1":"EVE SSO scope esi-wallet.read_character_wallet.v1","esi-wallet.read_corporation_wallets.v1":"EVE SSO scope esi-wallet.read_corporation_wallets.v1"}}},"parameters":{"datasource":{"name":"datasource","description":"The server name you would like data from","in":"query","type":"string","default":"tranquility","enum":["tranquility","singularity"]},"user_agent":{"name":"user_agent","description":"Client identifier, takes precedence over headers","in":"query","type":"string"},"X-User-Agent":{"name":"X-User-Agent","description":"Client identifier, takes precedence over User-Agent","in":"header","type":"string"},"page":{"name":"page","description":"Which page of results to return","in":"query","type":"integer","format":"int32","default":1},"token":{"name":"token","description":"Access token to use if unable to set a header","in":"query","type":"string"},"character_id":{"description":"An EVE character ID","format":"int32","in":"path","name":"character_id","required":true,"type":"integer"},"corporation_id":{"description":"An EVE corporation ID","format":"int32","in":"path","name":"corporation_id","required":true,"type":"integer"},"language":{"name":"language","description":"Language to use in the response","in":"query","type":"string","default":"en-us","enum":["de","en-us","fr","ja","ru","zh"]},"alliance_id":{"description":"An EVE alliance ID","format":"int32","in":"path","name":"alliance_id","required":true,"type":"integer"}},"definitions":{"internal_server_error":{"type":"object","description":"Internal server error model","title":"Internal server error","required":["error"],"properties":{"error":{"type":"string","description":"Internal server error message"}}},"forbidden":{"type":"object","description":"Forbidden model","title":"Forbidden","required":["error"],"properties":{"error":{"type":"string","description":"Forbidden message"},"sso_status":{"type":"integer","description":"Status code received from SSO"}}}}}
\ No newline at end of file
diff --git a/vendor/eveseat/eseye/tools/get_endpoints_and_scopes.php b/vendor/eveseat/eseye/tools/get_endpoints_and_scopes.php
deleted file mode 100644
index 15c768b5e..000000000
--- a/vendor/eveseat/eseye/tools/get_endpoints_and_scopes.php
+++ /dev/null
@@ -1,57 +0,0 @@
- [],
- 'post' => [],
- 'put' => [],
- 'delete' => [],
- 'patch' => [],
-];
-
-echo 'Mapping Scopes to endpoints and methods ..' . PHP_EOL;
-foreach ($esi['paths'] as $path => $description) {
-
- foreach ($description as $method => $data) {
-
- if (isset($data['security']))
- $scope = $data['security'][0]['evesso'][0];
- else
- $scope = 'public';
-
- // Update the scope map!
- $scope_map[$method][$path] = $scope;
- echo $method . ' | ' . $path . ' | ' . $scope . PHP_EOL;
- }
-}
-
-// Output the scopes in a way that we can
-// copy/pasta in code!
-echo 'Var Export of the scope map:' . PHP_EOL;
-echo PHP_EOL;
-var_export($scope_map);
-echo PHP_EOL;
diff --git a/vendor/eveseat/eseye/tools/scopes.json b/vendor/eveseat/eseye/tools/scopes.json
deleted file mode 100644
index 737051c6b..000000000
--- a/vendor/eveseat/eseye/tools/scopes.json
+++ /dev/null
@@ -1 +0,0 @@
-{"get":{"\/alliances\/":"public","\/alliances\/names\/":"public","\/alliances\/{alliance_id}\/":"public","\/alliances\/{alliance_id}\/corporations\/":"public","\/alliances\/{alliance_id}\/icons\/":"public","\/characters\/names\/":"public","\/characters\/{character_id}\/":"public","\/characters\/{character_id}\/assets\/":"esi-assets.read_assets.v1","\/characters\/{character_id}\/bookmarks\/":"esi-bookmarks.read_character_bookmarks.v1","\/characters\/{character_id}\/bookmarks\/folders\/":"esi-bookmarks.read_character_bookmarks.v1","\/characters\/{character_id}\/calendar\/":"esi-calendar.read_calendar_events.v1","\/characters\/{character_id}\/calendar\/{event_id}\/":"esi-calendar.read_calendar_events.v1","\/characters\/{character_id}\/clones\/":"esi-clones.read_clones.v1","\/characters\/{character_id}\/contacts\/":"esi-characters.read_contacts.v1","\/characters\/{character_id}\/contacts\/labels\/":"esi-characters.read_contacts.v1","\/characters\/{character_id}\/corporationhistory\/":"public","\/characters\/{character_id}\/killmails\/recent\/":"esi-killmails.read_killmails.v1","\/characters\/{character_id}\/location\/":"esi-location.read_location.v1","\/characters\/{character_id}\/mail\/":"esi-mail.read_mail.v1","\/characters\/{character_id}\/mail\/labels\/":"esi-mail.read_mail.v1","\/characters\/{character_id}\/mail\/lists\/":"esi-mail.read_mail.v1","\/characters\/{character_id}\/mail\/{mail_id}\/":"esi-mail.read_mail.v1","\/characters\/{character_id}\/planets\/":"esi-planets.manage_planets.v1","\/characters\/{character_id}\/planets\/{planet_id}\/":"esi-planets.manage_planets.v1","\/characters\/{character_id}\/portrait\/":"public","\/characters\/{character_id}\/search\/":"esi-search.search_structures.v1","\/characters\/{character_id}\/ship\/":"esi-location.read_ship_type.v1","\/characters\/{character_id}\/skillqueue\/":"esi-skills.read_skillqueue.v1","\/characters\/{character_id}\/skills\/":"esi-skills.read_skills.v1","\/characters\/{character_id}\/wallets\/":"esi-wallet.read_character_wallet.v1","\/corporations\/names\/":"public","\/corporations\/{corporation_id}\/":"public","\/corporations\/{corporation_id}\/alliancehistory\/":"public","\/corporations\/{corporation_id}\/icons\/":"public","\/corporations\/{corporation_id}\/members\/":"esi-corporations.read_corporation_membership.v1","\/corporations\/{corporation_id}\/roles\/":"esi-corporations.read_corporation_membership.v1","\/fleets\/{fleet_id}\/":"esi-fleets.read_fleet.v1","\/fleets\/{fleet_id}\/members\/":"esi-fleets.read_fleet.v1","\/fleets\/{fleet_id}\/wings\/":"esi-fleets.read_fleet.v1","\/incursions\/":"public","\/industry\/facilities\/":"public","\/industry\/systems\/":"public","\/insurance\/prices\/":"public","\/killmails\/{killmail_id}\/{killmail_hash}\/":"public","\/markets\/prices\/":"public","\/markets\/{region_id}\/history\/":"public","\/markets\/{region_id}\/orders\/":"public","\/search\/":"public","\/sovereignty\/campaigns\/":"public","\/sovereignty\/structures\/":"public","\/universe\/schematics\/{schematic_id}\/":"public","\/universe\/stations\/{station_id}\/":"public","\/universe\/structures\/":"public","\/universe\/structures\/{structure_id}\/":"esi-universe.read_structures.v1","\/universe\/systems\/{system_id}\/":"public","\/universe\/types\/{type_id}\/":"public","\/wars\/":"public","\/wars\/{war_id}\/":"public","\/wars\/{war_id}\/killmails\/":"public"},"post":{"\/characters\/{character_id}\/contacts\/":"esi-characters.write_contacts.v1","\/characters\/{character_id}\/cspa\/":"esi-characters.read_contacts.v1","\/characters\/{character_id}\/mail\/":"esi-mail.send_mail.v1","\/characters\/{character_id}\/mail\/labels\/":"esi-mail.organize_mail.v1","\/fleets\/{fleet_id}\/members\/":"esi-fleets.write_fleet.v1","\/fleets\/{fleet_id}\/wings\/":"esi-fleets.write_fleet.v1","\/fleets\/{fleet_id}\/wings\/{wing_id}\/squads\/":"esi-fleets.write_fleet.v1","\/ui\/autopilot\/waypoint\/":"esi-ui.write_waypoint.v1","\/ui\/openwindow\/contract\/":"esi-ui.open_window.v1","\/ui\/openwindow\/information\/":"esi-ui.open_window.v1","\/ui\/openwindow\/marketdetails\/":"esi-ui.open_window.v1","\/ui\/openwindow\/newmail\/":"esi-ui.open_window.v1","\/universe\/names\/":"public"},"put":{"\/characters\/{character_id}\/calendar\/{event_id}\/":"esi-calendar.respond_calendar_events.v1","\/characters\/{character_id}\/contacts\/":"esi-characters.write_contacts.v1","\/characters\/{character_id}\/mail\/{mail_id}\/":"esi-mail.organize_mail.v1","\/fleets\/{fleet_id}\/":"esi-fleets.write_fleet.v1","\/fleets\/{fleet_id}\/members\/{member_id}\/":"esi-fleets.write_fleet.v1","\/fleets\/{fleet_id}\/squads\/{squad_id}\/":"esi-fleets.write_fleet.v1","\/fleets\/{fleet_id}\/wings\/{wing_id}\/":"esi-fleets.write_fleet.v1"},"delete":{"\/characters\/{character_id}\/contacts\/":"esi-characters.write_contacts.v1","\/characters\/{character_id}\/mail\/labels\/{label_id}\/":"esi-mail.organize_mail.v1","\/characters\/{character_id}\/mail\/{mail_id}\/":"esi-mail.organize_mail.v1","\/fleets\/{fleet_id}\/members\/{member_id}\/":"esi-fleets.write_fleet.v1","\/fleets\/{fleet_id}\/squads\/{squad_id}\/":"esi-fleets.write_fleet.v1","\/fleets\/{fleet_id}\/wings\/{wing_id}\/":"esi-fleets.write_fleet.v1"},"patch":[]}
\ No newline at end of file
diff --git a/vendor/eveseat/eseye/tools/swagger_download.php b/vendor/eveseat/eseye/tools/swagger_download.php
deleted file mode 100644
index ea5872fa6..000000000
--- a/vendor/eveseat/eseye/tools/swagger_download.php
+++ /dev/null
@@ -1,28 +0,0 @@
-request('get', 'https://esi.evetech.net/latest/swagger.json?datasource=tranquility', [
- 'sink' => 'esi.json',
-]);
diff --git a/vendor/facade/ignition-contracts/.github/workflows/php-cs-fixer.yml b/vendor/facade/ignition-contracts/.github/workflows/php-cs-fixer.yml
new file mode 100644
index 000000000..84ab01ad2
--- /dev/null
+++ b/vendor/facade/ignition-contracts/.github/workflows/php-cs-fixer.yml
@@ -0,0 +1,29 @@
+name: Check & fix styling
+
+on: [push]
+
+jobs:
+ style:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v2
+
+ - name: Fix style
+ uses: docker://oskarstark/php-cs-fixer-ga
+ with:
+ args: --config=.php_cs --allow-risky=yes
+
+ - name: Extract branch name
+ shell: bash
+ run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
+ id: extract_branch
+
+ - name: Commit changes
+ uses: stefanzweifel/git-auto-commit-action@v2.3.0
+ with:
+ commit_message: Fix styling
+ branch: ${{ steps.extract_branch.outputs.branch }}
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/vendor/facade/ignition-contracts/.github/workflows/psalm.yml b/vendor/facade/ignition-contracts/.github/workflows/psalm.yml
new file mode 100644
index 000000000..1f6b7aa44
--- /dev/null
+++ b/vendor/facade/ignition-contracts/.github/workflows/psalm.yml
@@ -0,0 +1,33 @@
+name: Psalm
+
+on:
+ push:
+ paths:
+ - '**.php'
+ - 'psalm.xml'
+
+jobs:
+ psalm:
+ name: psalm
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Setup PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: '7.4'
+ extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
+ coverage: none
+
+ - name: Cache composer dependencies
+ uses: actions/cache@v1
+ with:
+ path: vendor
+ key: composer-${{ hashFiles('composer.lock') }}
+
+ - name: Run composer require
+ run: composer require -n --prefer-dist
+
+ - name: Run psalm
+ run: ./vendor/bin/psalm -c psalm.xml
diff --git a/vendor/facade/ignition-contracts/.github/workflows/run-tests.yml b/vendor/facade/ignition-contracts/.github/workflows/run-tests.yml
new file mode 100644
index 000000000..6b6d1a38d
--- /dev/null
+++ b/vendor/facade/ignition-contracts/.github/workflows/run-tests.yml
@@ -0,0 +1,43 @@
+name: Run tests
+
+on:
+ push:
+ pull_request:
+ schedule:
+ - cron: '0 0 * * *'
+
+jobs:
+ php-tests:
+ runs-on: ${{ matrix.os }}
+
+ strategy:
+ matrix:
+ php: [ 8.0, 7.4, 7.3 ]
+ dependency-version: [ prefer-lowest, prefer-stable ]
+ os: [ ubuntu-latest, windows-latest ]
+ allow_failures:
+ - php: 8.0
+
+ name: P${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v2
+
+ - name: Set up PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: ${{ matrix.php }}
+ coverage: none
+ tools: composer:v2
+
+ - name: Install PHP 7 dependencies
+ run: composer update --${{ matrix.dependency-version }} --no-interaction --no-progress
+ if: "matrix.php < 8"
+
+ - name: Install PHP 8 dependencies
+ run: composer update --prefer-stable --ignore-platform-req=php --no-interaction --no-progress
+ if: "matrix.php >= 8"
+
+ - name: Execute tests
+ run: vendor/bin/phpunit
diff --git a/vendor/facade/ignition-contracts/.php_cs b/vendor/facade/ignition-contracts/.php_cs
new file mode 100644
index 000000000..4ca9a7f8d
--- /dev/null
+++ b/vendor/facade/ignition-contracts/.php_cs
@@ -0,0 +1,38 @@
+notPath('bootstrap/*')
+ ->notPath('storage/*')
+ ->notPath('resources/view/mail/*')
+ ->in([
+ __DIR__ . '/src',
+ __DIR__ . '/tests',
+ ])
+ ->name('*.php')
+ ->notName('*.blade.php')
+ ->notName('GitConflictController.php')
+ ->ignoreDotFiles(true)
+ ->ignoreVCS(true);
+
+return PhpCsFixer\Config::create()
+ ->setRules([
+ '@PSR2' => true,
+ 'array_syntax' => ['syntax' => 'short'],
+ 'ordered_imports' => ['sortAlgorithm' => 'alpha'],
+ 'no_unused_imports' => true,
+ 'not_operator_with_successor_space' => true,
+ 'trailing_comma_in_multiline_array' => true,
+ 'phpdoc_scalar' => true,
+ 'unary_operator_spaces' => true,
+ 'binary_operator_spaces' => true,
+ 'blank_line_before_statement' => [
+ 'statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try'],
+ ],
+ 'phpdoc_single_line_var_spacing' => true,
+ 'phpdoc_var_without_name' => true,
+ 'method_argument_space' => [
+ 'on_multiline' => 'ensure_fully_multiline',
+ 'keep_multiple_spaces_after_comma' => true,
+ ]
+ ])
+ ->setFinder($finder);
diff --git a/vendor/facade/ignition-contracts/LICENSE.md b/vendor/facade/ignition-contracts/LICENSE.md
new file mode 100644
index 000000000..9a0c79882
--- /dev/null
+++ b/vendor/facade/ignition-contracts/LICENSE.md
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) Facade
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/vendor/facade/ignition-contracts/composer.json b/vendor/facade/ignition-contracts/composer.json
new file mode 100644
index 000000000..69074f420
--- /dev/null
+++ b/vendor/facade/ignition-contracts/composer.json
@@ -0,0 +1,46 @@
+{
+ "name": "facade/ignition-contracts",
+ "description": "Solution contracts for Ignition",
+ "keywords": [
+ "flare",
+ "contracts",
+ "ignition"
+ ],
+ "homepage": "https://github.com/facade/ignition-contracts",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Freek Van der Herten",
+ "email": "freek@spatie.be",
+ "homepage": "https://flareapp.io",
+ "role": "Developer"
+ }
+ ],
+ "require": {
+ "php": "^7.3|^8.0"
+ },
+ "require-dev": {
+ "friendsofphp/php-cs-fixer": "^v2.15.8",
+ "phpunit/phpunit": "^9.3.11",
+ "vimeo/psalm": "^3.17.1"
+ },
+ "autoload": {
+ "psr-4": {
+ "Facade\\IgnitionContracts\\": "src"
+ }
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "Facade\\IgnitionContracts\\Tests\\": "tests"
+ }
+ },
+ "scripts": {
+ "psalm": "vendor/bin/psalm",
+ "format": "vendor/bin/php-cs-fixer fix --allow-risky=yes",
+ "test": "vendor/bin/phpunit",
+ "test-coverage": "vendor/bin/phpunit --coverage-html coverage"
+ },
+ "config": {
+ "sort-packages": true
+ }
+}
diff --git a/vendor/facade/ignition-contracts/psalm.xml b/vendor/facade/ignition-contracts/psalm.xml
new file mode 100644
index 000000000..bc341f02d
--- /dev/null
+++ b/vendor/facade/ignition-contracts/psalm.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/vendor/facade/ignition-contracts/src/BaseSolution.php b/vendor/facade/ignition-contracts/src/BaseSolution.php
new file mode 100644
index 000000000..b4a4909e1
--- /dev/null
+++ b/vendor/facade/ignition-contracts/src/BaseSolution.php
@@ -0,0 +1,56 @@
+title = $title;
+ }
+
+ public function getSolutionTitle(): string
+ {
+ return $this->title;
+ }
+
+ public function setSolutionTitle(string $title): self
+ {
+ $this->title = $title;
+
+ return $this;
+ }
+
+ public function getSolutionDescription(): string
+ {
+ return $this->description;
+ }
+
+ public function setSolutionDescription(string $description): self
+ {
+ $this->description = $description;
+
+ return $this;
+ }
+
+ public function getDocumentationLinks(): array
+ {
+ return $this->links;
+ }
+
+ public function setDocumentationLinks(array $links): self
+ {
+ $this->links = $links;
+
+ return $this;
+ }
+}
diff --git a/vendor/facade/ignition-contracts/src/HasSolutionsForThrowable.php b/vendor/facade/ignition-contracts/src/HasSolutionsForThrowable.php
new file mode 100644
index 000000000..32ad3e9a7
--- /dev/null
+++ b/vendor/facade/ignition-contracts/src/HasSolutionsForThrowable.php
@@ -0,0 +1,13 @@
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/vendor/jakub-onderka/php-console-color/composer.json b/vendor/jakub-onderka/php-console-color/composer.json
deleted file mode 100644
index 6481cb51d..000000000
--- a/vendor/jakub-onderka/php-console-color/composer.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "name": "jakub-onderka/php-console-color",
- "license": "BSD-2-Clause",
- "authors": [
- {
- "name": "Jakub Onderka",
- "email": "jakub.onderka@gmail.com"
- }
- ],
- "autoload": {
- "psr-4": {"JakubOnderka\\PhpConsoleColor\\": "src/"}
- },
- "require": {
- "php": ">=5.4.0"
- },
- "require-dev": {
- "phpunit/phpunit": "~4.3",
- "jakub-onderka/php-parallel-lint": "1.0",
- "jakub-onderka/php-var-dump-check": "0.*",
- "squizlabs/php_codesniffer": "1.*",
- "jakub-onderka/php-code-style": "1.0"
- }
-}
diff --git a/vendor/jakub-onderka/php-console-color/example.php b/vendor/jakub-onderka/php-console-color/example.php
deleted file mode 100644
index 5e698a24e..000000000
--- a/vendor/jakub-onderka/php-console-color/example.php
+++ /dev/null
@@ -1,38 +0,0 @@
-isSupported() ? 'Yes' : 'No') . "\n";
-echo "256 colors are supported: " . ($consoleColor->are256ColorsSupported() ? 'Yes' : 'No') . "\n\n";
-
-if ($consoleColor->isSupported()) {
- foreach ($consoleColor->getPossibleStyles() as $style) {
- echo $consoleColor->apply($style, $style) . "\n";
- }
-}
-
-echo "\n";
-
-if ($consoleColor->are256ColorsSupported()) {
- echo "Foreground colors:\n";
- for ($i = 1; $i <= 255; $i++) {
- echo $consoleColor->apply("color_$i", str_pad($i, 6, ' ', STR_PAD_BOTH));
-
- if ($i % 15 === 0) {
- echo "\n";
- }
- }
-
- echo "\nBackground colors:\n";
-
- for ($i = 1; $i <= 255; $i++) {
- echo $consoleColor->apply("bg_color_$i", str_pad($i, 6, ' ', STR_PAD_BOTH));
-
- if ($i % 15 === 0) {
- echo "\n";
- }
- }
-
- echo "\n";
-}
diff --git a/vendor/jakub-onderka/php-console-color/phpunit.xml b/vendor/jakub-onderka/php-console-color/phpunit.xml
deleted file mode 100644
index f1105cc4e..000000000
--- a/vendor/jakub-onderka/php-console-color/phpunit.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- tests
-
-
-
-
-
-
- vendor
-
-
-
diff --git a/vendor/jakub-onderka/php-console-color/src/ConsoleColor.php b/vendor/jakub-onderka/php-console-color/src/ConsoleColor.php
deleted file mode 100644
index 90fd12528..000000000
--- a/vendor/jakub-onderka/php-console-color/src/ConsoleColor.php
+++ /dev/null
@@ -1,287 +0,0 @@
- null,
- 'bold' => '1',
- 'dark' => '2',
- 'italic' => '3',
- 'underline' => '4',
- 'blink' => '5',
- 'reverse' => '7',
- 'concealed' => '8',
-
- 'default' => '39',
- 'black' => '30',
- 'red' => '31',
- 'green' => '32',
- 'yellow' => '33',
- 'blue' => '34',
- 'magenta' => '35',
- 'cyan' => '36',
- 'light_gray' => '37',
-
- 'dark_gray' => '90',
- 'light_red' => '91',
- 'light_green' => '92',
- 'light_yellow' => '93',
- 'light_blue' => '94',
- 'light_magenta' => '95',
- 'light_cyan' => '96',
- 'white' => '97',
-
- 'bg_default' => '49',
- 'bg_black' => '40',
- 'bg_red' => '41',
- 'bg_green' => '42',
- 'bg_yellow' => '43',
- 'bg_blue' => '44',
- 'bg_magenta' => '45',
- 'bg_cyan' => '46',
- 'bg_light_gray' => '47',
-
- 'bg_dark_gray' => '100',
- 'bg_light_red' => '101',
- 'bg_light_green' => '102',
- 'bg_light_yellow' => '103',
- 'bg_light_blue' => '104',
- 'bg_light_magenta' => '105',
- 'bg_light_cyan' => '106',
- 'bg_white' => '107',
- );
-
- /** @var array */
- private $themes = array();
-
- public function __construct()
- {
- $this->isSupported = $this->isSupported();
- }
-
- /**
- * @param string|array $style
- * @param string $text
- * @return string
- * @throws InvalidStyleException
- * @throws \InvalidArgumentException
- */
- public function apply($style, $text)
- {
- if (!$this->isStyleForced() && !$this->isSupported()) {
- return $text;
- }
-
- if (is_string($style)) {
- $style = array($style);
- }
- if (!is_array($style)) {
- throw new \InvalidArgumentException("Style must be string or array.");
- }
-
- $sequences = array();
-
- foreach ($style as $s) {
- if (isset($this->themes[$s])) {
- $sequences = array_merge($sequences, $this->themeSequence($s));
- } else if ($this->isValidStyle($s)) {
- $sequences[] = $this->styleSequence($s);
- } else {
- throw new InvalidStyleException($s);
- }
- }
-
- $sequences = array_filter($sequences, function ($val) {
- return $val !== null;
- });
-
- if (empty($sequences)) {
- return $text;
- }
-
- return $this->escSequence(implode(';', $sequences)) . $text . $this->escSequence(self::RESET_STYLE);
- }
-
- /**
- * @param bool $forceStyle
- */
- public function setForceStyle($forceStyle)
- {
- $this->forceStyle = (bool) $forceStyle;
- }
-
- /**
- * @return bool
- */
- public function isStyleForced()
- {
- return $this->forceStyle;
- }
-
- /**
- * @param array $themes
- * @throws InvalidStyleException
- * @throws \InvalidArgumentException
- */
- public function setThemes(array $themes)
- {
- $this->themes = array();
- foreach ($themes as $name => $styles) {
- $this->addTheme($name, $styles);
- }
- }
-
- /**
- * @param string $name
- * @param array|string $styles
- * @throws \InvalidArgumentException
- * @throws InvalidStyleException
- */
- public function addTheme($name, $styles)
- {
- if (is_string($styles)) {
- $styles = array($styles);
- }
- if (!is_array($styles)) {
- throw new \InvalidArgumentException("Style must be string or array.");
- }
-
- foreach ($styles as $style) {
- if (!$this->isValidStyle($style)) {
- throw new InvalidStyleException($style);
- }
- }
-
- $this->themes[$name] = $styles;
- }
-
- /**
- * @return array
- */
- public function getThemes()
- {
- return $this->themes;
- }
-
- /**
- * @param string $name
- * @return bool
- */
- public function hasTheme($name)
- {
- return isset($this->themes[$name]);
- }
-
- /**
- * @param string $name
- */
- public function removeTheme($name)
- {
- unset($this->themes[$name]);
- }
-
- /**
- * @return bool
- */
- public function isSupported()
- {
- if (DIRECTORY_SEPARATOR === '\\') {
- if (function_exists('sapi_windows_vt100_support') && @sapi_windows_vt100_support(STDOUT)) {
- return true;
- } elseif (getenv('ANSICON') !== false || getenv('ConEmuANSI') === 'ON') {
- return true;
- }
- return false;
- } else {
- return function_exists('posix_isatty') && @posix_isatty(STDOUT);
- }
- }
-
- /**
- * @return bool
- */
- public function are256ColorsSupported()
- {
- if (DIRECTORY_SEPARATOR === '\\') {
- return function_exists('sapi_windows_vt100_support') && @sapi_windows_vt100_support(STDOUT);
- } else {
- return strpos(getenv('TERM'), '256color') !== false;
- }
- }
-
- /**
- * @return array
- */
- public function getPossibleStyles()
- {
- return array_keys($this->styles);
- }
-
- /**
- * @param string $name
- * @return string[]
- */
- private function themeSequence($name)
- {
- $sequences = array();
- foreach ($this->themes[$name] as $style) {
- $sequences[] = $this->styleSequence($style);
- }
- return $sequences;
- }
-
- /**
- * @param string $style
- * @return string
- */
- private function styleSequence($style)
- {
- if (array_key_exists($style, $this->styles)) {
- return $this->styles[$style];
- }
-
- if (!$this->are256ColorsSupported()) {
- return null;
- }
-
- preg_match(self::COLOR256_REGEXP, $style, $matches);
-
- $type = $matches[1] === 'bg_' ? self::BACKGROUND : self::FOREGROUND;
- $value = $matches[2];
-
- return "$type;5;$value";
- }
-
- /**
- * @param string $style
- * @return bool
- */
- private function isValidStyle($style)
- {
- return array_key_exists($style, $this->styles) || preg_match(self::COLOR256_REGEXP, $style);
- }
-
- /**
- * @param string|int $value
- * @return string
- */
- private function escSequence($value)
- {
- return "\033[{$value}m";
- }
-}
diff --git a/vendor/jakub-onderka/php-console-color/src/InvalidStyleException.php b/vendor/jakub-onderka/php-console-color/src/InvalidStyleException.php
deleted file mode 100644
index 6f1586f62..000000000
--- a/vendor/jakub-onderka/php-console-color/src/InvalidStyleException.php
+++ /dev/null
@@ -1,10 +0,0 @@
-isSupportedForce = $isSupported;
- }
-
- public function isSupported()
- {
- return $this->isSupportedForce;
- }
-
- public function setAre256ColorsSupported($are256ColorsSupported)
- {
- $this->are256ColorsSupportedForce = $are256ColorsSupported;
- }
-
- public function are256ColorsSupported()
- {
- return $this->are256ColorsSupportedForce;
- }
-}
-
-class ConsoleColorTest extends \PHPUnit_Framework_TestCase
-{
- /** @var ConsoleColorWithForceSupport */
- private $uut;
-
- protected function setUp()
- {
- $this->uut = new ConsoleColorWithForceSupport();
- }
-
- public function testNone()
- {
- $output = $this->uut->apply('none', 'text');
- $this->assertEquals("text", $output);
- }
-
- public function testBold()
- {
- $output = $this->uut->apply('bold', 'text');
- $this->assertEquals("\033[1mtext\033[0m", $output);
- }
-
- public function testBoldColorsAreNotSupported()
- {
- $this->uut->setIsSupported(false);
-
- $output = $this->uut->apply('bold', 'text');
- $this->assertEquals("text", $output);
- }
-
- public function testBoldColorsAreNotSupportedButAreForced()
- {
- $this->uut->setIsSupported(false);
- $this->uut->setForceStyle(true);
-
- $output = $this->uut->apply('bold', 'text');
- $this->assertEquals("\033[1mtext\033[0m", $output);
- }
-
- public function testDark()
- {
- $output = $this->uut->apply('dark', 'text');
- $this->assertEquals("\033[2mtext\033[0m", $output);
- }
-
- public function testBoldAndDark()
- {
- $output = $this->uut->apply(array('bold', 'dark'), 'text');
- $this->assertEquals("\033[1;2mtext\033[0m", $output);
- }
-
- public function test256ColorForeground()
- {
- $output = $this->uut->apply('color_255', 'text');
- $this->assertEquals("\033[38;5;255mtext\033[0m", $output);
- }
-
- public function test256ColorWithoutSupport()
- {
- $this->uut->setAre256ColorsSupported(false);
-
- $output = $this->uut->apply('color_255', 'text');
- $this->assertEquals("text", $output);
- }
-
- public function test256ColorBackground()
- {
- $output = $this->uut->apply('bg_color_255', 'text');
- $this->assertEquals("\033[48;5;255mtext\033[0m", $output);
- }
-
- public function test256ColorForegroundAndBackground()
- {
- $output = $this->uut->apply(array('color_200', 'bg_color_255'), 'text');
- $this->assertEquals("\033[38;5;200;48;5;255mtext\033[0m", $output);
- }
-
- public function testSetOwnTheme()
- {
- $this->uut->setThemes(array('bold_dark' => array('bold', 'dark')));
- $output = $this->uut->apply(array('bold_dark'), 'text');
- $this->assertEquals("\033[1;2mtext\033[0m", $output);
- }
-
- public function testAddOwnTheme()
- {
- $this->uut->addTheme('bold_own', 'bold');
- $output = $this->uut->apply(array('bold_own'), 'text');
- $this->assertEquals("\033[1mtext\033[0m", $output);
- }
-
- public function testAddOwnThemeArray()
- {
- $this->uut->addTheme('bold_dark', array('bold', 'dark'));
- $output = $this->uut->apply(array('bold_dark'), 'text');
- $this->assertEquals("\033[1;2mtext\033[0m", $output);
- }
-
- public function testOwnWithStyle()
- {
- $this->uut->addTheme('bold_dark', array('bold', 'dark'));
- $output = $this->uut->apply(array('bold_dark', 'italic'), 'text');
- $this->assertEquals("\033[1;2;3mtext\033[0m", $output);
- }
-
- public function testHasAndRemoveTheme()
- {
- $this->assertFalse($this->uut->hasTheme('bold_dark'));
-
- $this->uut->addTheme('bold_dark', array('bold', 'dark'));
- $this->assertTrue($this->uut->hasTheme('bold_dark'));
-
- $this->uut->removeTheme('bold_dark');
- $this->assertFalse($this->uut->hasTheme('bold_dark'));
- }
-
- public function testApplyInvalidArgument()
- {
- $this->setExpectedException('\InvalidArgumentException');
- $this->uut->apply(new stdClass(), 'text');
- }
-
- public function testApplyInvalidStyleName()
- {
- $this->setExpectedException('\JakubOnderka\PhpConsoleColor\InvalidStyleException');
- $this->uut->apply('invalid', 'text');
- }
-
- public function testApplyInvalid256Color()
- {
- $this->setExpectedException('\JakubOnderka\PhpConsoleColor\InvalidStyleException');
- $this->uut->apply('color_2134', 'text');
- }
-
- public function testThemeInvalidStyle()
- {
- $this->setExpectedException('\JakubOnderka\PhpConsoleColor\InvalidStyleException');
- $this->uut->addTheme('invalid', array('invalid'));
- }
-
- public function testForceStyle()
- {
- $this->assertFalse($this->uut->isStyleForced());
- $this->uut->setForceStyle(true);
- $this->assertTrue($this->uut->isStyleForced());
- }
-
- public function testGetPossibleStyles()
- {
- $this->assertInternalType('array', $this->uut->getPossibleStyles());
- $this->assertNotEmpty($this->uut->getPossibleStyles());
- }
-}
-
diff --git a/vendor/jakub-onderka/php-console-highlighter/.gitignore b/vendor/jakub-onderka/php-console-highlighter/.gitignore
deleted file mode 100644
index 70f6ec069..000000000
--- a/vendor/jakub-onderka/php-console-highlighter/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-/.idea/
-/build/
-/vendor/
-/composer.lock
\ No newline at end of file
diff --git a/vendor/jakub-onderka/php-console-highlighter/.travis.yml b/vendor/jakub-onderka/php-console-highlighter/.travis.yml
deleted file mode 100644
index c88c4ec9d..000000000
--- a/vendor/jakub-onderka/php-console-highlighter/.travis.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-language: php
-
-php:
- - 5.4
- - 5.5
- - 5.6
- - 7.0
- - 7.1
- - 7.2
-
-sudo: false
-
-cache:
- directories:
- - vendor
- - $HOME/.composer/cache
-
-before_script:
- - composer install --no-interaction --prefer-source
-
-script:
- - ant
diff --git a/vendor/jakub-onderka/php-console-highlighter/LICENSE b/vendor/jakub-onderka/php-console-highlighter/LICENSE
deleted file mode 100644
index 1a8317fa1..000000000
--- a/vendor/jakub-onderka/php-console-highlighter/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2013 Jakub Onderka
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
\ No newline at end of file
diff --git a/vendor/jakub-onderka/php-console-highlighter/README.md b/vendor/jakub-onderka/php-console-highlighter/README.md
deleted file mode 100644
index 1ef3d1340..000000000
--- a/vendor/jakub-onderka/php-console-highlighter/README.md
+++ /dev/null
@@ -1,42 +0,0 @@
-PHP Console Highlighter
-=======================
-
-Highlight PHP code in console (terminal).
-
-Example
--------
-
-
-Install
--------
-
-Just create a `composer.json` file and run the `php composer.phar install` command to install it:
-
-```json
-{
- "require": {
- "jakub-onderka/php-console-highlighter": "0.*"
- }
-}
-```
-
-Usage
--------
-```php
-getWholeFile($fileContent);
-```
-
-------
-
-[](https://packagist.org/packages/jakub-onderka/php-console-highlighter)
-[](https://travis-ci.org/JakubOnderka/PHP-Console-Highlighter)
-[](https://packagist.org/packages/jakub-onderka/php-console-highlighter)
diff --git a/vendor/jakub-onderka/php-console-highlighter/build.xml b/vendor/jakub-onderka/php-console-highlighter/build.xml
deleted file mode 100644
index d656ea9d4..000000000
--- a/vendor/jakub-onderka/php-console-highlighter/build.xml
+++ /dev/null
@@ -1,93 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/vendor/jakub-onderka/php-console-highlighter/composer.json b/vendor/jakub-onderka/php-console-highlighter/composer.json
deleted file mode 100644
index 21c29f710..000000000
--- a/vendor/jakub-onderka/php-console-highlighter/composer.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "name": "jakub-onderka/php-console-highlighter",
- "description": "Highlight PHP code in terminal",
- "type": "library",
- "license": "MIT",
- "authors": [
- {
- "name": "Jakub Onderka",
- "email": "acci@acci.cz",
- "homepage": "http://www.acci.cz/"
- }
- ],
- "autoload": {
- "psr-4": {"JakubOnderka\\PhpConsoleHighlighter\\": "src/"}
- },
- "require": {
- "php": ">=5.4.0",
- "ext-tokenizer": "*",
- "jakub-onderka/php-console-color": "~0.2"
- },
- "require-dev": {
- "phpunit/phpunit": "~4.0",
- "jakub-onderka/php-parallel-lint": "~1.0",
- "jakub-onderka/php-var-dump-check": "~0.1",
- "squizlabs/php_codesniffer": "~1.5",
- "jakub-onderka/php-code-style": "~1.0"
- }
-}
diff --git a/vendor/jakub-onderka/php-console-highlighter/examples/snippet.php b/vendor/jakub-onderka/php-console-highlighter/examples/snippet.php
deleted file mode 100644
index 1bf6ac3bd..000000000
--- a/vendor/jakub-onderka/php-console-highlighter/examples/snippet.php
+++ /dev/null
@@ -1,10 +0,0 @@
-getCodeSnippet($fileContent, 3);
\ No newline at end of file
diff --git a/vendor/jakub-onderka/php-console-highlighter/examples/whole_file.php b/vendor/jakub-onderka/php-console-highlighter/examples/whole_file.php
deleted file mode 100644
index 2a023d80a..000000000
--- a/vendor/jakub-onderka/php-console-highlighter/examples/whole_file.php
+++ /dev/null
@@ -1,10 +0,0 @@
-getWholeFile($fileContent);
\ No newline at end of file
diff --git a/vendor/jakub-onderka/php-console-highlighter/examples/whole_file_line_numbers.php b/vendor/jakub-onderka/php-console-highlighter/examples/whole_file_line_numbers.php
deleted file mode 100644
index f9178f2d1..000000000
--- a/vendor/jakub-onderka/php-console-highlighter/examples/whole_file_line_numbers.php
+++ /dev/null
@@ -1,10 +0,0 @@
-getWholeFileWithLineNumbers($fileContent);
\ No newline at end of file
diff --git a/vendor/jakub-onderka/php-console-highlighter/phpunit.xml b/vendor/jakub-onderka/php-console-highlighter/phpunit.xml
deleted file mode 100644
index 9c653a680..000000000
--- a/vendor/jakub-onderka/php-console-highlighter/phpunit.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
- tests
-
-
-
-
-
-
- vendor
-
-
-
diff --git a/vendor/jakub-onderka/php-console-highlighter/src/Highlighter.php b/vendor/jakub-onderka/php-console-highlighter/src/Highlighter.php
deleted file mode 100644
index 47ce30d2c..000000000
--- a/vendor/jakub-onderka/php-console-highlighter/src/Highlighter.php
+++ /dev/null
@@ -1,263 +0,0 @@
- 'red',
- self::TOKEN_COMMENT => 'yellow',
- self::TOKEN_KEYWORD => 'green',
- self::TOKEN_DEFAULT => 'default',
- self::TOKEN_HTML => 'cyan',
-
- self::ACTUAL_LINE_MARK => 'red',
- self::LINE_NUMBER => 'dark_gray',
- );
-
- /**
- * @param ConsoleColor $color
- * @throws \JakubOnderka\PhpConsoleColor\InvalidStyleException
- */
- public function __construct(ConsoleColor $color)
- {
- $this->color = $color;
-
- foreach ($this->defaultTheme as $name => $styles) {
- if (!$this->color->hasTheme($name)) {
- $this->color->addTheme($name, $styles);
- }
- }
- }
-
- /**
- * @param string $source
- * @param int $lineNumber
- * @param int $linesBefore
- * @param int $linesAfter
- * @return string
- * @throws \JakubOnderka\PhpConsoleColor\InvalidStyleException
- * @throws \InvalidArgumentException
- */
- public function getCodeSnippet($source, $lineNumber, $linesBefore = 2, $linesAfter = 2)
- {
- $tokenLines = $this->getHighlightedLines($source);
-
- $offset = $lineNumber - $linesBefore - 1;
- $offset = max($offset, 0);
- $length = $linesAfter + $linesBefore + 1;
- $tokenLines = array_slice($tokenLines, $offset, $length, $preserveKeys = true);
-
- $lines = $this->colorLines($tokenLines);
-
- return $this->lineNumbers($lines, $lineNumber);
- }
-
- /**
- * @param string $source
- * @return string
- * @throws \JakubOnderka\PhpConsoleColor\InvalidStyleException
- * @throws \InvalidArgumentException
- */
- public function getWholeFile($source)
- {
- $tokenLines = $this->getHighlightedLines($source);
- $lines = $this->colorLines($tokenLines);
- return implode(PHP_EOL, $lines);
- }
-
- /**
- * @param string $source
- * @return string
- * @throws \JakubOnderka\PhpConsoleColor\InvalidStyleException
- * @throws \InvalidArgumentException
- */
- public function getWholeFileWithLineNumbers($source)
- {
- $tokenLines = $this->getHighlightedLines($source);
- $lines = $this->colorLines($tokenLines);
- return $this->lineNumbers($lines);
- }
-
- /**
- * @param string $source
- * @return array
- */
- private function getHighlightedLines($source)
- {
- $source = str_replace(array("\r\n", "\r"), "\n", $source);
- $tokens = $this->tokenize($source);
- return $this->splitToLines($tokens);
- }
-
- /**
- * @param string $source
- * @return array
- */
- private function tokenize($source)
- {
- $tokens = token_get_all($source);
-
- $output = array();
- $currentType = null;
- $buffer = '';
-
- foreach ($tokens as $token) {
- if (is_array($token)) {
- switch ($token[0]) {
- case T_WHITESPACE:
- break;
-
- case T_OPEN_TAG:
- case T_OPEN_TAG_WITH_ECHO:
- case T_CLOSE_TAG:
- case T_STRING:
- case T_VARIABLE:
-
- // Constants
- case T_DIR:
- case T_FILE:
- case T_METHOD_C:
- case T_DNUMBER:
- case T_LNUMBER:
- case T_NS_C:
- case T_LINE:
- case T_CLASS_C:
- case T_FUNC_C:
- case T_TRAIT_C:
- $newType = self::TOKEN_DEFAULT;
- break;
-
- case T_COMMENT:
- case T_DOC_COMMENT:
- $newType = self::TOKEN_COMMENT;
- break;
-
- case T_ENCAPSED_AND_WHITESPACE:
- case T_CONSTANT_ENCAPSED_STRING:
- $newType = self::TOKEN_STRING;
- break;
-
- case T_INLINE_HTML:
- $newType = self::TOKEN_HTML;
- break;
-
- default:
- $newType = self::TOKEN_KEYWORD;
- }
- } else {
- $newType = $token === '"' ? self::TOKEN_STRING : self::TOKEN_KEYWORD;
- }
-
- if ($currentType === null) {
- $currentType = $newType;
- }
-
- if ($currentType !== $newType) {
- $output[] = array($currentType, $buffer);
- $buffer = '';
- $currentType = $newType;
- }
-
- $buffer .= is_array($token) ? $token[1] : $token;
- }
-
- if (isset($newType)) {
- $output[] = array($newType, $buffer);
- }
-
- return $output;
- }
-
- /**
- * @param array $tokens
- * @return array
- */
- private function splitToLines(array $tokens)
- {
- $lines = array();
-
- $line = array();
- foreach ($tokens as $token) {
- foreach (explode("\n", $token[1]) as $count => $tokenLine) {
- if ($count > 0) {
- $lines[] = $line;
- $line = array();
- }
-
- if ($tokenLine === '') {
- continue;
- }
-
- $line[] = array($token[0], $tokenLine);
- }
- }
-
- $lines[] = $line;
-
- return $lines;
- }
-
- /**
- * @param array $tokenLines
- * @return array
- * @throws \JakubOnderka\PhpConsoleColor\InvalidStyleException
- * @throws \InvalidArgumentException
- */
- private function colorLines(array $tokenLines)
- {
- $lines = array();
- foreach ($tokenLines as $lineCount => $tokenLine) {
- $line = '';
- foreach ($tokenLine as $token) {
- list($tokenType, $tokenValue) = $token;
- if ($this->color->hasTheme($tokenType)) {
- $line .= $this->color->apply($tokenType, $tokenValue);
- } else {
- $line .= $tokenValue;
- }
- }
- $lines[$lineCount] = $line;
- }
-
- return $lines;
- }
-
- /**
- * @param array $lines
- * @param null|int $markLine
- * @return string
- * @throws \JakubOnderka\PhpConsoleColor\InvalidStyleException
- */
- private function lineNumbers(array $lines, $markLine = null)
- {
- end($lines);
- $lineStrlen = strlen(key($lines) + 1);
-
- $snippet = '';
- foreach ($lines as $i => $line) {
- if ($markLine !== null) {
- $snippet .= ($markLine === $i + 1 ? $this->color->apply(self::ACTUAL_LINE_MARK, ' > ') : ' ');
- }
-
- $snippet .= $this->color->apply(self::LINE_NUMBER, str_pad($i + 1, $lineStrlen, ' ', STR_PAD_LEFT) . '| ');
- $snippet .= $line . PHP_EOL;
- }
-
- return $snippet;
- }
-}
\ No newline at end of file
diff --git a/vendor/jakub-onderka/php-console-highlighter/tests/HigligterTest.php b/vendor/jakub-onderka/php-console-highlighter/tests/HigligterTest.php
deleted file mode 100644
index 187beb67b..000000000
--- a/vendor/jakub-onderka/php-console-highlighter/tests/HigligterTest.php
+++ /dev/null
@@ -1,274 +0,0 @@
-createMock('\JakubOnderka\PhpConsoleColor\ConsoleColor')
- : $this->getMock('\JakubOnderka\PhpConsoleColor\ConsoleColor');
-
- $mock->expects($this->any())
- ->method('apply')
- ->will($this->returnCallback(function ($style, $text) {
- return "<$style>$text$style>";
- }));
-
- $mock->expects($this->any())
- ->method('hasTheme')
- ->will($this->returnValue(true));
-
- return $mock;
- }
-
- protected function setUp()
- {
- $this->uut = new Highlighter($this->getConsoleColorMock());
- }
-
- protected function compare($original, $expected)
- {
- $output = $this->uut->getWholeFile($original);
- $this->assertEquals($expected, $output);
- }
-
- public function testVariable()
- {
- $this->compare(
- <<
-echo \$a;
-EOL
- );
- }
-
- public function testInteger()
- {
- $this->compare(
- <<
-echo 43;
-EOL
- );
- }
-
- public function testFloat()
- {
- $this->compare(
- <<
-echo 43.3;
-EOL
- );
- }
-
- public function testHex()
- {
- $this->compare(
- <<
-echo 0x43;
-EOL
- );
- }
-
- public function testBasicFunction()
- {
- $this->compare(
- <<
-function plus(\$a, \$b) {
- return \$a + \$b;
-}
-EOL
- );
- }
-
- public function testStringNormal()
- {
- $this->compare(
- <<
-echo 'Ahoj světe';
-EOL
- );
- }
-
- public function testStringDouble()
- {
- $this->compare(
- <<
-echo "Ahoj světe";
-EOL
- );
- }
-
- public function testInstanceof()
- {
- $this->compare(
- <<
-\$a instanceof stdClass;
-EOL
- );
- }
-
- /*
- * Constants
- */
- public function testConstant()
- {
- $constants = array(
- '__FILE__',
- '__LINE__',
- '__CLASS__',
- '__FUNCTION__',
- '__METHOD__',
- '__TRAIT__',
- '__DIR__',
- '__NAMESPACE__'
- );
-
- foreach ($constants as $constant) {
- $this->compare(
- <<
-$constant;
-EOL
- );
- }
- }
-
- /*
- * Comments
- */
- public function testComment()
- {
- $this->compare(
- <<
-/* Ahoj */
-EOL
- );
- }
-
- public function testDocComment()
- {
- $this->compare(
- <<
-/** Ahoj */
-EOL
- );
- }
-
- public function testInlineComment()
- {
- $this->compare(
- <<
-// Ahoj
-EOL
- );
- }
-
- public function testHashComment()
- {
- $this->compare(
- <<
-# Ahoj
-EOL
- );
- }
-
- public function testEmpty()
- {
- $this->compare(
- ''
- ,
- ''
- );
- }
-
- public function testWhitespace()
- {
- $this->compare(
- ' '
- ,
- ''
- );
- }
-}
diff --git a/vendor/laravel/framework/README.md b/vendor/laravel/framework/README.md
index 581be1751..ef4bc1844 100644
--- a/vendor/laravel/framework/README.md
+++ b/vendor/laravel/framework/README.md
@@ -1,7 +1,7 @@
-
+
-
+
@@ -9,7 +9,7 @@
## About Laravel
-> **Note:** This repository contains the core code of the Laravel framework. If you want to build an application using Laravel 5, visit the main [Laravel repository](https://github.com/laravel/laravel).
+> **Note:** This repository contains the core code of the Laravel framework. If you want to build an application using Laravel, visit the main [Laravel repository](https://github.com/laravel/laravel).
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as:
@@ -34,7 +34,7 @@ Thank you for considering contributing to the Laravel framework! The contributio
## Code of Conduct
-In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](CODE_OF_CONDUCT.md).
+In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).
## Security Vulnerabilities
@@ -42,4 +42,4 @@ Please review [our security policy](https://github.com/laravel/framework/securit
## License
-The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
+The Laravel framework is open-sourced software licensed under the [MIT license](LICENSE.md).
diff --git a/vendor/laravel/framework/SECURITY.md b/vendor/laravel/framework/SECURITY.md
deleted file mode 100644
index 8325b1ea5..000000000
--- a/vendor/laravel/framework/SECURITY.md
+++ /dev/null
@@ -1,102 +0,0 @@
-# Security Policy
-
-**PLEASE DON'T DISCLOSE SECURITY-RELATED ISSUES PUBLICLY, [SEE BELOW](#reporting-a-vulnerability).**
-
-## Supported Versions
-
-Version | Security Fixes Until
---- | ---
-5.8 | February 26th, 2020
-5.7 | September 4th, 2019
-5.6 | February 7th, 2019
-5.5 (LTS) | August 30th, 2020
-5.4 | January 24th, 2018
-5.3 | August 23rd, 2017
-5.2 | December 21st, 2016
-5.1 (LTS) | June 9th, 2018
-5.0 | February 4th, 2016
-
-## Reporting a Vulnerability
-
-If you discover a security vulnerability within Laravel, please send an email to Taylor Otwell at taylor@laravel.com. All security vulnerabilities will be promptly addressed.
-
-### Public PGP Key
-
-```
------BEGIN PGP PUBLIC KEY BLOCK-----
-Version: OpenPGP v2.0.8
-Comment: https://sela.io/pgp/
-
-xsFNBFugFSQBEACxEKhIY9IoJzcouVTIYKJfWFGvwFgbRjQWBiH3QdHId5vCrbWo
-s2l+4Rv03gMG+yHLJ3rWElnNdRaNdQv59+lShrZF7Bvu7Zvc0mMNmFOM/mQ/K2Lt
-OK/8bh6iwNNbEuyOhNQlarEy/w8hF8Yf55hBeu/rajGtcyURJDloQ/vNzcx4RWGK
-G3CLr8ka7zPYIjIFUvHLt27mcYFF9F4/G7b4HKpn75ICKC4vPoQSaYNAHlHQBLFb
-Jg/WPl93SySHLugU5F58sICs+fBZadXYQG5dWmbaF5OWB1K2XgRs45BQaBzf/8oS
-qq0scN8wVhAdBeYlVFf0ImDOxGlZ2suLK1BKJboR6zCIkBAwufKss4NV1R9KSUMv
-YGn3mq13PGme0QoIkvQkua5VjTwWfQx7wFDxZ3VQSsjIlbVyRL/Ac/hq71eAmiIR
-t6ZMNMPFpuSwBfYimrXqqb4EOffrfsTzRenG1Cxm4jNZRzX/6P4an7F/euoqXeXZ
-h37TiC7df+eHKcBI4mL+qOW4ibBqg8WwWPJ+jvuhANyQpRVzf3NNEOwJYCNbQPM/
-PbqYvMruAH+gg7uyu9u0jX3o/yLSxJMV7kF4x/SCDuBKIxSSUI4cgbjIlnxWLXZC
-wl7KW4xAKkerO3wgIPnxNfxQoiYiEKA1c3PShWRA0wHIMt3rVRJxwGM4CwARAQAB
-zRJ0YXlsb3JAbGFyYXZlbC5jb23CwXAEEwEKABoFAlugFSQCGy8DCwkHAxUKCAIe
-AQIXgAIZAQAKCRDKAI7r/Ml7Zo0SD/9zwu9K87rbqXbvZ3TVu7TnN+z7mPvVBzl+
-SFEK360TYq8a4GosghZuGm4aNEyZ90CeUjPQwc5fHwa26tIwqgLRppsG21B/mZwu
-0m8c5RaBFRFX/mCTEjlpvBkOwMJZ8f05nNdaktq6W98DbMN03neUwnpWlNSLeoNI
-u4KYZmJopNFLEax5WGaaDpmqD1J+WDr/aPHx39MUAg2ZVuC3Gj/IjYZbD1nCh0xD
-a09uDODje8a9uG33cKRBcKKPRLZjWEt5SWReLx0vsTuqJSWhCybHRBl9BQTc/JJR
-gJu5V4X3f1IYMTNRm9GggxcXrlOAiDCjE2J8ZTUt0cSxedQFnNyGfKxe/l94oTFP
-wwFHbdKhsSDZ1OyxPNIY5OHlMfMvvJaNbOw0xPPAEutPwr1aqX9sbgPeeiJwAdyw
-mPw2x/wNQvKJITRv6atw56TtLxSevQIZGPHCYTSlsIoi9jqh9/6vfq2ruMDYItCq
-+8uzei6TyH6w+fUpp/uFmcwZdrDwgNVqW+Ptu+pD2WmthqESF8UEQVoOv7OPgA5E
-ofOMaeH2ND74r2UgcXjPxZuUp1RkhHE2jJeiuLtbvOgrWwv3KOaatyEbVl+zHA1e
-1RHdJRJRPK+S7YThxxduqfOBX7E03arbbhHdS1HKhPwMc2e0hNnQDoNxQcv0GQp4
-2Y6UyCRaus7ATQRboBUkAQgA0h5j3EO2HNvp8YuT1t/VF00uUwbQaz2LIoZogqgC
-14Eb77diuIPM9MnuG7bEOnNtPVMFXxI5UYBIlzhLMxf7pfbrsoR4lq7Ld+7KMzdm
-eREqJRgUNfjZhtRZ9Z+jiFPr8AGpYxwmJk4v387uQGh1GC9JCc3CCLJoI62I9t/1
-K2b25KiOzW/FVZ/vYFj1WbISRd5GqS8SEFh4ifU79LUlJ/nEsFv4JxAXN9RqjU0e
-H4S/m1Nb24UCtYAv1JKymcf5O0G7kOzvI0w06uKxk0hNwspjDcOebD8Vv9IdYtGl
-0bn7PpBlVO1Az3s8s6Xoyyw+9Us+VLNtVka3fcrdaV/n0wARAQABwsKEBBgBCgAP
-BQJboBUkBQkPCZwAAhsuASkJEMoAjuv8yXtmwF0gBBkBCgAGBQJboBUkAAoJEA1I
-8aTLtYHmjpIH/A1ZKwTGetHFokJxsd2omvbqv+VtpAjnUbvZEi5g3yZXn+dHJV+K
-UR/DNlfGxLWEcY6datJ3ziNzzD5u8zcPp2CqeTlCxOky8F74FjEL9tN/EqUbvvmR
-td2LXsSFjHnLJRK5lYfZ3rnjKA5AjqC9MttILBovY2rI7lyVt67kbS3hMHi8AZl8
-EgihnHRJxGZjEUxyTxcB13nhfjAvxQq58LOj5754Rpe9ePSKbT8DNMjHbGpLrESz
-cmyn0VzDMLfxg8AA9uQFMwdlKqve7yRZXzeqvy08AatUpJaL7DsS4LKOItwvBub6
-tHbCE3mqrUw5lSNyUahO3vOcMAHnF7fd4W++eA//WIQKnPX5t3CwCedKn8Qkb3Ow
-oj8xUNl2T6kEtQJnO85lKBFXaMOUykopu6uB9EEXEr0ShdunOKX/UdDbkv46F2AB
-7TtltDSLB6s/QeHExSb8Jo3qra86JkDUutWdJxV7DYFUttBga8I0GqdPu4yRRoc/
-0irVXsdDY9q7jz6l7fw8mSeJR96C0Puhk70t4M1Vg/tu/ONRarXQW7fJ8kl21PcD
-UKNWWa242gji/+GLRI8AIpGMsBiX7pHhqmMMth3u7+ne5BZGGJz0uX+CzWboOHyq
-kWgfY4a62t3hM0vwnUkl/D7VgSGy4LiKQrapd3LvU2uuEfFsMu3CDicZBRXPqoXj
-PBjkkPKhwUTNlwEQrGF3QsZhNe0M9ptM2fC34qtxZtMIMB2NLvE4S621rmQ05oQv
-sT0B9WgUL3GYRKdx700+ojHEuwZ79bcLgo1dezvkfPtu/++2CXtieFthDlWHy8x5
-XJJjI1pDfGO+BgX0rS3QrQEYlF/uPQynKwxe6cGI62eZ0ug0hNrPvKEcfMLVqBQv
-w4VH6iGp9yNKMUOgAECLCs4YCxK+Eka9Prq/Gh4wuqjWiX8m66z8YvKf27sFL3fR
-OwGaz3LsnRSxbk/8oSiZuOVLfn44XRcxsHebteZat23lwD93oq54rtKnlJgmZHJY
-4vMgk1jpS4laGnvhZj7OwE0EW6AVJAEIAKJSrUvXRyK3XQnLp3Kfj82uj0St8Dt2
-h8BMeVbrAbg38wCN8XQZzVR9+bRZRR+aCzpKSqwhEQVtH7gdKgfdNdGNhG2DFAVk
-SihMhQz190FKttUZgwY00enzD7uaaA5VwNAZzRIr8skwiASB7UoO+lIhrAYgcQCA
-LpwCSMrUNB3gY1IVa2xi9FljEbS2uMABfOsTfl7z4L4T4DRv/ovDf+ihyZOXsXiH
-RVoUTIpN8ZILCZiiKubE1sMj4fSQwCs06UyDy17HbOG5/dO9awR/LHW53O3nZCxE
-JbCqr5iHa2MdHMC12+luxWJKD9DbVB01LiiPZCTkuKUDswCyi7otpVEAEQEAAcLC
-hAQYAQoADwUCW6AVJAUJDwmcAAIbLgEpCRDKAI7r/Ml7ZsBdIAQZAQoABgUCW6AV
-JAAKCRDxrCjKN7eORjt2B/9EnKVJ9lwB1JwXcQp6bZgJ21r6ghyXBssv24N9UF+v
-5QDz/tuSkTsKK1UoBrBDEinF/xTP2z+xXIeyP4c3mthMHsYdMl7AaGpcCwVJiL62
-fZvd+AiYNX3C+Bepwnwoziyhx4uPaqoezSEMD8G2WQftt6Gqttmm0Di5RVysCECF
-EyhkHwvCcbpXb5Qq+4XFzCUyaIZuGpe+oeO7U8B1CzOC16hEUu0Uhbk09Xt6dSbS
-ZERoxFjrGU+6bk424MkZkKvNS8FdTN2s3kQuHoNmhbMY+fRzKX5JNrcQ4dQQufiB
-zFcc2Ba0JVU0nYAMftTeT5ALakhwSqr3AcdD2avJZp3EYfYP/3smPGTeg1cDJV3E
-WIlCtSlhbwviUjvWEWJUE+n9MjhoUNU0TJtHIliUYUajKMG/At5wJZTXJaKVUx32
-UCWr4ioKfSzlbp1ngBuFlvU7LgZRcKbBZWvKj/KRYpxpfvPyPElmegCjAk6oiZYV
-LOV+jFfnMkk9PnR91ZZfTNx/bK+BwjOnO+g7oE8V2g2bA90vHdeSUHR52SnaVN/b
-9ytt07R0f+YtyKojuPmlNsbyAaUYUtJ1o+XNCwdVxzarYEuUabhAfDiVTu9n8wTr
-YVvnriSFOjNvOY9wdLAa56n7/qM8bzuGpoBS5SilXgJvITvQfWPvg7I9C3QhwK1S
-F6B1uquQGbBSze2wlnMbKXmhyGLlv9XpOqpkkejQo3o58B+Sqj4B8DuYixSjoknr
-pRbj8gqgqBKlcpf1wD5X9qCrl9vq19asVOHaKhiFZGxZIVbBpBOdvAKaMj4p/uln
-yklN3YFIfgmGPYbL0elvXVn7XfvwSV1mCQV5LtMbLHsFf0VsA16UsG8A/tLWtwgt
-0antzftRHXb+DI4qr+qEYKFkv9F3oCOXyH4QBhPA42EzKqhMXByEkEK9bu6skioL
-mHhDQ7yHjTWcxstqQjkUQ0T/IF9ls+Sm5u7rVXEifpyI7MCb+76kSCDawesvInKt
-WBGOG/qJGDlNiqBYYt2xNqzHCJoC
-=zXOv
------END PGP PUBLIC KEY BLOCK-----
-```
diff --git a/vendor/laravel/framework/composer.json b/vendor/laravel/framework/composer.json
index 292998b85..dea51b9ab 100644
--- a/vendor/laravel/framework/composer.json
+++ b/vendor/laravel/framework/composer.json
@@ -15,32 +15,35 @@
}
],
"require": {
- "php": "^7.1.3",
+ "php": "^7.2.5|^8.0",
"ext-json": "*",
"ext-mbstring": "*",
"ext-openssl": "*",
- "doctrine/inflector": "^1.1",
- "dragonmantank/cron-expression": "^2.0",
- "egulias/email-validator": "^2.0",
- "erusev/parsedown": "^1.7",
- "league/flysystem": "^1.0.8",
- "monolog/monolog": "^1.12",
- "nesbot/carbon": "^1.26.3 || ^2.0",
- "opis/closure": "^3.1",
+ "doctrine/inflector": "^1.4|^2.0",
+ "dragonmantank/cron-expression": "^2.3.1",
+ "egulias/email-validator": "^2.1.10",
+ "league/commonmark": "^1.3",
+ "league/flysystem": "^1.1",
+ "monolog/monolog": "^2.0",
+ "nesbot/carbon": "^2.31",
+ "opis/closure": "^3.6",
"psr/container": "^1.0",
"psr/simple-cache": "^1.0",
- "ramsey/uuid": "^3.7",
+ "ramsey/uuid": "^3.7|^4.0",
"swiftmailer/swiftmailer": "^6.0",
- "symfony/console": "^4.2",
- "symfony/debug": "^4.2",
- "symfony/finder": "^4.2",
- "symfony/http-foundation": "^4.2",
- "symfony/http-kernel": "^4.2",
- "symfony/process": "^4.2",
- "symfony/routing": "^4.2",
- "symfony/var-dumper": "^4.2",
- "tijsverkoyen/css-to-inline-styles": "^2.2.1",
- "vlucas/phpdotenv": "^3.3"
+ "symfony/console": "^5.0",
+ "symfony/error-handler": "^5.0",
+ "symfony/finder": "^5.0",
+ "symfony/http-foundation": "^5.0",
+ "symfony/http-kernel": "^5.0",
+ "symfony/mime": "^5.0",
+ "symfony/polyfill-php73": "^1.17",
+ "symfony/process": "^5.0",
+ "symfony/routing": "^5.0",
+ "symfony/var-dumper": "^5.0",
+ "tijsverkoyen/css-to-inline-styles": "^2.2.2",
+ "vlucas/phpdotenv": "^4.0",
+ "voku/portable-ascii": "^1.4.8"
},
"replace": {
"illuminate/auth": "self.version",
@@ -68,29 +71,31 @@
"illuminate/routing": "self.version",
"illuminate/session": "self.version",
"illuminate/support": "self.version",
+ "illuminate/testing": "self.version",
"illuminate/translation": "self.version",
"illuminate/validation": "self.version",
"illuminate/view": "self.version"
},
+ "require-dev": {
+ "aws/aws-sdk-php": "^3.155",
+ "doctrine/dbal": "^2.6",
+ "filp/whoops": "^2.8",
+ "guzzlehttp/guzzle": "^6.3.1|^7.0.1",
+ "league/flysystem-cached-adapter": "^1.0",
+ "mockery/mockery": "~1.3.3|^1.4.2",
+ "moontoast/math": "^1.1",
+ "orchestra/testbench-core": "^5.8",
+ "pda/pheanstalk": "^4.0",
+ "phpunit/phpunit": "^8.4|^9.3.3",
+ "predis/predis": "^1.1.1",
+ "symfony/cache": "^5.0"
+ },
+ "provide": {
+ "psr/container-implementation": "1.0"
+ },
"conflict": {
"tightenco/collect": "<5.5.33"
},
- "require-dev": {
- "aws/aws-sdk-php": "^3.0",
- "doctrine/dbal": "^2.6",
- "filp/whoops": "^2.1.4",
- "guzzlehttp/guzzle": "^6.3",
- "league/flysystem-cached-adapter": "^1.0",
- "mockery/mockery": "^1.0",
- "moontoast/math": "^1.1",
- "orchestra/testbench-core": "3.8.*",
- "pda/pheanstalk": "^4.0",
- "phpunit/phpunit": "^7.5|^8.0",
- "predis/predis": "^1.1.1",
- "symfony/css-selector": "^4.2",
- "symfony/dom-crawler": "^4.2",
- "true/punycode": "^2.1"
- },
"autoload": {
"files": [
"src/Illuminate/Foundation/helpers.php",
@@ -110,31 +115,36 @@
},
"extra": {
"branch-alias": {
- "dev-master": "5.8-dev"
+ "dev-master": "7.x-dev"
}
},
"suggest": {
+ "ext-ftp": "Required to use the Flysystem FTP driver.",
"ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image().",
+ "ext-memcached": "Required to use the memcache cache driver.",
"ext-pcntl": "Required to use all features of the queue worker.",
"ext-posix": "Required to use all features of the queue worker.",
- "aws/aws-sdk-php": "Required to use the SQS queue driver and SES mail driver (^3.0).",
+ "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).",
+ "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.155).",
"doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.6).",
- "filp/whoops": "Required for friendly error pages in development (^2.1.4).",
- "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).",
+ "filp/whoops": "Required for friendly error pages in development (^2.8).",
+ "fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).",
+ "guzzlehttp/guzzle": "Required to use the HTTP Client, Mailgun mail driver and the ping methods on schedules (^6.3.1|^7.0.1).",
+ "laravel/tinker": "Required to use the tinker console command (^2.0).",
"league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^1.0).",
"league/flysystem-cached-adapter": "Required to use the Flysystem cache (^1.0).",
- "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (^1.0).",
"league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0).",
+ "mockery/mockery": "Required to use mocking (~1.3.3|^1.4.2).",
"moontoast/math": "Required to use ordered UUIDs (^1.1).",
- "nexmo/client": "Required to use the Nexmo transport (^1.0).",
+ "nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).",
"pda/pheanstalk": "Required to use the beanstalk queue driver (^4.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 (^3.0).",
- "symfony/css-selector": "Required to use some of the crawler integration testing tools (^4.2).",
- "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (^4.2).",
- "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^1.1).",
+ "phpunit/phpunit": "Required to use assertions and run tests (^8.4|^9.3.3).",
+ "predis/predis": "Required to use the predis connector (^1.1.2).",
+ "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).",
+ "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^4.0).",
+ "symfony/cache": "Required to PSR-6 cache bridge (^5.0).",
+ "symfony/filesystem": "Required to create relative storage directory symbolic links (^5.0).",
+ "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^2.0).",
"wildbit/swiftmailer-postmark": "Required to use Postmark mail driver (^3.0)."
},
"config": {
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Access/AuthorizationException.php b/vendor/laravel/framework/src/Illuminate/Auth/Access/AuthorizationException.php
index dc0753e28..7fe6ceba9 100644
--- a/vendor/laravel/framework/src/Illuminate/Auth/Access/AuthorizationException.php
+++ b/vendor/laravel/framework/src/Illuminate/Auth/Access/AuthorizationException.php
@@ -3,8 +3,62 @@
namespace Illuminate\Auth\Access;
use Exception;
+use Throwable;
class AuthorizationException extends Exception
{
- //
+ /**
+ * The response from the gate.
+ *
+ * @var \Illuminate\Auth\Access\Response
+ */
+ protected $response;
+
+ /**
+ * Create a new authorization exception instance.
+ *
+ * @param string|null $message
+ * @param mixed $code
+ * @param \Throwable|null $previous
+ * @return void
+ */
+ public function __construct($message = null, $code = null, Throwable $previous = null)
+ {
+ parent::__construct($message ?? 'This action is unauthorized.', 0, $previous);
+
+ $this->code = $code ?: 0;
+ }
+
+ /**
+ * Get the response from the gate.
+ *
+ * @return \Illuminate\Auth\Access\Response
+ */
+ public function response()
+ {
+ return $this->response;
+ }
+
+ /**
+ * Set the response from the gate.
+ *
+ * @param \Illuminate\Auth\Access\Response $response
+ * @return $this
+ */
+ public function setResponse($response)
+ {
+ $this->response = $response;
+
+ return $this;
+ }
+
+ /**
+ * Create a deny response object from this exception.
+ *
+ * @return \Illuminate\Auth\Access\Response
+ */
+ public function toResponse()
+ {
+ return Response::deny($this->message, $this->code);
+ }
}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Access/Gate.php b/vendor/laravel/framework/src/Illuminate/Auth/Access/Gate.php
index e0b83dca6..8c955b462 100644
--- a/vendor/laravel/framework/src/Illuminate/Auth/Access/Gate.php
+++ b/vendor/laravel/framework/src/Illuminate/Auth/Access/Gate.php
@@ -3,13 +3,13 @@
namespace Illuminate\Auth\Access;
use Exception;
-use ReflectionClass;
-use ReflectionFunction;
+use Illuminate\Contracts\Auth\Access\Gate as GateContract;
+use Illuminate\Contracts\Container\Container;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
use InvalidArgumentException;
-use Illuminate\Contracts\Container\Container;
-use Illuminate\Contracts\Auth\Access\Gate as GateContract;
+use ReflectionClass;
+use ReflectionFunction;
class Gate implements GateContract
{
@@ -126,6 +126,10 @@ class Gate implements GateContract
*/
public function define($ability, $callback)
{
+ if (is_array($callback) && isset($callback[0]) && is_string($callback[0])) {
+ $callback = $callback[0].'@'.$callback[1];
+ }
+
if (is_callable($callback)) {
$this->abilities[$ability] = $callback;
} elseif (is_string($callback)) {
@@ -144,7 +148,7 @@ class Gate implements GateContract
*
* @param string $name
* @param string $class
- * @param array|null $abilities
+ * @param array|null $abilities
* @return $this
*/
public function resource($name, $class, array $abilities = null)
@@ -274,11 +278,7 @@ class Gate implements GateContract
public function check($abilities, $arguments = [])
{
return collect($abilities)->every(function ($ability) use ($arguments) {
- try {
- return (bool) $this->raw($ability, $arguments);
- } catch (AuthorizationException $e) {
- return false;
- }
+ return $this->inspect($ability, $arguments)->allowed();
});
}
@@ -319,13 +319,29 @@ class Gate implements GateContract
*/
public function authorize($ability, $arguments = [])
{
- $result = $this->raw($ability, $arguments);
+ return $this->inspect($ability, $arguments)->authorize();
+ }
- if ($result instanceof Response) {
- return $result;
+ /**
+ * Inspect the user for the given ability.
+ *
+ * @param string $ability
+ * @param array|mixed $arguments
+ * @return \Illuminate\Auth\Access\Response
+ */
+ public function inspect($ability, $arguments = [])
+ {
+ try {
+ $result = $this->raw($ability, $arguments);
+
+ if ($result instanceof Response) {
+ return $result;
+ }
+
+ return $result ? Response::allow() : Response::deny();
+ } catch (AuthorizationException $e) {
+ return $e->toResponse();
}
-
- return $result ? $this->allow() : $this->deny();
}
/**
@@ -334,6 +350,8 @@ class Gate implements GateContract
* @param string $ability
* @param array|mixed $arguments
* @return mixed
+ *
+ * @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function raw($ability, $arguments = [])
{
@@ -365,7 +383,7 @@ class Gate implements GateContract
*
* @param \Illuminate\Contracts\Auth\Authenticatable|null $user
* @param \Closure|string|array $class
- * @param string|null $method
+ * @param string|null $method
* @return bool
*/
protected function canBeCalledWithUser($user, $class, $method = null)
@@ -436,7 +454,7 @@ class Gate implements GateContract
*/
protected function parameterAllowsGuests($parameter)
{
- return ($parameter->getClass() && $parameter->allowsNull()) ||
+ return ($parameter->hasType() && $parameter->allowsNull()) ||
($parameter->isDefaultValueAvailable() && is_null($parameter->getDefaultValue()));
}
@@ -530,6 +548,7 @@ class Gate implements GateContract
}
return function () {
+ //
};
}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Access/HandlesAuthorization.php b/vendor/laravel/framework/src/Illuminate/Auth/Access/HandlesAuthorization.php
index 1a597bb99..66e5786e3 100644
--- a/vendor/laravel/framework/src/Illuminate/Auth/Access/HandlesAuthorization.php
+++ b/vendor/laravel/framework/src/Illuminate/Auth/Access/HandlesAuthorization.php
@@ -8,23 +8,23 @@ trait HandlesAuthorization
* Create a new access response.
*
* @param string|null $message
+ * @param mixed $code
* @return \Illuminate\Auth\Access\Response
*/
- protected function allow($message = null)
+ protected function allow($message = null, $code = null)
{
- return new Response($message);
+ return Response::allow($message, $code);
}
/**
* Throws an unauthorized exception.
*
- * @param string $message
- * @return void
- *
- * @throws \Illuminate\Auth\Access\AuthorizationException
+ * @param string|null $message
+ * @param mixed|null $code
+ * @return \Illuminate\Auth\Access\Response
*/
- protected function deny($message = 'This action is unauthorized.')
+ protected function deny($message = null, $code = null)
{
- throw new AuthorizationException($message);
+ return Response::deny($message, $code);
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Access/Response.php b/vendor/laravel/framework/src/Illuminate/Auth/Access/Response.php
index 7fab01efc..ab5edf39f 100644
--- a/vendor/laravel/framework/src/Illuminate/Auth/Access/Response.php
+++ b/vendor/laravel/framework/src/Illuminate/Auth/Access/Response.php
@@ -2,8 +2,17 @@
namespace Illuminate\Auth\Access;
-class Response
+use Illuminate\Contracts\Support\Arrayable;
+
+class Response implements Arrayable
{
+ /**
+ * Indicates whether the response was allowed.
+ *
+ * @var bool
+ */
+ protected $allowed;
+
/**
* The response message.
*
@@ -11,17 +20,72 @@ class Response
*/
protected $message;
+ /**
+ * The response code.
+ *
+ * @var mixed
+ */
+ protected $code;
+
/**
* Create a new response.
*
- * @param string|null $message
+ * @param bool $allowed
+ * @param string $message
+ * @param mixed $code
* @return void
*/
- public function __construct($message = null)
+ public function __construct($allowed, $message = '', $code = null)
{
+ $this->code = $code;
+ $this->allowed = $allowed;
$this->message = $message;
}
+ /**
+ * Create a new "allow" Response.
+ *
+ * @param string|null $message
+ * @param mixed $code
+ * @return \Illuminate\Auth\Access\Response
+ */
+ public static function allow($message = null, $code = null)
+ {
+ return new static(true, $message, $code);
+ }
+
+ /**
+ * Create a new "deny" Response.
+ *
+ * @param string|null $message
+ * @param mixed $code
+ * @return \Illuminate\Auth\Access\Response
+ */
+ public static function deny($message = null, $code = null)
+ {
+ return new static(false, $message, $code);
+ }
+
+ /**
+ * Determine if the response was allowed.
+ *
+ * @return bool
+ */
+ public function allowed()
+ {
+ return $this->allowed;
+ }
+
+ /**
+ * Determine if the response was denied.
+ *
+ * @return bool
+ */
+ public function denied()
+ {
+ return ! $this->allowed();
+ }
+
/**
* Get the response message.
*
@@ -32,6 +96,47 @@ class Response
return $this->message;
}
+ /**
+ * Get the response code / reason.
+ *
+ * @return mixed
+ */
+ public function code()
+ {
+ return $this->code;
+ }
+
+ /**
+ * Throw authorization exception if response was denied.
+ *
+ * @return \Illuminate\Auth\Access\Response
+ *
+ * @throws \Illuminate\Auth\Access\AuthorizationException
+ */
+ public function authorize()
+ {
+ if ($this->denied()) {
+ throw (new AuthorizationException($this->message(), $this->code()))
+ ->setResponse($this);
+ }
+
+ return $this;
+ }
+
+ /**
+ * Convert the response to an array.
+ *
+ * @return array
+ */
+ public function toArray()
+ {
+ return [
+ 'allowed' => $this->allowed(),
+ 'message' => $this->message(),
+ 'code' => $this->code(),
+ ];
+ }
+
/**
* Get the string representation of the message.
*
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/AuthManager.php b/vendor/laravel/framework/src/Illuminate/Auth/AuthManager.php
index 5cd29f17c..ebbd7f5f1 100755
--- a/vendor/laravel/framework/src/Illuminate/Auth/AuthManager.php
+++ b/vendor/laravel/framework/src/Illuminate/Auth/AuthManager.php
@@ -3,8 +3,8 @@
namespace Illuminate\Auth;
use Closure;
-use InvalidArgumentException;
use Illuminate\Contracts\Auth\Factory as FactoryContract;
+use InvalidArgumentException;
class AuthManager implements FactoryContract
{
@@ -285,6 +285,16 @@ class AuthManager implements FactoryContract
return $this;
}
+ /**
+ * Determines if any guards have already been resolved.
+ *
+ * @return bool
+ */
+ public function hasResolvedGuards()
+ {
+ return count($this->guards) > 0;
+ }
+
/**
* Dynamically call the default driver instance.
*
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/AuthServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Auth/AuthServiceProvider.php
index dfc554b27..7a6b41212 100755
--- a/vendor/laravel/framework/src/Illuminate/Auth/AuthServiceProvider.php
+++ b/vendor/laravel/framework/src/Illuminate/Auth/AuthServiceProvider.php
@@ -3,9 +3,12 @@
namespace Illuminate\Auth;
use Illuminate\Auth\Access\Gate;
-use Illuminate\Support\ServiceProvider;
+use Illuminate\Auth\Middleware\RequirePassword;
use Illuminate\Contracts\Auth\Access\Gate as GateContract;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
+use Illuminate\Contracts\Routing\ResponseFactory;
+use Illuminate\Contracts\Routing\UrlGenerator;
+use Illuminate\Support\ServiceProvider;
class AuthServiceProvider extends ServiceProvider
{
@@ -19,6 +22,7 @@ class AuthServiceProvider extends ServiceProvider
$this->registerAuthenticator();
$this->registerUserResolver();
$this->registerAccessGate();
+ $this->registerRequirePassword();
$this->registerRequestRebindHandler();
$this->registerEventRebindHandler();
}
@@ -72,6 +76,24 @@ class AuthServiceProvider extends ServiceProvider
});
}
+ /**
+ * Register a resolver for the authenticated user.
+ *
+ * @return void
+ */
+ protected function registerRequirePassword()
+ {
+ $this->app->bind(
+ RequirePassword::class, function ($app) {
+ return new RequirePassword(
+ $app[ResponseFactory::class],
+ $app[UrlGenerator::class],
+ $app['config']->get('auth.password_timeout')
+ );
+ }
+ );
+ }
+
/**
* Handle the re-binding of the request binding.
*
@@ -98,6 +120,10 @@ class AuthServiceProvider extends ServiceProvider
return;
}
+ if ($app['auth']->hasResolvedGuards() === false) {
+ return;
+ }
+
if (method_exists($guard = $app['auth']->guard(), 'setDispatcher')) {
$guard->setDispatcher($dispatcher);
}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Console/AuthMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Auth/Console/AuthMakeCommand.php
deleted file mode 100644
index 5214a5cf6..000000000
--- a/vendor/laravel/framework/src/Illuminate/Auth/Console/AuthMakeCommand.php
+++ /dev/null
@@ -1,133 +0,0 @@
- 'auth/login.blade.php',
- 'auth/register.stub' => 'auth/register.blade.php',
- 'auth/verify.stub' => 'auth/verify.blade.php',
- 'auth/passwords/email.stub' => 'auth/passwords/email.blade.php',
- 'auth/passwords/reset.stub' => 'auth/passwords/reset.blade.php',
- 'layouts/app.stub' => 'layouts/app.blade.php',
- 'home.stub' => 'home.blade.php',
- ];
-
- /**
- * Execute the console command.
- *
- * @return void
- */
- public function handle()
- {
- $this->createDirectories();
-
- $this->exportViews();
-
- if (! $this->option('views')) {
- file_put_contents(
- app_path('Http/Controllers/HomeController.php'),
- $this->compileControllerStub()
- );
-
- file_put_contents(
- base_path('routes/web.php'),
- file_get_contents(__DIR__.'/stubs/make/routes.stub'),
- FILE_APPEND
- );
- }
-
- $this->info('Authentication scaffolding generated successfully.');
- }
-
- /**
- * Create the directories for the files.
- *
- * @return void
- */
- protected function createDirectories()
- {
- if (! is_dir($directory = $this->getViewPath('layouts'))) {
- mkdir($directory, 0755, true);
- }
-
- if (! is_dir($directory = $this->getViewPath('auth/passwords'))) {
- mkdir($directory, 0755, true);
- }
- }
-
- /**
- * Export the authentication views.
- *
- * @return void
- */
- protected function exportViews()
- {
- foreach ($this->views as $key => $value) {
- if (file_exists($view = $this->getViewPath($value)) && ! $this->option('force')) {
- if (! $this->confirm("The [{$value}] view already exists. Do you want to replace it?")) {
- continue;
- }
- }
-
- copy(
- __DIR__.'/stubs/make/views/'.$key,
- $view
- );
- }
- }
-
- /**
- * Compiles the HomeController stub.
- *
- * @return string
- */
- protected function compileControllerStub()
- {
- return str_replace(
- '{{namespace}}',
- $this->getAppNamespace(),
- file_get_contents(__DIR__.'/stubs/make/controllers/HomeController.stub')
- );
- }
-
- /**
- * Get full view path relative to the app's configured view path.
- *
- * @param string $path
- * @return string
- */
- protected function getViewPath($path)
- {
- return implode(DIRECTORY_SEPARATOR, [
- config('view.paths')[0] ?? resource_path('views'), $path,
- ]);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/views/auth/verify.stub b/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/views/auth/verify.stub
deleted file mode 100644
index c742cb4bd..000000000
--- a/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/views/auth/verify.stub
+++ /dev/null
@@ -1,24 +0,0 @@
-@extends('layouts.app')
-
-@section('content')
-
-
-
-
-
{{ __('Verify Your Email Address') }}
-
-
- @if (session('resent'))
-
- {{ __('A fresh verification link has been sent to your email address.') }}
-
- @endif
-
- {{ __('Before proceeding, please check your email for a verification link.') }}
- {{ __('If you did not receive the email') }}, {{ __('click here to request another') }}.
-
-
-
-
-
-@endsection
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/CreatesUserProviders.php b/vendor/laravel/framework/src/Illuminate/Auth/CreatesUserProviders.php
index 46416b5e3..c2135f713 100644
--- a/vendor/laravel/framework/src/Illuminate/Auth/CreatesUserProviders.php
+++ b/vendor/laravel/framework/src/Illuminate/Auth/CreatesUserProviders.php
@@ -66,7 +66,7 @@ trait CreatesUserProviders
*/
protected function createDatabaseProvider($config)
{
- $connection = $this->app['db']->connection();
+ $connection = $this->app['db']->connection($config['connection'] ?? null);
return new DatabaseUserProvider($connection, $this->app['hash'], $config['table']);
}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/DatabaseUserProvider.php b/vendor/laravel/framework/src/Illuminate/Auth/DatabaseUserProvider.php
index f8005b7d1..8aa563d82 100755
--- a/vendor/laravel/framework/src/Illuminate/Auth/DatabaseUserProvider.php
+++ b/vendor/laravel/framework/src/Illuminate/Auth/DatabaseUserProvider.php
@@ -2,12 +2,12 @@
namespace Illuminate\Auth;
-use Illuminate\Support\Str;
+use Illuminate\Contracts\Auth\Authenticatable as UserContract;
use Illuminate\Contracts\Auth\UserProvider;
+use Illuminate\Contracts\Hashing\Hasher as HasherContract;
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Database\ConnectionInterface;
-use Illuminate\Contracts\Hashing\Hasher as HasherContract;
-use Illuminate\Contracts\Auth\Authenticatable as UserContract;
+use Illuminate\Support\Str;
class DatabaseUserProvider implements UserProvider
{
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/EloquentUserProvider.php b/vendor/laravel/framework/src/Illuminate/Auth/EloquentUserProvider.php
index 5fdf8a1eb..f175298ce 100755
--- a/vendor/laravel/framework/src/Illuminate/Auth/EloquentUserProvider.php
+++ b/vendor/laravel/framework/src/Illuminate/Auth/EloquentUserProvider.php
@@ -2,11 +2,11 @@
namespace Illuminate\Auth;
-use Illuminate\Support\Str;
-use Illuminate\Contracts\Auth\UserProvider;
-use Illuminate\Contracts\Support\Arrayable;
-use Illuminate\Contracts\Hashing\Hasher as HasherContract;
use Illuminate\Contracts\Auth\Authenticatable as UserContract;
+use Illuminate\Contracts\Auth\UserProvider;
+use Illuminate\Contracts\Hashing\Hasher as HasherContract;
+use Illuminate\Contracts\Support\Arrayable;
+use Illuminate\Support\Str;
class EloquentUserProvider implements UserProvider
{
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Events/CurrentDeviceLogout.php b/vendor/laravel/framework/src/Illuminate/Auth/Events/CurrentDeviceLogout.php
new file mode 100644
index 000000000..32d31faf6
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Auth/Events/CurrentDeviceLogout.php
@@ -0,0 +1,37 @@
+user = $user;
+ $this->guard = $guard;
+ }
+}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Events/Login.php b/vendor/laravel/framework/src/Illuminate/Auth/Events/Login.php
index 3005183a9..87a399eab 100644
--- a/vendor/laravel/framework/src/Illuminate/Auth/Events/Login.php
+++ b/vendor/laravel/framework/src/Illuminate/Auth/Events/Login.php
@@ -32,7 +32,7 @@ class Login
/**
* Create a new event instance.
*
- * @param string $guard
+ * @param string $guard
* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @param bool $remember
* @return void
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Events/Logout.php b/vendor/laravel/framework/src/Illuminate/Auth/Events/Logout.php
index bc8c39400..c47341dc5 100644
--- a/vendor/laravel/framework/src/Illuminate/Auth/Events/Logout.php
+++ b/vendor/laravel/framework/src/Illuminate/Auth/Events/Logout.php
@@ -25,7 +25,7 @@ class Logout
/**
* Create a new event instance.
*
- * @param string $guard
+ * @param string $guard
* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @return void
*/
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Events/Validated.php b/vendor/laravel/framework/src/Illuminate/Auth/Events/Validated.php
new file mode 100644
index 000000000..ebc3b2ce1
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Auth/Events/Validated.php
@@ -0,0 +1,37 @@
+user = $user;
+ $this->guard = $guard;
+ }
+}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/GenericUser.php b/vendor/laravel/framework/src/Illuminate/Auth/GenericUser.php
index b6880c0ca..c87bc2382 100755
--- a/vendor/laravel/framework/src/Illuminate/Auth/GenericUser.php
+++ b/vendor/laravel/framework/src/Illuminate/Auth/GenericUser.php
@@ -41,9 +41,7 @@ class GenericUser implements UserContract
*/
public function getAuthIdentifier()
{
- $name = $this->getAuthIdentifierName();
-
- return $this->attributes[$name];
+ return $this->attributes[$this->getAuthIdentifierName()];
}
/**
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/GuardHelpers.php b/vendor/laravel/framework/src/Illuminate/Auth/GuardHelpers.php
index 8bfa77a0e..4d5328c6b 100644
--- a/vendor/laravel/framework/src/Illuminate/Auth/GuardHelpers.php
+++ b/vendor/laravel/framework/src/Illuminate/Auth/GuardHelpers.php
@@ -2,8 +2,8 @@
namespace Illuminate\Auth;
-use Illuminate\Contracts\Auth\UserProvider;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
+use Illuminate\Contracts\Auth\UserProvider;
/**
* These methods are typically the same across all guards.
@@ -73,7 +73,7 @@ trait GuardHelpers
/**
* Get the ID for the currently authenticated user.
*
- * @return int|null
+ * @return int|string|null
*/
public function id()
{
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php b/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php
index 98b9bc67e..7eda342d3 100644
--- a/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php
+++ b/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php
@@ -5,8 +5,9 @@ namespace Illuminate\Auth\Middleware;
use Closure;
use Illuminate\Auth\AuthenticationException;
use Illuminate\Contracts\Auth\Factory as Auth;
+use Illuminate\Contracts\Auth\Middleware\AuthenticatesRequests;
-class Authenticate
+class Authenticate implements AuthenticatesRequests
{
/**
* The authentication factory instance.
@@ -64,6 +65,20 @@ class Authenticate
}
}
+ $this->unauthenticated($request, $guards);
+ }
+
+ /**
+ * Handle an unauthenticated user.
+ *
+ * @param \Illuminate\Http\Request $request
+ * @param array $guards
+ * @return void
+ *
+ * @throws \Illuminate\Auth\AuthenticationException
+ */
+ protected function unauthenticated($request, array $guards)
+ {
throw new AuthenticationException(
'Unauthenticated.', $guards, $this->redirectTo($request)
);
@@ -73,7 +88,7 @@ class Authenticate
* Get the path the user should be redirected to when they are not authenticated.
*
* @param \Illuminate\Http\Request $request
- * @return string
+ * @return string|null
*/
protected function redirectTo($request)
{
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authorize.php b/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authorize.php
index 00d8c9549..aea9801dd 100644
--- a/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authorize.php
+++ b/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authorize.php
@@ -3,8 +3,8 @@
namespace Illuminate\Auth\Middleware;
use Closure;
-use Illuminate\Database\Eloquent\Model;
use Illuminate\Contracts\Auth\Access\Gate;
+use Illuminate\Database\Eloquent\Model;
class Authorize
{
@@ -50,7 +50,7 @@ class Authorize
*
* @param \Illuminate\Http\Request $request
* @param array|null $models
- * @return array|string|\Illuminate\Database\Eloquent\Model
+ * @return \Illuminate\Database\Eloquent\Model|array|string
*/
protected function getGateArguments($request, $models)
{
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Middleware/EnsureEmailIsVerified.php b/vendor/laravel/framework/src/Illuminate/Auth/Middleware/EnsureEmailIsVerified.php
index cec17c607..1f73e576a 100644
--- a/vendor/laravel/framework/src/Illuminate/Auth/Middleware/EnsureEmailIsVerified.php
+++ b/vendor/laravel/framework/src/Illuminate/Auth/Middleware/EnsureEmailIsVerified.php
@@ -3,8 +3,8 @@
namespace Illuminate\Auth\Middleware;
use Closure;
-use Illuminate\Support\Facades\Redirect;
use Illuminate\Contracts\Auth\MustVerifyEmail;
+use Illuminate\Support\Facades\Redirect;
class EnsureEmailIsVerified
{
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Middleware/RequirePassword.php b/vendor/laravel/framework/src/Illuminate/Auth/Middleware/RequirePassword.php
new file mode 100644
index 000000000..315bdb812
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Auth/Middleware/RequirePassword.php
@@ -0,0 +1,84 @@
+responseFactory = $responseFactory;
+ $this->urlGenerator = $urlGenerator;
+ $this->passwordTimeout = $passwordTimeout ?: 10800;
+ }
+
+ /**
+ * Handle an incoming request.
+ *
+ * @param \Illuminate\Http\Request $request
+ * @param \Closure $next
+ * @param string|null $redirectToRoute
+ * @return mixed
+ */
+ public function handle($request, Closure $next, $redirectToRoute = null)
+ {
+ if ($this->shouldConfirmPassword($request)) {
+ if ($request->expectsJson()) {
+ return $this->responseFactory->json([
+ 'message' => 'Password confirmation required.',
+ ], 423);
+ }
+
+ return $this->responseFactory->redirectGuest(
+ $this->urlGenerator->route($redirectToRoute ?? 'password.confirm')
+ );
+ }
+
+ return $next($request);
+ }
+
+ /**
+ * Determine if the confirmation timeout has expired.
+ *
+ * @param \Illuminate\Http\Request $request
+ * @return bool
+ */
+ protected function shouldConfirmPassword($request)
+ {
+ $confirmedAt = time() - $request->session()->get('auth.password_confirmed_at', 0);
+
+ return $confirmedAt > $this->passwordTimeout;
+ }
+}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/MustVerifyEmail.php b/vendor/laravel/framework/src/Illuminate/Auth/MustVerifyEmail.php
index d7782cd69..8e1ce33fb 100644
--- a/vendor/laravel/framework/src/Illuminate/Auth/MustVerifyEmail.php
+++ b/vendor/laravel/framework/src/Illuminate/Auth/MustVerifyEmail.php
@@ -2,6 +2,8 @@
namespace Illuminate\Auth;
+use Illuminate\Auth\Notifications\VerifyEmail;
+
trait MustVerifyEmail
{
/**
@@ -33,6 +35,16 @@ trait MustVerifyEmail
*/
public function sendEmailVerificationNotification()
{
- $this->notify(new Notifications\VerifyEmail);
+ $this->notify(new VerifyEmail);
+ }
+
+ /**
+ * Get the email address that should be used for verification.
+ *
+ * @return string
+ */
+ public function getEmailForVerification()
+ {
+ return $this->email;
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Notifications/ResetPassword.php b/vendor/laravel/framework/src/Illuminate/Auth/Notifications/ResetPassword.php
index 1b0077e75..05d010436 100644
--- a/vendor/laravel/framework/src/Illuminate/Auth/Notifications/ResetPassword.php
+++ b/vendor/laravel/framework/src/Illuminate/Auth/Notifications/ResetPassword.php
@@ -2,9 +2,9 @@
namespace Illuminate\Auth\Notifications;
-use Illuminate\Support\Facades\Lang;
-use Illuminate\Notifications\Notification;
use Illuminate\Notifications\Messages\MailMessage;
+use Illuminate\Notifications\Notification;
+use Illuminate\Support\Facades\Lang;
class ResetPassword extends Notification
{
@@ -15,6 +15,13 @@ class ResetPassword extends Notification
*/
public $token;
+ /**
+ * The callback that should be used to create the reset password URL.
+ *
+ * @var \Closure|null
+ */
+ public static $createUrlCallback;
+
/**
* The callback that should be used to build the mail message.
*
@@ -56,12 +63,32 @@ class ResetPassword extends Notification
return call_user_func(static::$toMailCallback, $notifiable, $this->token);
}
+ if (static::$createUrlCallback) {
+ $url = call_user_func(static::$createUrlCallback, $notifiable, $this->token);
+ } else {
+ $url = url(route('password.reset', [
+ 'token' => $this->token,
+ 'email' => $notifiable->getEmailForPasswordReset(),
+ ], false));
+ }
+
return (new MailMessage)
- ->subject(Lang::getFromJson('Reset Password Notification'))
- ->line(Lang::getFromJson('You are receiving this email because we received a password reset request for your account.'))
- ->action(Lang::getFromJson('Reset Password'), url(config('app.url').route('password.reset', ['token' => $this->token, 'email' => $notifiable->getEmailForPasswordReset()], false)))
- ->line(Lang::getFromJson('This password reset link will expire in :count minutes.', ['count' => config('auth.passwords.'.config('auth.defaults.passwords').'.expire')]))
- ->line(Lang::getFromJson('If you did not request a password reset, no further action is required.'));
+ ->subject(Lang::get('Reset Password Notification'))
+ ->line(Lang::get('You are receiving this email because we received a password reset request for your account.'))
+ ->action(Lang::get('Reset Password'), $url)
+ ->line(Lang::get('This password reset link will expire in :count minutes.', ['count' => config('auth.passwords.'.config('auth.defaults.passwords').'.expire')]))
+ ->line(Lang::get('If you did not request a password reset, no further action is required.'));
+ }
+
+ /**
+ * Set a callback that should be used when creating the reset password button URL.
+ *
+ * @param \Closure $callback
+ * @return void
+ */
+ public static function createUrlUsing($callback)
+ {
+ static::$createUrlCallback = $callback;
}
/**
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Notifications/VerifyEmail.php b/vendor/laravel/framework/src/Illuminate/Auth/Notifications/VerifyEmail.php
index 494111e80..f746685fc 100644
--- a/vendor/laravel/framework/src/Illuminate/Auth/Notifications/VerifyEmail.php
+++ b/vendor/laravel/framework/src/Illuminate/Auth/Notifications/VerifyEmail.php
@@ -2,12 +2,12 @@
namespace Illuminate\Auth\Notifications;
-use Illuminate\Support\Carbon;
-use Illuminate\Support\Facades\URL;
-use Illuminate\Support\Facades\Lang;
-use Illuminate\Support\Facades\Config;
-use Illuminate\Notifications\Notification;
use Illuminate\Notifications\Messages\MailMessage;
+use Illuminate\Notifications\Notification;
+use Illuminate\Support\Carbon;
+use Illuminate\Support\Facades\Config;
+use Illuminate\Support\Facades\Lang;
+use Illuminate\Support\Facades\URL;
class VerifyEmail extends Notification
{
@@ -44,10 +44,10 @@ class VerifyEmail extends Notification
}
return (new MailMessage)
- ->subject(Lang::getFromJson('Verify Email Address'))
- ->line(Lang::getFromJson('Please click the button below to verify your email address.'))
- ->action(Lang::getFromJson('Verify Email Address'), $verificationUrl)
- ->line(Lang::getFromJson('If you did not create an account, no further action is required.'));
+ ->subject(Lang::get('Verify Email Address'))
+ ->line(Lang::get('Please click the button below to verify your email address.'))
+ ->action(Lang::get('Verify Email Address'), $verificationUrl)
+ ->line(Lang::get('If you did not create an account, no further action is required.'));
}
/**
@@ -61,7 +61,10 @@ class VerifyEmail extends Notification
return URL::temporarySignedRoute(
'verification.verify',
Carbon::now()->addMinutes(Config::get('auth.verification.expire', 60)),
- ['id' => $notifiable->getKey()]
+ [
+ 'id' => $notifiable->getKey(),
+ 'hash' => sha1($notifiable->getEmailForVerification()),
+ ]
);
}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Passwords/DatabaseTokenRepository.php b/vendor/laravel/framework/src/Illuminate/Auth/Passwords/DatabaseTokenRepository.php
index c47017599..fe5f54b79 100755
--- a/vendor/laravel/framework/src/Illuminate/Auth/Passwords/DatabaseTokenRepository.php
+++ b/vendor/laravel/framework/src/Illuminate/Auth/Passwords/DatabaseTokenRepository.php
@@ -2,11 +2,11 @@
namespace Illuminate\Auth\Passwords;
-use Illuminate\Support\Str;
-use Illuminate\Support\Carbon;
-use Illuminate\Database\ConnectionInterface;
-use Illuminate\Contracts\Hashing\Hasher as HasherContract;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
+use Illuminate\Contracts\Hashing\Hasher as HasherContract;
+use Illuminate\Database\ConnectionInterface;
+use Illuminate\Support\Carbon;
+use Illuminate\Support\Str;
class DatabaseTokenRepository implements TokenRepositoryInterface
{
@@ -45,6 +45,13 @@ class DatabaseTokenRepository implements TokenRepositoryInterface
*/
protected $expires;
+ /**
+ * Minimum number of seconds before re-redefining the token.
+ *
+ * @var int
+ */
+ protected $throttle;
+
/**
* Create a new token repository instance.
*
@@ -53,16 +60,19 @@ class DatabaseTokenRepository implements TokenRepositoryInterface
* @param string $table
* @param string $hashKey
* @param int $expires
+ * @param int $throttle
* @return void
*/
public function __construct(ConnectionInterface $connection, HasherContract $hasher,
- $table, $hashKey, $expires = 60)
+ $table, $hashKey, $expires = 60,
+ $throttle = 60)
{
$this->table = $table;
$this->hasher = $hasher;
$this->hashKey = $hashKey;
$this->expires = $expires * 60;
$this->connection = $connection;
+ $this->throttle = $throttle;
}
/**
@@ -139,6 +149,38 @@ class DatabaseTokenRepository implements TokenRepositoryInterface
return Carbon::parse($createdAt)->addSeconds($this->expires)->isPast();
}
+ /**
+ * Determine if the given user recently created a password reset token.
+ *
+ * @param \Illuminate\Contracts\Auth\CanResetPassword $user
+ * @return bool
+ */
+ public function recentlyCreatedToken(CanResetPasswordContract $user)
+ {
+ $record = (array) $this->getTable()->where(
+ 'email', $user->getEmailForPasswordReset()
+ )->first();
+
+ return $record && $this->tokenRecentlyCreated($record['created_at']);
+ }
+
+ /**
+ * Determine if the token was recently created.
+ *
+ * @param string $createdAt
+ * @return bool
+ */
+ protected function tokenRecentlyCreated($createdAt)
+ {
+ if ($this->throttle <= 0) {
+ return false;
+ }
+
+ return Carbon::parse($createdAt)->addSeconds(
+ $this->throttle
+ )->isFuture();
+ }
+
/**
* Delete a token record by user.
*
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordBroker.php b/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordBroker.php
index cefb71376..662f71e27 100755
--- a/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordBroker.php
+++ b/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordBroker.php
@@ -3,11 +3,11 @@
namespace Illuminate\Auth\Passwords;
use Closure;
+use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
+use Illuminate\Contracts\Auth\PasswordBroker as PasswordBrokerContract;
+use Illuminate\Contracts\Auth\UserProvider;
use Illuminate\Support\Arr;
use UnexpectedValueException;
-use Illuminate\Contracts\Auth\UserProvider;
-use Illuminate\Contracts\Auth\PasswordBroker as PasswordBrokerContract;
-use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
class PasswordBroker implements PasswordBrokerContract
{
@@ -25,13 +25,6 @@ class PasswordBroker implements PasswordBrokerContract
*/
protected $users;
- /**
- * The custom password validator callback.
- *
- * @var \Closure
- */
- protected $passwordValidator;
-
/**
* Create a new password broker instance.
*
@@ -39,8 +32,7 @@ class PasswordBroker implements PasswordBrokerContract
* @param \Illuminate\Contracts\Auth\UserProvider $users
* @return void
*/
- public function __construct(TokenRepositoryInterface $tokens,
- UserProvider $users)
+ public function __construct(TokenRepositoryInterface $tokens, UserProvider $users)
{
$this->users = $users;
$this->tokens = $tokens;
@@ -63,6 +55,10 @@ class PasswordBroker implements PasswordBrokerContract
return static::INVALID_USER;
}
+ if ($this->tokens->recentlyCreatedToken($user)) {
+ return static::RESET_THROTTLED;
+ }
+
// Once we have the reset token, we are ready to send the message out to this
// user with a link to reset their password. We will then redirect back to
// the current URI having nothing set in the session to indicate errors.
@@ -82,11 +78,11 @@ class PasswordBroker implements PasswordBrokerContract
*/
public function reset(array $credentials, Closure $callback)
{
+ $user = $this->validateReset($credentials);
+
// If the responses from the validate method is not a user instance, we will
// assume that it is a redirect and simply return it from this method and
// the user is properly redirected having an error message on the post.
- $user = $this->validateReset($credentials);
-
if (! $user instanceof CanResetPasswordContract) {
return $user;
}
@@ -115,10 +111,6 @@ class PasswordBroker implements PasswordBrokerContract
return static::INVALID_USER;
}
- if (! $this->validateNewPassword($credentials)) {
- return static::INVALID_PASSWORD;
- }
-
if (! $this->tokens->exists($user, $credentials['token'])) {
return static::INVALID_TOKEN;
}
@@ -126,55 +118,6 @@ class PasswordBroker implements PasswordBrokerContract
return $user;
}
- /**
- * Set a custom password validator.
- *
- * @param \Closure $callback
- * @return void
- */
- public function validator(Closure $callback)
- {
- $this->passwordValidator = $callback;
- }
-
- /**
- * Determine if the passwords match for the request.
- *
- * @param array $credentials
- * @return bool
- */
- public function validateNewPassword(array $credentials)
- {
- if (isset($this->passwordValidator)) {
- [$password, $confirm] = [
- $credentials['password'],
- $credentials['password_confirmation'],
- ];
-
- return call_user_func(
- $this->passwordValidator, $credentials
- ) && $password === $confirm;
- }
-
- return $this->validatePasswordWithDefaults($credentials);
- }
-
- /**
- * Determine if the passwords are valid for the request.
- *
- * @param array $credentials
- * @return bool
- */
- protected function validatePasswordWithDefaults(array $credentials)
- {
- [$password, $confirm] = [
- $credentials['password'],
- $credentials['password_confirmation'],
- ];
-
- return $password === $confirm && mb_strlen($password) >= 8;
- }
-
/**
* Get the user for the given credentials.
*
@@ -199,7 +142,7 @@ class PasswordBroker implements PasswordBrokerContract
/**
* Create a new password reset token for the given user.
*
- * @param \Illuminate\Contracts\Auth\CanResetPassword $user
+ * @param \Illuminate\Contracts\Auth\CanResetPassword $user
* @return string
*/
public function createToken(CanResetPasswordContract $user)
@@ -210,7 +153,7 @@ class PasswordBroker implements PasswordBrokerContract
/**
* Delete password reset tokens of the given user.
*
- * @param \Illuminate\Contracts\Auth\CanResetPassword $user
+ * @param \Illuminate\Contracts\Auth\CanResetPassword $user
* @return void
*/
public function deleteToken(CanResetPasswordContract $user)
@@ -221,8 +164,8 @@ class PasswordBroker implements PasswordBrokerContract
/**
* Validate the given password reset token.
*
- * @param \Illuminate\Contracts\Auth\CanResetPassword $user
- * @param string $token
+ * @param \Illuminate\Contracts\Auth\CanResetPassword $user
+ * @param string $token
* @return bool
*/
public function tokenExists(CanResetPasswordContract $user, $token)
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordBrokerManager.php b/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordBrokerManager.php
index f73db6e75..f76172625 100644
--- a/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordBrokerManager.php
+++ b/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordBrokerManager.php
@@ -2,9 +2,9 @@
namespace Illuminate\Auth\Passwords;
+use Illuminate\Contracts\Auth\PasswordBrokerFactory as FactoryContract;
use Illuminate\Support\Str;
use InvalidArgumentException;
-use Illuminate\Contracts\Auth\PasswordBrokerFactory as FactoryContract;
/**
* @mixin \Illuminate\Contracts\Auth\PasswordBroker
@@ -95,7 +95,8 @@ class PasswordBrokerManager implements FactoryContract
$this->app['hash'],
$config['table'],
$key,
- $config['expire']
+ $config['expire'],
+ $config['throttle'] ?? 0
);
}
@@ -135,7 +136,7 @@ class PasswordBrokerManager implements FactoryContract
* Dynamically call the default driver instance.
*
* @param string $method
- * @param array $parameters
+ * @param array $parameters
* @return mixed
*/
public function __call($method, $parameters)
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordResetServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordResetServiceProvider.php
index 8df49f504..a26b7e6e8 100755
--- a/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordResetServiceProvider.php
+++ b/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordResetServiceProvider.php
@@ -2,8 +2,8 @@
namespace Illuminate\Auth\Passwords;
-use Illuminate\Support\ServiceProvider;
use Illuminate\Contracts\Support\DeferrableProvider;
+use Illuminate\Support\ServiceProvider;
class PasswordResetServiceProvider extends ServiceProvider implements DeferrableProvider
{
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Passwords/TokenRepositoryInterface.php b/vendor/laravel/framework/src/Illuminate/Auth/Passwords/TokenRepositoryInterface.php
index dcd06e8d6..47c17581f 100755
--- a/vendor/laravel/framework/src/Illuminate/Auth/Passwords/TokenRepositoryInterface.php
+++ b/vendor/laravel/framework/src/Illuminate/Auth/Passwords/TokenRepositoryInterface.php
@@ -23,6 +23,14 @@ interface TokenRepositoryInterface
*/
public function exists(CanResetPasswordContract $user, $token);
+ /**
+ * Determine if the given user recently created a password reset token.
+ *
+ * @param \Illuminate\Contracts\Auth\CanResetPassword $user
+ * @return bool
+ */
+ public function recentlyCreatedToken(CanResetPasswordContract $user);
+
/**
* Delete a token record.
*
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/RequestGuard.php b/vendor/laravel/framework/src/Illuminate/Auth/RequestGuard.php
index 2adc2cc35..d0af83cb4 100644
--- a/vendor/laravel/framework/src/Illuminate/Auth/RequestGuard.php
+++ b/vendor/laravel/framework/src/Illuminate/Auth/RequestGuard.php
@@ -2,10 +2,10 @@
namespace Illuminate\Auth;
-use Illuminate\Http\Request;
use Illuminate\Contracts\Auth\Guard;
-use Illuminate\Support\Traits\Macroable;
use Illuminate\Contracts\Auth\UserProvider;
+use Illuminate\Http\Request;
+use Illuminate\Support\Traits\Macroable;
class RequestGuard implements Guard
{
@@ -30,7 +30,7 @@ class RequestGuard implements Guard
*
* @param callable $callback
* @param \Illuminate\Http\Request $request
- * @param \Illuminate\Contracts\Auth\UserProvider|null $provider
+ * @param \Illuminate\Contracts\Auth\UserProvider|null $provider
* @return void
*/
public function __construct(callable $callback, Request $request, UserProvider $provider = null)
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/SessionGuard.php b/vendor/laravel/framework/src/Illuminate/Auth/SessionGuard.php
index ccc68a2ab..4db498784 100644
--- a/vendor/laravel/framework/src/Illuminate/Auth/SessionGuard.php
+++ b/vendor/laravel/framework/src/Illuminate/Auth/SessionGuard.php
@@ -2,19 +2,27 @@
namespace Illuminate\Auth;
-use RuntimeException;
-use Illuminate\Support\Str;
-use Illuminate\Support\Facades\Hash;
-use Illuminate\Support\Traits\Macroable;
-use Illuminate\Contracts\Session\Session;
-use Illuminate\Contracts\Auth\UserProvider;
-use Illuminate\Contracts\Events\Dispatcher;
-use Illuminate\Contracts\Auth\StatefulGuard;
-use Symfony\Component\HttpFoundation\Request;
-use Illuminate\Contracts\Auth\SupportsBasicAuth;
-use Illuminate\Contracts\Cookie\QueueingFactory as CookieJar;
-use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException;
+use Illuminate\Auth\Events\Attempting;
+use Illuminate\Auth\Events\Authenticated;
+use Illuminate\Auth\Events\CurrentDeviceLogout;
+use Illuminate\Auth\Events\Failed;
+use Illuminate\Auth\Events\Login;
+use Illuminate\Auth\Events\Logout;
+use Illuminate\Auth\Events\OtherDeviceLogout;
+use Illuminate\Auth\Events\Validated;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
+use Illuminate\Contracts\Auth\StatefulGuard;
+use Illuminate\Contracts\Auth\SupportsBasicAuth;
+use Illuminate\Contracts\Auth\UserProvider;
+use Illuminate\Contracts\Cookie\QueueingFactory as CookieJar;
+use Illuminate\Contracts\Events\Dispatcher;
+use Illuminate\Contracts\Session\Session;
+use Illuminate\Support\Facades\Hash;
+use Illuminate\Support\Str;
+use Illuminate\Support\Traits\Macroable;
+use RuntimeException;
+use Symfony\Component\HttpFoundation\Request;
+use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException;
class SessionGuard implements StatefulGuard, SupportsBasicAuth
{
@@ -191,7 +199,7 @@ class SessionGuard implements StatefulGuard, SupportsBasicAuth
/**
* Get the ID for the currently authenticated user.
*
- * @return int|null
+ * @return int|string|null
*/
public function id()
{
@@ -339,7 +347,7 @@ class SessionGuard implements StatefulGuard, SupportsBasicAuth
* Attempt to authenticate a user using the given credentials.
*
* @param array $credentials
- * @param bool $remember
+ * @param bool $remember
* @return bool
*/
public function attempt(array $credentials = [], $remember = false)
@@ -374,14 +382,20 @@ class SessionGuard implements StatefulGuard, SupportsBasicAuth
*/
protected function hasValidCredentials($user, $credentials)
{
- return ! is_null($user) && $this->provider->validateCredentials($user, $credentials);
+ $validated = ! is_null($user) && $this->provider->validateCredentials($user, $credentials);
+
+ if ($validated) {
+ $this->fireValidatedEvent($user);
+ }
+
+ return $validated;
}
/**
* Log the given user ID into the application.
*
* @param mixed $id
- * @param bool $remember
+ * @param bool $remember
* @return \Illuminate\Contracts\Auth\Authenticatable|false
*/
public function loginUsingId($id, $remember = false)
@@ -482,17 +496,17 @@ class SessionGuard implements StatefulGuard, SupportsBasicAuth
{
$user = $this->user();
- // If we have an event dispatcher instance, we can fire off the logout event
- // so any further processing can be done. This allows the developer to be
- // listening for anytime a user signs out of this application manually.
$this->clearUserDataFromStorage();
if (! is_null($this->user) && ! empty($user->getRememberToken())) {
$this->cycleRememberToken($user);
}
+ // If we have an event dispatcher instance, we can fire off the logout event
+ // so any further processing can be done. This allows the developer to be
+ // listening for anytime a user signs out of this application manually.
if (isset($this->events)) {
- $this->events->dispatch(new Events\Logout($this->name, $user));
+ $this->events->dispatch(new Logout($this->name, $user));
}
// Once we have fired the logout event we will clear the users out of memory
@@ -531,6 +545,32 @@ class SessionGuard implements StatefulGuard, SupportsBasicAuth
$this->provider->updateRememberToken($user, $token);
}
+ /**
+ * Log the user out of the application on their current device only.
+ *
+ * @return void
+ */
+ public function logoutCurrentDevice()
+ {
+ $user = $this->user();
+
+ $this->clearUserDataFromStorage();
+
+ // If we have an event dispatcher instance, we can fire off the logout event
+ // so any further processing can be done. This allows the developer to be
+ // listening for anytime a user signs out of this application manually.
+ if (isset($this->events)) {
+ $this->events->dispatch(new CurrentDeviceLogout($this->name, $user));
+ }
+
+ // Once we have fired the logout event we will clear the users out of memory
+ // so they are no longer available as the user is no longer considered as
+ // being signed into this application and should not be available here.
+ $this->user = null;
+
+ $this->loggedOut = true;
+ }
+
/**
* Invalidate other sessions for the current user.
*
@@ -583,12 +623,27 @@ class SessionGuard implements StatefulGuard, SupportsBasicAuth
protected function fireAttemptEvent(array $credentials, $remember = false)
{
if (isset($this->events)) {
- $this->events->dispatch(new Events\Attempting(
+ $this->events->dispatch(new Attempting(
$this->name, $credentials, $remember
));
}
}
+ /**
+ * Fires the validated event if the dispatcher is set.
+ *
+ * @param \Illuminate\Contracts\Auth\Authenticatable $user
+ * @return void
+ */
+ protected function fireValidatedEvent($user)
+ {
+ if (isset($this->events)) {
+ $this->events->dispatch(new Validated(
+ $this->name, $user
+ ));
+ }
+ }
+
/**
* Fire the login event if the dispatcher is set.
*
@@ -599,7 +654,7 @@ class SessionGuard implements StatefulGuard, SupportsBasicAuth
protected function fireLoginEvent($user, $remember = false)
{
if (isset($this->events)) {
- $this->events->dispatch(new Events\Login(
+ $this->events->dispatch(new Login(
$this->name, $user, $remember
));
}
@@ -614,7 +669,7 @@ class SessionGuard implements StatefulGuard, SupportsBasicAuth
protected function fireAuthenticatedEvent($user)
{
if (isset($this->events)) {
- $this->events->dispatch(new Events\Authenticated(
+ $this->events->dispatch(new Authenticated(
$this->name, $user
));
}
@@ -629,7 +684,7 @@ class SessionGuard implements StatefulGuard, SupportsBasicAuth
protected function fireOtherDeviceLogoutEvent($user)
{
if (isset($this->events)) {
- $this->events->dispatch(new Events\OtherDeviceLogout(
+ $this->events->dispatch(new OtherDeviceLogout(
$this->name, $user
));
}
@@ -645,7 +700,7 @@ class SessionGuard implements StatefulGuard, SupportsBasicAuth
protected function fireFailedEvent($user, array $credentials)
{
if (isset($this->events)) {
- $this->events->dispatch(new Events\Failed(
+ $this->events->dispatch(new Failed(
$this->name, $user, $credentials
));
}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/TokenGuard.php b/vendor/laravel/framework/src/Illuminate/Auth/TokenGuard.php
index 93fa25765..b1aa7a7e5 100644
--- a/vendor/laravel/framework/src/Illuminate/Auth/TokenGuard.php
+++ b/vendor/laravel/framework/src/Illuminate/Auth/TokenGuard.php
@@ -2,9 +2,9 @@
namespace Illuminate\Auth;
-use Illuminate\Http\Request;
use Illuminate\Contracts\Auth\Guard;
use Illuminate\Contracts\Auth\UserProvider;
+use Illuminate\Http\Request;
class TokenGuard implements Guard
{
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/composer.json b/vendor/laravel/framework/src/Illuminate/Auth/composer.json
index f9eaf684f..7ef7fccbc 100644
--- a/vendor/laravel/framework/src/Illuminate/Auth/composer.json
+++ b/vendor/laravel/framework/src/Illuminate/Auth/composer.json
@@ -14,11 +14,11 @@
}
],
"require": {
- "php": "^7.1.3",
- "illuminate/contracts": "5.8.*",
- "illuminate/http": "5.8.*",
- "illuminate/queue": "5.8.*",
- "illuminate/support": "5.8.*"
+ "php": "^7.2.5|^8.0",
+ "illuminate/contracts": "^7.0",
+ "illuminate/http": "^7.0",
+ "illuminate/queue": "^7.0",
+ "illuminate/support": "^7.0"
},
"autoload": {
"psr-4": {
@@ -27,13 +27,13 @@
},
"extra": {
"branch-alias": {
- "dev-master": "5.8-dev"
+ "dev-master": "7.x-dev"
}
},
"suggest": {
- "illuminate/console": "Required to use the auth:clear-resets command (5.8.*).",
- "illuminate/queue": "Required to fire login / logout events (5.8.*).",
- "illuminate/session": "Required to use the session based guard (5.8.*)."
+ "illuminate/console": "Required to use the auth:clear-resets command (^7.0).",
+ "illuminate/queue": "Required to fire login / logout events (^7.0).",
+ "illuminate/session": "Required to use the session based guard (^7.0)."
},
"config": {
"sort-packages": true
diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastEvent.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastEvent.php
index eb790f075..775df7805 100644
--- a/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastEvent.php
+++ b/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastEvent.php
@@ -2,13 +2,13 @@
namespace Illuminate\Broadcasting;
-use ReflectionClass;
-use ReflectionProperty;
-use Illuminate\Support\Arr;
use Illuminate\Bus\Queueable;
+use Illuminate\Contracts\Broadcasting\Broadcaster;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Contracts\Support\Arrayable;
-use Illuminate\Contracts\Broadcasting\Broadcaster;
+use Illuminate\Support\Arr;
+use ReflectionClass;
+use ReflectionProperty;
class BroadcastEvent implements ShouldQueue
{
@@ -21,6 +21,20 @@ class BroadcastEvent implements ShouldQueue
*/
public $event;
+ /**
+ * The number of times the job may be attempted.
+ *
+ * @var int
+ */
+ public $tries;
+
+ /**
+ * The number of seconds the job can run before timing out.
+ *
+ * @var int
+ */
+ public $timeout;
+
/**
* Create a new job handler instance.
*
@@ -30,6 +44,8 @@ class BroadcastEvent implements ShouldQueue
public function __construct($event)
{
$this->event = $event;
+ $this->tries = property_exists($event, 'tries') ? $event->tries : null;
+ $this->timeout = property_exists($event, 'timeout') ? $event->timeout : null;
}
/**
diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastManager.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastManager.php
index ef9c92351..3be0500d9 100644
--- a/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastManager.php
+++ b/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastManager.php
@@ -3,15 +3,17 @@
namespace Illuminate\Broadcasting;
use Closure;
-use Pusher\Pusher;
-use Psr\Log\LoggerInterface;
-use InvalidArgumentException;
use Illuminate\Broadcasting\Broadcasters\LogBroadcaster;
use Illuminate\Broadcasting\Broadcasters\NullBroadcaster;
-use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow;
-use Illuminate\Broadcasting\Broadcasters\RedisBroadcaster;
use Illuminate\Broadcasting\Broadcasters\PusherBroadcaster;
+use Illuminate\Broadcasting\Broadcasters\RedisBroadcaster;
use Illuminate\Contracts\Broadcasting\Factory as FactoryContract;
+use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow;
+use Illuminate\Contracts\Bus\Dispatcher as BusDispatcherContract;
+use Illuminate\Contracts\Foundation\CachesRoutes;
+use InvalidArgumentException;
+use Psr\Log\LoggerInterface;
+use Pusher\Pusher;
/**
* @mixin \Illuminate\Contracts\Broadcasting\Broadcaster
@@ -21,7 +23,7 @@ class BroadcastManager implements FactoryContract
/**
* The application instance.
*
- * @var \Illuminate\Contracts\Foundation\Application
+ * @var \Illuminate\Contracts\Container\Container
*/
protected $app;
@@ -42,7 +44,7 @@ class BroadcastManager implements FactoryContract
/**
* Create a new manager instance.
*
- * @param \Illuminate\Contracts\Foundation\Application $app
+ * @param \Illuminate\Contracts\Container\Container $app
* @return void
*/
public function __construct($app)
@@ -58,7 +60,7 @@ class BroadcastManager implements FactoryContract
*/
public function routes(array $attributes = null)
{
- if ($this->app->routesAreCached()) {
+ if ($this->app instanceof CachesRoutes && $this->app->routesAreCached()) {
return;
}
@@ -93,7 +95,7 @@ class BroadcastManager implements FactoryContract
* Begin broadcasting an event.
*
* @param mixed|null $event
- * @return \Illuminate\Broadcasting\PendingBroadcast|void
+ * @return \Illuminate\Broadcasting\PendingBroadcast
*/
public function event($event = null)
{
@@ -108,10 +110,8 @@ class BroadcastManager implements FactoryContract
*/
public function queue($event)
{
- $connection = $event instanceof ShouldBroadcastNow ? 'sync' : null;
-
- if (is_null($connection) && isset($event->connection)) {
- $connection = $event->connection;
+ if ($event instanceof ShouldBroadcastNow) {
+ return $this->app->make(BusDispatcherContract::class)->dispatchNow(new BroadcastEvent(clone $event));
}
$queue = null;
@@ -124,7 +124,7 @@ class BroadcastManager implements FactoryContract
$queue = $event->queue;
}
- $this->app->make('queue')->connection($connection)->pushOn(
+ $this->app->make('queue')->connection($event->connection ?? null)->pushOn(
$queue, new BroadcastEvent(clone $event)
);
}
@@ -229,7 +229,8 @@ class BroadcastManager implements FactoryContract
protected function createRedisDriver(array $config)
{
return new RedisBroadcaster(
- $this->app->make('redis'), $config['connection'] ?? null
+ $this->app->make('redis'), $config['connection'] ?? null,
+ $this->app['config']->get('database.redis.options.prefix', '')
);
}
@@ -296,7 +297,7 @@ class BroadcastManager implements FactoryContract
/**
* Register a custom driver creator Closure.
*
- * @param string $driver
+ * @param string $driver
* @param \Closure $callback
* @return $this
*/
@@ -311,7 +312,7 @@ class BroadcastManager implements FactoryContract
* Dynamically call the default driver instance.
*
* @param string $method
- * @param array $parameters
+ * @param array $parameters
* @return mixed
*/
public function __call($method, $parameters)
diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastServiceProvider.php
index 56628ef22..e6897e2d5 100644
--- a/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastServiceProvider.php
+++ b/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastServiceProvider.php
@@ -2,10 +2,10 @@
namespace Illuminate\Broadcasting;
-use Illuminate\Support\ServiceProvider;
-use Illuminate\Contracts\Support\DeferrableProvider;
-use Illuminate\Contracts\Broadcasting\Factory as BroadcastingFactory;
use Illuminate\Contracts\Broadcasting\Broadcaster as BroadcasterContract;
+use Illuminate\Contracts\Broadcasting\Factory as BroadcastingFactory;
+use Illuminate\Contracts\Support\DeferrableProvider;
+use Illuminate\Support\ServiceProvider;
class BroadcastServiceProvider extends ServiceProvider implements DeferrableProvider
{
diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php
index 39b9ec1d4..d39258ff5 100644
--- a/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php
+++ b/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php
@@ -3,15 +3,16 @@
namespace Illuminate\Broadcasting\Broadcasters;
use Exception;
+use Illuminate\Container\Container;
+use Illuminate\Contracts\Broadcasting\Broadcaster as BroadcasterContract;
+use Illuminate\Contracts\Routing\BindingRegistrar;
+use Illuminate\Contracts\Routing\UrlRoutable;
+use Illuminate\Support\Arr;
+use Illuminate\Support\Reflector;
+use Illuminate\Support\Str;
use ReflectionClass;
use ReflectionFunction;
-use Illuminate\Support\Arr;
-use Illuminate\Support\Str;
-use Illuminate\Container\Container;
-use Illuminate\Contracts\Routing\UrlRoutable;
-use Illuminate\Contracts\Routing\BindingRegistrar;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
-use Illuminate\Contracts\Broadcasting\Broadcaster as BroadcasterContract;
abstract class Broadcaster implements BroadcasterContract
{
@@ -204,9 +205,9 @@ abstract class Broadcaster implements BroadcasterContract
continue;
}
- $instance = $parameter->getClass()->newInstance();
+ $className = Reflector::getParameterClassName($parameter);
- if (! $model = $instance->resolveRouteBinding($value)) {
+ if (is_null($model = (new $className)->resolveRouteBinding($value))) {
throw new AccessDeniedHttpException;
}
@@ -225,8 +226,8 @@ abstract class Broadcaster implements BroadcasterContract
*/
protected function isImplicitlyBindable($key, $parameter)
{
- return $parameter->name === $key && $parameter->getClass() &&
- $parameter->getClass()->isSubclassOf(UrlRoutable::class);
+ return $parameter->getName() === $key &&
+ Reflector::isParameterSubclassOf($parameter, UrlRoutable::class);
}
/**
@@ -261,7 +262,7 @@ abstract class Broadcaster implements BroadcasterContract
* Normalize the given callback into a callable.
*
* @param mixed $callback
- * @return callable|\Closure
+ * @return callable
*/
protected function normalizeChannelHandlerToCallable($callback)
{
diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php
index 5bdc305b4..c39abbd6f 100644
--- a/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php
+++ b/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php
@@ -2,10 +2,10 @@
namespace Illuminate\Broadcasting\Broadcasters;
-use Pusher\Pusher;
+use Illuminate\Broadcasting\BroadcastException;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
-use Illuminate\Broadcasting\BroadcastException;
+use Pusher\Pusher;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
class PusherBroadcaster extends Broadcaster
@@ -102,6 +102,8 @@ class PusherBroadcaster extends Broadcaster
* @param string $event
* @param array $payload
* @return void
+ *
+ * @throws \Illuminate\Broadcasting\BroadcastException
*/
public function broadcast(array $channels, $event, array $payload = [])
{
@@ -117,7 +119,9 @@ class PusherBroadcaster extends Broadcaster
}
throw new BroadcastException(
- is_bool($response) ? 'Failed to connect to Pusher.' : $response['body']
+ ! empty($response['body'])
+ ? sprintf('Pusher error: %s.', $response['body'])
+ : 'Failed to connect to Pusher.'
);
}
diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/RedisBroadcaster.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/RedisBroadcaster.php
index b001c1d8d..18cb0fef3 100644
--- a/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/RedisBroadcaster.php
+++ b/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/RedisBroadcaster.php
@@ -2,8 +2,8 @@
namespace Illuminate\Broadcasting\Broadcasters;
-use Illuminate\Support\Arr;
use Illuminate\Contracts\Redis\Factory as Redis;
+use Illuminate\Support\Arr;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
class RedisBroadcaster extends Broadcaster
@@ -24,16 +24,25 @@ class RedisBroadcaster extends Broadcaster
*/
protected $connection;
+ /**
+ * The Redis key prefix.
+ *
+ * @var string
+ */
+ protected $prefix;
+
/**
* Create a new broadcaster instance.
*
* @param \Illuminate\Contracts\Redis\Factory $redis
* @param string|null $connection
+ * @param string $prefix
* @return void
*/
- public function __construct(Redis $redis, $connection = null)
+ public function __construct(Redis $redis, $connection = null, $prefix = '')
{
$this->redis = $redis;
+ $this->prefix = $prefix;
$this->connection = $connection;
}
@@ -47,7 +56,9 @@ class RedisBroadcaster extends Broadcaster
*/
public function auth($request)
{
- $channelName = $this->normalizeChannelName($request->channel_name);
+ $channelName = $this->normalizeChannelName(
+ str_replace($this->prefix, '', $request->channel_name)
+ );
if ($this->isGuardedChannel($request->channel_name) &&
! $this->retrieveUser($request, $channelName)) {
@@ -90,6 +101,10 @@ class RedisBroadcaster extends Broadcaster
*/
public function broadcast(array $channels, $event, array $payload = [])
{
+ if (empty($channels)) {
+ return;
+ }
+
$connection = $this->redis->connection($this->connection);
$payload = json_encode([
@@ -98,8 +113,39 @@ class RedisBroadcaster extends Broadcaster
'socket' => Arr::pull($payload, 'socket'),
]);
- foreach ($this->formatChannels($channels) as $channel) {
- $connection->publish($channel, $payload);
- }
+ $connection->eval(
+ $this->broadcastMultipleChannelsScript(),
+ 0, $payload, ...$this->formatChannels($channels)
+ );
+ }
+
+ /**
+ * Get the Lua script for broadcasting to multiple channels.
+ *
+ * ARGV[1] - The payload
+ * ARGV[2...] - The channels
+ *
+ * @return string
+ */
+ protected function broadcastMultipleChannelsScript()
+ {
+ return <<<'LUA'
+for i = 2, #ARGV do
+ redis.call('publish', ARGV[i], ARGV[1])
+end
+LUA;
+ }
+
+ /**
+ * Format the channel array into an array of strings.
+ *
+ * @param array $channels
+ * @return array
+ */
+ protected function formatChannels(array $channels)
+ {
+ return array_map(function ($channel) {
+ return $this->prefix.$channel;
+ }, parent::formatChannels($channels));
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/UsePusherChannelConventions.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/UsePusherChannelConventions.php
index df43facdd..07c707ceb 100644
--- a/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/UsePusherChannelConventions.php
+++ b/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/UsePusherChannelConventions.php
@@ -25,10 +25,10 @@ trait UsePusherChannelConventions
*/
public function normalizeChannelName($channel)
{
- if ($this->isGuardedChannel($channel)) {
- return Str::startsWith($channel, 'private-')
- ? Str::replaceFirst('private-', '', $channel)
- : Str::replaceFirst('presence-', '', $channel);
+ foreach (['private-encrypted-', 'private-', 'presence-'] as $prefix) {
+ if (Str::startsWith($channel, $prefix)) {
+ return Str::replaceFirst($prefix, '', $channel);
+ }
}
return $channel;
diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/EncryptedPrivateChannel.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/EncryptedPrivateChannel.php
new file mode 100644
index 000000000..76977c158
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Broadcasting/EncryptedPrivateChannel.php
@@ -0,0 +1,17 @@
+push($command);
}
+ /**
+ * Dispatch a command to its appropriate handler after the current process.
+ *
+ * @param mixed $command
+ * @param mixed $handler
+ * @return void
+ */
+ public function dispatchAfterResponse($command, $handler = null)
+ {
+ $this->container->terminating(function () use ($command, $handler) {
+ $this->dispatchNow($command, $handler);
+ });
+ }
+
/**
* Set the pipes through which commands should be piped before dispatching.
*
diff --git a/vendor/laravel/framework/src/Illuminate/Bus/Queueable.php b/vendor/laravel/framework/src/Illuminate/Bus/Queueable.php
index 48cee186e..19bc46fff 100644
--- a/vendor/laravel/framework/src/Illuminate/Bus/Queueable.php
+++ b/vendor/laravel/framework/src/Illuminate/Bus/Queueable.php
@@ -2,6 +2,11 @@
namespace Illuminate\Bus;
+use Closure;
+use Illuminate\Queue\CallQueuedClosure;
+use Illuminate\Support\Arr;
+use RuntimeException;
+
trait Queueable
{
/**
@@ -39,6 +44,13 @@ trait Queueable
*/
public $delay;
+ /**
+ * The middleware the job should be dispatched through.
+ *
+ * @var array
+ */
+ public $middleware = [];
+
/**
* The jobs that should run if this job is successful.
*
@@ -113,6 +125,19 @@ trait Queueable
return $this;
}
+ /**
+ * Specify the middleware the job should be dispatched through.
+ *
+ * @param array|object $middleware
+ * @return $this
+ */
+ public function through($middleware)
+ {
+ $this->middleware = Arr::wrap($middleware);
+
+ return $this;
+ }
+
/**
* Set the jobs that should run if this job is successful.
*
@@ -122,12 +147,33 @@ trait Queueable
public function chain($chain)
{
$this->chained = collect($chain)->map(function ($job) {
- return serialize($job);
+ return $this->serializeJob($job);
})->all();
return $this;
}
+ /**
+ * Serialize a job for queuing.
+ *
+ * @param mixed $job
+ * @return string
+ */
+ protected function serializeJob($job)
+ {
+ if ($job instanceof Closure) {
+ if (! class_exists(CallQueuedClosure::class)) {
+ throw new RuntimeException(
+ 'To enable support for closure jobs, please install the illuminate/queue package.'
+ );
+ }
+
+ $job = CallQueuedClosure::create($job);
+ }
+
+ return serialize($job);
+ }
+
/**
* Dispatch the next job on the chain.
*
diff --git a/vendor/laravel/framework/src/Illuminate/Bus/composer.json b/vendor/laravel/framework/src/Illuminate/Bus/composer.json
index d26624664..7d4a72d3d 100644
--- a/vendor/laravel/framework/src/Illuminate/Bus/composer.json
+++ b/vendor/laravel/framework/src/Illuminate/Bus/composer.json
@@ -14,10 +14,10 @@
}
],
"require": {
- "php": "^7.1.3",
- "illuminate/contracts": "5.8.*",
- "illuminate/pipeline": "5.8.*",
- "illuminate/support": "5.8.*"
+ "php": "^7.2.5|^8.0",
+ "illuminate/contracts": "^7.0",
+ "illuminate/pipeline": "^7.0",
+ "illuminate/support": "^7.0"
},
"autoload": {
"psr-4": {
@@ -26,9 +26,12 @@
},
"extra": {
"branch-alias": {
- "dev-master": "5.8-dev"
+ "dev-master": "7.x-dev"
}
},
+ "suggest": {
+ "illuminate/queue": "Required to use closures when chaining jobs (^7.0)."
+ },
"config": {
"sort-packages": true
},
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/ApcStore.php b/vendor/laravel/framework/src/Illuminate/Cache/ApcStore.php
index dc5e2f08a..90132c16f 100755
--- a/vendor/laravel/framework/src/Illuminate/Cache/ApcStore.php
+++ b/vendor/laravel/framework/src/Illuminate/Cache/ApcStore.php
@@ -52,7 +52,7 @@ class ApcStore extends TaggableStore
* Store an item in the cache for a given number of seconds.
*
* @param string $key
- * @param mixed $value
+ * @param mixed $value
* @param int $seconds
* @return bool
*/
@@ -65,7 +65,7 @@ class ApcStore extends TaggableStore
* Increment the value of an item in the cache.
*
* @param string $key
- * @param mixed $value
+ * @param mixed $value
* @return int|bool
*/
public function increment($key, $value = 1)
@@ -77,7 +77,7 @@ class ApcStore extends TaggableStore
* Decrement the value of an item in the cache.
*
* @param string $key
- * @param mixed $value
+ * @param mixed $value
* @return int|bool
*/
public function decrement($key, $value = 1)
@@ -89,7 +89,7 @@ class ApcStore extends TaggableStore
* Store an item in the cache indefinitely.
*
* @param string $key
- * @param mixed $value
+ * @param mixed $value
* @return bool
*/
public function forever($key, $value)
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/ApcWrapper.php b/vendor/laravel/framework/src/Illuminate/Cache/ApcWrapper.php
index 42e76aaa8..6c129c633 100755
--- a/vendor/laravel/framework/src/Illuminate/Cache/ApcWrapper.php
+++ b/vendor/laravel/framework/src/Illuminate/Cache/ApcWrapper.php
@@ -36,8 +36,8 @@ class ApcWrapper
* Store an item in the cache.
*
* @param string $key
- * @param mixed $value
- * @param int $seconds
+ * @param mixed $value
+ * @param int $seconds
* @return array|bool
*/
public function put($key, $value, $seconds)
@@ -49,7 +49,7 @@ class ApcWrapper
* Increment the value of an item in the cache.
*
* @param string $key
- * @param mixed $value
+ * @param mixed $value
* @return int|bool
*/
public function increment($key, $value)
@@ -61,7 +61,7 @@ class ApcWrapper
* Decrement the value of an item in the cache.
*
* @param string $key
- * @param mixed $value
+ * @param mixed $value
* @return int|bool
*/
public function decrement($key, $value)
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/ArrayLock.php b/vendor/laravel/framework/src/Illuminate/Cache/ArrayLock.php
new file mode 100644
index 000000000..4c20783b2
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Cache/ArrayLock.php
@@ -0,0 +1,102 @@
+store = $store;
+ }
+
+ /**
+ * Attempt to acquire the lock.
+ *
+ * @return bool
+ */
+ public function acquire()
+ {
+ $expiration = $this->store->locks[$this->name]['expiresAt'] ?? Carbon::now()->addSecond();
+
+ if ($this->exists() && $expiration->isFuture()) {
+ return false;
+ }
+
+ $this->store->locks[$this->name] = [
+ 'owner' => $this->owner,
+ 'expiresAt' => $this->seconds === 0 ? null : Carbon::now()->addSeconds($this->seconds),
+ ];
+
+ return true;
+ }
+
+ /**
+ * Determine if the current lock exists.
+ *
+ * @return bool
+ */
+ protected function exists()
+ {
+ return isset($this->store->locks[$this->name]);
+ }
+
+ /**
+ * Release the lock.
+ *
+ * @return bool
+ */
+ public function release()
+ {
+ if (! $this->exists()) {
+ return false;
+ }
+
+ if (! $this->isOwnedByCurrentProcess()) {
+ return false;
+ }
+
+ $this->forceRelease();
+
+ return true;
+ }
+
+ /**
+ * Returns the owner value written into the driver for this lock.
+ *
+ * @return string
+ */
+ protected function getCurrentOwner()
+ {
+ return $this->store->locks[$this->name]['owner'];
+ }
+
+ /**
+ * Releases this lock in disregard of ownership.
+ *
+ * @return void
+ */
+ public function forceRelease()
+ {
+ unset($this->store->locks[$this->name]);
+ }
+}
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/ArrayStore.php b/vendor/laravel/framework/src/Illuminate/Cache/ArrayStore.php
index f1f00d637..22b42ba5f 100644
--- a/vendor/laravel/framework/src/Illuminate/Cache/ArrayStore.php
+++ b/vendor/laravel/framework/src/Illuminate/Cache/ArrayStore.php
@@ -2,9 +2,10 @@
namespace Illuminate\Cache;
+use Illuminate\Contracts\Cache\LockProvider;
use Illuminate\Support\InteractsWithTime;
-class ArrayStore extends TaggableStore
+class ArrayStore extends TaggableStore implements LockProvider
{
use InteractsWithTime, RetrievesMultipleKeys;
@@ -15,6 +16,31 @@ class ArrayStore extends TaggableStore
*/
protected $storage = [];
+ /**
+ * The array of locks.
+ *
+ * @var array
+ */
+ public $locks = [];
+
+ /**
+ * Indicates if values are serialized within the store.
+ *
+ * @var bool
+ */
+ protected $serializesValues;
+
+ /**
+ * Create a new Array store.
+ *
+ * @param bool $serializesValues
+ * @return void
+ */
+ public function __construct($serializesValues = false)
+ {
+ $this->serializesValues = $serializesValues;
+ }
+
/**
* Retrieve an item from the cache by key.
*
@@ -37,21 +63,21 @@ class ArrayStore extends TaggableStore
return;
}
- return $item['value'];
+ return $this->serializesValues ? unserialize($item['value']) : $item['value'];
}
/**
* Store an item in the cache for a given number of seconds.
*
* @param string $key
- * @param mixed $value
+ * @param mixed $value
* @param int $seconds
* @return bool
*/
public function put($key, $value, $seconds)
{
$this->storage[$key] = [
- 'value' => $value,
+ 'value' => $this->serializesValues ? serialize($value) : $value,
'expiresAt' => $this->calculateExpiration($seconds),
];
@@ -62,27 +88,29 @@ class ArrayStore extends TaggableStore
* Increment the value of an item in the cache.
*
* @param string $key
- * @param mixed $value
+ * @param mixed $value
* @return int
*/
public function increment($key, $value = 1)
{
- if (! isset($this->storage[$key])) {
- $this->forever($key, $value);
+ if (! is_null($existing = $this->get($key))) {
+ return tap(((int) $existing) + $value, function ($incremented) use ($key) {
+ $value = $this->serializesValues ? serialize($incremented) : $incremented;
- return $this->storage[$key]['value'];
+ $this->storage[$key]['value'] = $value;
+ });
}
- $this->storage[$key]['value'] = ((int) $this->storage[$key]['value']) + $value;
+ $this->forever($key, $value);
- return $this->storage[$key]['value'];
+ return $value;
}
/**
* Decrement the value of an item in the cache.
*
* @param string $key
- * @param mixed $value
+ * @param mixed $value
* @return int
*/
public function decrement($key, $value = 1)
@@ -94,7 +122,7 @@ class ArrayStore extends TaggableStore
* Store an item in the cache indefinitely.
*
* @param string $key
- * @param mixed $value
+ * @param mixed $value
* @return bool
*/
public function forever($key, $value)
@@ -162,4 +190,29 @@ class ArrayStore extends TaggableStore
{
return $seconds > 0 ? $this->availableAt($seconds) : 0;
}
+
+ /**
+ * Get a lock instance.
+ *
+ * @param string $name
+ * @param int $seconds
+ * @param string|null $owner
+ * @return \Illuminate\Contracts\Cache\Lock
+ */
+ public function lock($name, $seconds = 0, $owner = null)
+ {
+ return new ArrayLock($this, $name, $seconds, $owner);
+ }
+
+ /**
+ * Restore a lock instance using the owner identifier.
+ *
+ * @param string $name
+ * @param string $owner
+ * @return \Illuminate\Contracts\Cache\Lock
+ */
+ public function restoreLock($name, $owner)
+ {
+ return $this->lock($name, 0, $owner);
+ }
}
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php b/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php
index 8c72c8146..73f4acc35 100755
--- a/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php
+++ b/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php
@@ -2,13 +2,13 @@
namespace Illuminate\Cache;
+use Aws\DynamoDb\DynamoDbClient;
use Closure;
+use Illuminate\Contracts\Cache\Factory as FactoryContract;
+use Illuminate\Contracts\Cache\Store;
+use Illuminate\Contracts\Events\Dispatcher as DispatcherContract;
use Illuminate\Support\Arr;
use InvalidArgumentException;
-use Aws\DynamoDb\DynamoDbClient;
-use Illuminate\Contracts\Cache\Store;
-use Illuminate\Contracts\Cache\Factory as FactoryContract;
-use Illuminate\Contracts\Events\Dispatcher as DispatcherContract;
/**
* @mixin \Illuminate\Contracts\Cache\Repository
@@ -138,11 +138,12 @@ class CacheManager implements FactoryContract
/**
* Create an instance of the array cache driver.
*
+ * @param array $config
* @return \Illuminate\Cache\Repository
*/
- protected function createArrayDriver()
+ protected function createArrayDriver(array $config)
{
- return $this->repository(new ArrayStore);
+ return $this->repository(new ArrayStore($config['serialize'] ?? false));
}
/**
@@ -153,7 +154,7 @@ class CacheManager implements FactoryContract
*/
protected function createFileDriver(array $config)
{
- return $this->repository(new FileStore($this->app['files'], $config['path']));
+ return $this->repository(new FileStore($this->app['files'], $config['path'], $config['permission'] ?? null));
}
/**
@@ -213,7 +214,11 @@ class CacheManager implements FactoryContract
return $this->repository(
new DatabaseStore(
- $connection, $config['table'], $this->getPrefix($config)
+ $connection,
+ $config['table'],
+ $this->getPrefix($config),
+ $config['lock_table'] ?? 'cache_locks',
+ $config['lock_lottery'] ?? [2, 100]
)
);
}
@@ -258,15 +263,36 @@ class CacheManager implements FactoryContract
*/
public function repository(Store $store)
{
- $repository = new Repository($store);
+ return tap(new Repository($store), function ($repository) {
+ $this->setEventDispatcher($repository);
+ });
+ }
- if ($this->app->bound(DispatcherContract::class)) {
- $repository->setEventDispatcher(
- $this->app[DispatcherContract::class]
- );
+ /**
+ * Set the event dispatcher on the given repository instance.
+ *
+ * @param \Illuminate\Cache\Repository $repository
+ * @return void
+ */
+ protected function setEventDispatcher(Repository $repository)
+ {
+ if (! $this->app->bound(DispatcherContract::class)) {
+ return;
}
- return $repository;
+ $repository->setEventDispatcher(
+ $this->app[DispatcherContract::class]
+ );
+ }
+
+ /**
+ * Re-set the event dispatcher on all resolved cache repositories.
+ *
+ * @return void
+ */
+ public function refreshEventDispatcher()
+ {
+ array_map([$this, 'setEventDispatcher'], $this->stores);
}
/**
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/CacheServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Cache/CacheServiceProvider.php
index 8b6e929d2..46fa0ae26 100755
--- a/vendor/laravel/framework/src/Illuminate/Cache/CacheServiceProvider.php
+++ b/vendor/laravel/framework/src/Illuminate/Cache/CacheServiceProvider.php
@@ -2,8 +2,9 @@
namespace Illuminate\Cache;
-use Illuminate\Support\ServiceProvider;
use Illuminate\Contracts\Support\DeferrableProvider;
+use Illuminate\Support\ServiceProvider;
+use Symfony\Component\Cache\Adapter\Psr16Adapter;
class CacheServiceProvider extends ServiceProvider implements DeferrableProvider
{
@@ -22,6 +23,10 @@ class CacheServiceProvider extends ServiceProvider implements DeferrableProvider
return $app['cache']->driver();
});
+ $this->app->singleton('cache.psr6', function ($app) {
+ return new Psr16Adapter($app['cache.store']);
+ });
+
$this->app->singleton('memcached.connector', function () {
return new MemcachedConnector;
});
@@ -35,7 +40,7 @@ class CacheServiceProvider extends ServiceProvider implements DeferrableProvider
public function provides()
{
return [
- 'cache', 'cache.store', 'memcached.connector',
+ 'cache', 'cache.store', 'cache.psr6', 'memcached.connector',
];
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Console/CacheTableCommand.php b/vendor/laravel/framework/src/Illuminate/Cache/Console/CacheTableCommand.php
index bde2d4b91..a8c78c9e0 100644
--- a/vendor/laravel/framework/src/Illuminate/Cache/Console/CacheTableCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Cache/Console/CacheTableCommand.php
@@ -3,8 +3,8 @@
namespace Illuminate\Cache\Console;
use Illuminate\Console\Command;
-use Illuminate\Support\Composer;
use Illuminate\Filesystem\Filesystem;
+use Illuminate\Support\Composer;
class CacheTableCommand extends Command
{
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Console/ClearCommand.php b/vendor/laravel/framework/src/Illuminate/Cache/Console/ClearCommand.php
index 4feeb17d0..aa88964d7 100755
--- a/vendor/laravel/framework/src/Illuminate/Cache/Console/ClearCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Cache/Console/ClearCommand.php
@@ -2,11 +2,11 @@
namespace Illuminate\Cache\Console;
-use Illuminate\Console\Command;
use Illuminate\Cache\CacheManager;
+use Illuminate\Console\Command;
use Illuminate\Filesystem\Filesystem;
-use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
+use Symfony\Component\Console\Input\InputOption;
class ClearCommand extends Command
{
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Console/ForgetCommand.php b/vendor/laravel/framework/src/Illuminate/Cache/Console/ForgetCommand.php
index 646dc146a..eb0c06668 100755
--- a/vendor/laravel/framework/src/Illuminate/Cache/Console/ForgetCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Cache/Console/ForgetCommand.php
@@ -2,8 +2,8 @@
namespace Illuminate\Cache\Console;
-use Illuminate\Console\Command;
use Illuminate\Cache\CacheManager;
+use Illuminate\Console\Command;
class ForgetCommand extends Command
{
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Console/stubs/cache.stub b/vendor/laravel/framework/src/Illuminate/Cache/Console/stubs/cache.stub
index 058afe69c..7b73e5fd1 100644
--- a/vendor/laravel/framework/src/Illuminate/Cache/Console/stubs/cache.stub
+++ b/vendor/laravel/framework/src/Illuminate/Cache/Console/stubs/cache.stub
@@ -1,8 +1,8 @@
connection = $connection;
+ $this->table = $table;
+ $this->lottery = $lottery;
+ }
+
+ /**
+ * Attempt to acquire the lock.
+ *
+ * @return bool
+ */
+ public function acquire()
+ {
+ $acquired = false;
+
+ try {
+ $this->connection->table($this->table)->insert([
+ 'key' => $this->name,
+ 'owner' => $this->owner,
+ 'expiration' => $this->expiresAt(),
+ ]);
+
+ $acquired = true;
+ } catch (QueryException $e) {
+ $updated = $this->connection->table($this->table)
+ ->where('key', $this->name)
+ ->where(function ($query) {
+ return $query->where('owner', $this->owner)->orWhere('expiration', '<=', time());
+ })->update([
+ 'owner' => $this->owner,
+ 'expiration' => $this->expiresAt(),
+ ]);
+
+ $acquired = $updated >= 1;
+ }
+
+ if (random_int(1, $this->lottery[1]) <= $this->lottery[0]) {
+ $this->connection->table($this->table)->where('expiration', '<=', time())->delete();
+ }
+
+ return $acquired;
+ }
+
+ /**
+ * Get the UNIX timestamp indicating when the lock should expire.
+ *
+ * @return int
+ */
+ protected function expiresAt()
+ {
+ return $this->seconds > 0 ? time() + $this->seconds : Carbon::now()->addDays(1)->getTimestamp();
+ }
+
+ /**
+ * Release the lock.
+ *
+ * @return bool
+ */
+ public function release()
+ {
+ if ($this->isOwnedByCurrentProcess()) {
+ $this->connection->table($this->table)
+ ->where('key', $this->name)
+ ->where('owner', $this->owner)
+ ->delete();
+
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Releases this lock in disregard of ownership.
+ *
+ * @return void
+ */
+ public function forceRelease()
+ {
+ $this->connection->table($this->table)
+ ->where('key', $this->name)
+ ->delete();
+ }
+
+ /**
+ * Returns the owner value written into the driver for this lock.
+ *
+ * @return string
+ */
+ protected function getCurrentOwner()
+ {
+ return optional($this->connection->table($this->table)->where('key', $this->name)->first())->owner;
+ }
+}
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/DatabaseStore.php b/vendor/laravel/framework/src/Illuminate/Cache/DatabaseStore.php
index a7de61bb1..c868b145e 100755
--- a/vendor/laravel/framework/src/Illuminate/Cache/DatabaseStore.php
+++ b/vendor/laravel/framework/src/Illuminate/Cache/DatabaseStore.php
@@ -4,13 +4,15 @@ namespace Illuminate\Cache;
use Closure;
use Exception;
-use Illuminate\Support\Str;
+use Illuminate\Contracts\Cache\LockProvider;
use Illuminate\Contracts\Cache\Store;
-use Illuminate\Support\InteractsWithTime;
-use Illuminate\Database\PostgresConnection;
use Illuminate\Database\ConnectionInterface;
+use Illuminate\Database\PostgresConnection;
+use Illuminate\Database\QueryException;
+use Illuminate\Support\InteractsWithTime;
+use Illuminate\Support\Str;
-class DatabaseStore implements Store
+class DatabaseStore implements LockProvider, Store
{
use InteractsWithTime, RetrievesMultipleKeys;
@@ -35,19 +37,41 @@ class DatabaseStore implements Store
*/
protected $prefix;
+ /**
+ * The name of the cache locks table.
+ *
+ * @var string
+ */
+ protected $lockTable;
+
+ /**
+ * An array representation of the lock lottery odds.
+ *
+ * @var array
+ */
+ protected $lockLottery;
+
/**
* Create a new database store.
*
* @param \Illuminate\Database\ConnectionInterface $connection
* @param string $table
* @param string $prefix
+ * @param string $lockTable
+ * @param array $lockLottery
* @return void
*/
- public function __construct(ConnectionInterface $connection, $table, $prefix = '')
+ public function __construct(ConnectionInterface $connection,
+ $table,
+ $prefix = '',
+ $lockTable = 'cache_locks',
+ $lockLottery = [2, 100])
{
$this->table = $table;
$this->prefix = $prefix;
$this->connection = $connection;
+ $this->lockTable = $lockTable;
+ $this->lockLottery = $lockLottery;
}
/**
@@ -87,16 +111,14 @@ class DatabaseStore implements Store
* Store an item in the cache for a given number of seconds.
*
* @param string $key
- * @param mixed $value
+ * @param mixed $value
* @param int $seconds
* @return bool
*/
public function put($key, $value, $seconds)
{
$key = $this->prefix.$key;
-
$value = $this->serialize($value);
-
$expiration = $this->getTime() + $seconds;
try {
@@ -108,11 +130,40 @@ class DatabaseStore implements Store
}
}
+ /**
+ * Store an item in the cache if the key doesn't exist.
+ *
+ * @param string $key
+ * @param mixed $value
+ * @param int $seconds
+ * @return bool
+ */
+ public function add($key, $value, $seconds)
+ {
+ $key = $this->prefix.$key;
+ $value = $this->serialize($value);
+ $expiration = $this->getTime() + $seconds;
+
+ try {
+ return $this->table()->insert(compact('key', 'value', 'expiration'));
+ } catch (QueryException $e) {
+ return $this->table()
+ ->where('key', $key)
+ ->where('expiration', '<=', $this->getTime())
+ ->update([
+ 'value' => $value,
+ 'expiration' => $expiration,
+ ]) >= 1;
+ }
+
+ return false;
+ }
+
/**
* Increment the value of an item in the cache.
*
* @param string $key
- * @param mixed $value
+ * @param mixed $value
* @return int|bool
*/
public function increment($key, $value = 1)
@@ -126,7 +177,7 @@ class DatabaseStore implements Store
* Decrement the value of an item in the cache.
*
* @param string $key
- * @param mixed $value
+ * @param mixed $value
* @return int|bool
*/
public function decrement($key, $value = 1)
@@ -197,7 +248,7 @@ class DatabaseStore implements Store
* Store an item in the cache indefinitely.
*
* @param string $key
- * @param mixed $value
+ * @param mixed $value
* @return bool
*/
public function forever($key, $value)
@@ -205,6 +256,38 @@ class DatabaseStore implements Store
return $this->put($key, $value, 315360000);
}
+ /**
+ * Get a lock instance.
+ *
+ * @param string $name
+ * @param int $seconds
+ * @param string|null $owner
+ * @return \Illuminate\Contracts\Cache\Lock
+ */
+ public function lock($name, $seconds = 0, $owner = null)
+ {
+ return new DatabaseLock(
+ $this->connection,
+ $this->lockTable,
+ $this->prefix.$name,
+ $seconds,
+ $owner,
+ $this->lockLottery
+ );
+ }
+
+ /**
+ * Restore a lock instance using the owner identifier.
+ *
+ * @param string $name
+ * @param string $owner
+ * @return \Illuminate\Contracts\Cache\Lock
+ */
+ public function restoreLock($name, $owner)
+ {
+ return $this->lock($name, 0, $owner);
+ }
+
/**
* Remove an item from the cache.
*
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/DynamoDbLock.php b/vendor/laravel/framework/src/Illuminate/Cache/DynamoDbLock.php
index abeabc139..54eec53f7 100644
--- a/vendor/laravel/framework/src/Illuminate/Cache/DynamoDbLock.php
+++ b/vendor/laravel/framework/src/Illuminate/Cache/DynamoDbLock.php
@@ -42,13 +42,15 @@ class DynamoDbLock extends Lock
/**
* Release the lock.
*
- * @return void
+ * @return bool
*/
public function release()
{
if ($this->isOwnedByCurrentProcess()) {
- $this->dynamo->forget($this->name);
+ return $this->dynamo->forget($this->name);
}
+
+ return false;
}
/**
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/DynamoDbStore.php b/vendor/laravel/framework/src/Illuminate/Cache/DynamoDbStore.php
index d5c84d6af..4e663db41 100644
--- a/vendor/laravel/framework/src/Illuminate/Cache/DynamoDbStore.php
+++ b/vendor/laravel/framework/src/Illuminate/Cache/DynamoDbStore.php
@@ -2,16 +2,16 @@
namespace Illuminate\Cache;
-use RuntimeException;
-use Illuminate\Support\Str;
-use Illuminate\Support\Carbon;
use Aws\DynamoDb\DynamoDbClient;
-use Illuminate\Contracts\Cache\Store;
-use Illuminate\Support\InteractsWithTime;
-use Illuminate\Contracts\Cache\LockProvider;
use Aws\DynamoDb\Exception\DynamoDbException;
+use Illuminate\Contracts\Cache\LockProvider;
+use Illuminate\Contracts\Cache\Store;
+use Illuminate\Support\Carbon;
+use Illuminate\Support\InteractsWithTime;
+use Illuminate\Support\Str;
+use RuntimeException;
-class DynamoDbStore implements Store, LockProvider
+class DynamoDbStore implements LockProvider, Store
{
use InteractsWithTime;
@@ -151,6 +151,7 @@ class DynamoDbStore implements Store, LockProvider
$now = Carbon::now();
return array_merge(collect(array_flip($keys))->map(function () {
+ //
})->all(), collect($response['Responses'][$this->table])->mapWithKeys(function ($response) use ($now) {
if ($this->isExpired($response, $now)) {
$value = null;
@@ -390,7 +391,7 @@ class DynamoDbStore implements Store, LockProvider
*/
public function forever($key, $value)
{
- return $this->put($key, $value, now()->addYears(5)->getTimestamp());
+ return $this->put($key, $value, Carbon::now()->addYears(5)->getTimestamp());
}
/**
@@ -442,6 +443,8 @@ class DynamoDbStore implements Store, LockProvider
* Remove all items from the cache.
*
* @return bool
+ *
+ * @throws \RuntimeException
*/
public function flush()
{
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php b/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php
index 228d69976..7295d9e6d 100755
--- a/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php
+++ b/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php
@@ -25,17 +25,26 @@ class FileStore implements Store
*/
protected $directory;
+ /**
+ * Octal representation of the cache file permissions.
+ *
+ * @var int|null
+ */
+ protected $filePermission;
+
/**
* Create a new file cache store instance.
*
* @param \Illuminate\Filesystem\Filesystem $files
* @param string $directory
+ * @param int|null $filePermission
* @return void
*/
- public function __construct(Filesystem $files, $directory)
+ public function __construct(Filesystem $files, $directory, $filePermission = null)
{
$this->files = $files;
$this->directory = $directory;
+ $this->filePermission = $filePermission;
}
/**
@@ -53,7 +62,7 @@ class FileStore implements Store
* Store an item in the cache for a given number of seconds.
*
* @param string $key
- * @param mixed $value
+ * @param mixed $value
* @param int $seconds
* @return bool
*/
@@ -65,7 +74,13 @@ class FileStore implements Store
$path, $this->expiration($seconds).serialize($value), true
);
- return $result !== false && $result > 0;
+ if ($result !== false && $result > 0) {
+ $this->ensureFileHasCorrectPermissions($path);
+
+ return true;
+ }
+
+ return false;
}
/**
@@ -81,11 +96,27 @@ class FileStore implements Store
}
}
+ /**
+ * Ensure the cache file has the correct permissions.
+ *
+ * @param string $path
+ * @return void
+ */
+ protected function ensureFileHasCorrectPermissions($path)
+ {
+ if (is_null($this->filePermission) ||
+ intval($this->files->chmod($path), 8) == $this->filePermission) {
+ return;
+ }
+
+ $this->files->chmod($path, $this->filePermission);
+ }
+
/**
* Increment the value of an item in the cache.
*
* @param string $key
- * @param mixed $value
+ * @param mixed $value
* @return int
*/
public function increment($key, $value = 1)
@@ -101,7 +132,7 @@ class FileStore implements Store
* Decrement the value of an item in the cache.
*
* @param string $key
- * @param mixed $value
+ * @param mixed $value
* @return int
*/
public function decrement($key, $value = 1)
@@ -113,7 +144,7 @@ class FileStore implements Store
* Store an item in the cache indefinitely.
*
* @param string $key
- * @param mixed $value
+ * @param mixed $value
* @return bool
*/
public function forever($key, $value)
@@ -148,7 +179,9 @@ class FileStore implements Store
}
foreach ($this->files->directories($this->directory) as $directory) {
- if (! $this->files->deleteDirectory($directory)) {
+ $deleted = $this->files->deleteDirectory($directory);
+
+ if (! $deleted || $this->files->exists($directory)) {
return false;
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Lock.php b/vendor/laravel/framework/src/Illuminate/Cache/Lock.php
index ccbfbaf18..271cba50f 100644
--- a/vendor/laravel/framework/src/Illuminate/Cache/Lock.php
+++ b/vendor/laravel/framework/src/Illuminate/Cache/Lock.php
@@ -2,10 +2,10 @@
namespace Illuminate\Cache;
-use Illuminate\Support\Str;
-use Illuminate\Support\InteractsWithTime;
use Illuminate\Contracts\Cache\Lock as LockContract;
use Illuminate\Contracts\Cache\LockTimeoutException;
+use Illuminate\Support\InteractsWithTime;
+use Illuminate\Support\Str;
abstract class Lock implements LockContract
{
@@ -32,6 +32,13 @@ abstract class Lock implements LockContract
*/
protected $owner;
+ /**
+ * The number of milliseconds to wait before re-attempting to acquire a lock while blocking.
+ *
+ * @var int
+ */
+ protected $sleepMilliseconds = 250;
+
/**
* Create a new lock instance.
*
@@ -61,7 +68,7 @@ abstract class Lock implements LockContract
/**
* Release the lock.
*
- * @return void
+ * @return bool
*/
abstract public function release();
@@ -107,7 +114,7 @@ abstract class Lock implements LockContract
$starting = $this->currentTime();
while (! $this->acquire()) {
- usleep(250 * 1000);
+ usleep($this->sleepMilliseconds * 1000);
if ($this->currentTime() - $seconds >= $starting) {
throw new LockTimeoutException;
@@ -144,4 +151,17 @@ abstract class Lock implements LockContract
{
return $this->getCurrentOwner() === $this->owner;
}
+
+ /**
+ * Specify the number of milliseconds to sleep in between blocked lock aquisition attempts.
+ *
+ * @param int $milliseconds
+ * @return $this
+ */
+ public function betweenBlockedAttemptsSleepFor($milliseconds)
+ {
+ $this->sleepMilliseconds = $milliseconds;
+
+ return $this;
+ }
}
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/MemcachedLock.php b/vendor/laravel/framework/src/Illuminate/Cache/MemcachedLock.php
index bf90abc99..0078a09e6 100644
--- a/vendor/laravel/framework/src/Illuminate/Cache/MemcachedLock.php
+++ b/vendor/laravel/framework/src/Illuminate/Cache/MemcachedLock.php
@@ -42,13 +42,15 @@ class MemcachedLock extends Lock
/**
* Release the lock.
*
- * @return void
+ * @return bool
*/
public function release()
{
if ($this->isOwnedByCurrentProcess()) {
- $this->memcached->delete($this->name);
+ return $this->memcached->delete($this->name);
}
+
+ return false;
}
/**
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/MemcachedStore.php b/vendor/laravel/framework/src/Illuminate/Cache/MemcachedStore.php
index 827f60290..299dab9ad 100755
--- a/vendor/laravel/framework/src/Illuminate/Cache/MemcachedStore.php
+++ b/vendor/laravel/framework/src/Illuminate/Cache/MemcachedStore.php
@@ -2,10 +2,10 @@
namespace Illuminate\Cache;
+use Illuminate\Contracts\Cache\LockProvider;
+use Illuminate\Support\InteractsWithTime;
use Memcached;
use ReflectionMethod;
-use Illuminate\Support\InteractsWithTime;
-use Illuminate\Contracts\Cache\LockProvider;
class MemcachedStore extends TaggableStore implements LockProvider
{
@@ -36,7 +36,7 @@ class MemcachedStore extends TaggableStore implements LockProvider
* Create a new Memcached store.
*
* @param \Memcached $memcached
- * @param string $prefix
+ * @param string $prefix
* @return void
*/
public function __construct($memcached, $prefix = '')
@@ -96,7 +96,7 @@ class MemcachedStore extends TaggableStore implements LockProvider
* Store an item in the cache for a given number of seconds.
*
* @param string $key
- * @param mixed $value
+ * @param mixed $value
* @param int $seconds
* @return bool
*/
@@ -131,7 +131,7 @@ class MemcachedStore extends TaggableStore implements LockProvider
* Store an item in the cache if the key doesn't exist.
*
* @param string $key
- * @param mixed $value
+ * @param mixed $value
* @param int $seconds
* @return bool
*/
@@ -146,7 +146,7 @@ class MemcachedStore extends TaggableStore implements LockProvider
* Increment the value of an item in the cache.
*
* @param string $key
- * @param mixed $value
+ * @param mixed $value
* @return int|bool
*/
public function increment($key, $value = 1)
@@ -158,7 +158,7 @@ class MemcachedStore extends TaggableStore implements LockProvider
* Decrement the value of an item in the cache.
*
* @param string $key
- * @param mixed $value
+ * @param mixed $value
* @return int|bool
*/
public function decrement($key, $value = 1)
@@ -170,7 +170,7 @@ class MemcachedStore extends TaggableStore implements LockProvider
* Store an item in the cache indefinitely.
*
* @param string $key
- * @param mixed $value
+ * @param mixed $value
* @return bool
*/
public function forever($key, $value)
@@ -181,9 +181,9 @@ class MemcachedStore extends TaggableStore implements LockProvider
/**
* Get a lock instance.
*
- * @param string $name
- * @param int $seconds
- * @param string|null $owner
+ * @param string $name
+ * @param int $seconds
+ * @param string|null $owner
* @return \Illuminate\Contracts\Cache\Lock
*/
public function lock($name, $seconds = 0, $owner = null)
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/NullStore.php b/vendor/laravel/framework/src/Illuminate/Cache/NullStore.php
index aa7a39757..43231b492 100755
--- a/vendor/laravel/framework/src/Illuminate/Cache/NullStore.php
+++ b/vendor/laravel/framework/src/Illuminate/Cache/NullStore.php
@@ -6,13 +6,6 @@ class NullStore extends TaggableStore
{
use RetrievesMultipleKeys;
- /**
- * The array of stored values.
- *
- * @var array
- */
- protected $storage = [];
-
/**
* Retrieve an item from the cache by key.
*
@@ -21,13 +14,14 @@ class NullStore extends TaggableStore
*/
public function get($key)
{
+ //
}
/**
* Store an item in the cache for a given number of seconds.
*
* @param string $key
- * @param mixed $value
+ * @param mixed $value
* @param int $seconds
* @return bool
*/
@@ -40,7 +34,7 @@ class NullStore extends TaggableStore
* Increment the value of an item in the cache.
*
* @param string $key
- * @param mixed $value
+ * @param mixed $value
* @return int|bool
*/
public function increment($key, $value = 1)
@@ -52,7 +46,7 @@ class NullStore extends TaggableStore
* Decrement the value of an item in the cache.
*
* @param string $key
- * @param mixed $value
+ * @param mixed $value
* @return int|bool
*/
public function decrement($key, $value = 1)
@@ -64,7 +58,7 @@ class NullStore extends TaggableStore
* Store an item in the cache indefinitely.
*
* @param string $key
- * @param mixed $value
+ * @param mixed $value
* @return bool
*/
public function forever($key, $value)
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/RateLimiter.php b/vendor/laravel/framework/src/Illuminate/Cache/RateLimiter.php
index c8b2d32dd..efa83d4fc 100644
--- a/vendor/laravel/framework/src/Illuminate/Cache/RateLimiter.php
+++ b/vendor/laravel/framework/src/Illuminate/Cache/RateLimiter.php
@@ -2,8 +2,8 @@
namespace Illuminate\Cache;
-use Illuminate\Support\InteractsWithTime;
use Illuminate\Contracts\Cache\Repository as Cache;
+use Illuminate\Support\InteractsWithTime;
class RateLimiter
{
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/RedisLock.php b/vendor/laravel/framework/src/Illuminate/Cache/RedisLock.php
index d83d44dea..9f62eada9 100644
--- a/vendor/laravel/framework/src/Illuminate/Cache/RedisLock.php
+++ b/vendor/laravel/framework/src/Illuminate/Cache/RedisLock.php
@@ -34,23 +34,21 @@ class RedisLock extends Lock
*/
public function acquire()
{
- $result = $this->redis->setnx($this->name, $this->owner);
-
- if ($result === 1 && $this->seconds > 0) {
- $this->redis->expire($this->name, $this->seconds);
+ if ($this->seconds > 0) {
+ return $this->redis->set($this->name, $this->owner, 'EX', $this->seconds, 'NX') == true;
+ } else {
+ return $this->redis->setnx($this->name, $this->owner) === 1;
}
-
- return $result === 1;
}
/**
* Release the lock.
*
- * @return void
+ * @return bool
*/
public function release()
{
- $this->redis->eval(LuaScripts::releaseLock(), 1, $this->name, $this->owner);
+ return (bool) $this->redis->eval(LuaScripts::releaseLock(), 1, $this->name, $this->owner);
}
/**
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php b/vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php
index d3b19b09b..f3aa8a3dc 100755
--- a/vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php
+++ b/vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php
@@ -83,7 +83,7 @@ class RedisStore extends TaggableStore implements LockProvider
* Store an item in the cache for a given number of seconds.
*
* @param string $key
- * @param mixed $value
+ * @param mixed $value
* @param int $seconds
* @return bool
*/
@@ -122,7 +122,7 @@ class RedisStore extends TaggableStore implements LockProvider
* Store an item in the cache if the key doesn't exist.
*
* @param string $key
- * @param mixed $value
+ * @param mixed $value
* @param int $seconds
* @return bool
*/
@@ -139,7 +139,7 @@ class RedisStore extends TaggableStore implements LockProvider
* Increment the value of an item in the cache.
*
* @param string $key
- * @param mixed $value
+ * @param mixed $value
* @return int
*/
public function increment($key, $value = 1)
@@ -151,7 +151,7 @@ class RedisStore extends TaggableStore implements LockProvider
* Decrement the value of an item in the cache.
*
* @param string $key
- * @param mixed $value
+ * @param mixed $value
* @return int
*/
public function decrement($key, $value = 1)
@@ -163,7 +163,7 @@ class RedisStore extends TaggableStore implements LockProvider
* Store an item in the cache indefinitely.
*
* @param string $key
- * @param mixed $value
+ * @param mixed $value
* @return bool
*/
public function forever($key, $value)
@@ -174,9 +174,9 @@ class RedisStore extends TaggableStore implements LockProvider
/**
* Get a lock instance.
*
- * @param string $name
- * @param int $seconds
- * @param string|null $owner
+ * @param string $name
+ * @param int $seconds
+ * @param string|null $owner
* @return \Illuminate\Contracts\Cache\Lock
*/
public function lock($name, $seconds = 0, $owner = null)
@@ -235,7 +235,7 @@ class RedisStore extends TaggableStore implements LockProvider
/**
* Get the Redis connection instance.
*
- * @return \Predis\ClientInterface
+ * @return \Illuminate\Redis\Connections\Connection
*/
public function connection()
{
@@ -292,7 +292,7 @@ class RedisStore extends TaggableStore implements LockProvider
*/
protected function serialize($value)
{
- return is_numeric($value) ? $value : serialize($value);
+ return is_numeric($value) && ! in_array($value, [INF, -INF]) && ! is_nan($value) ? $value : serialize($value);
}
/**
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/RedisTaggedCache.php b/vendor/laravel/framework/src/Illuminate/Cache/RedisTaggedCache.php
index ed90db1b4..ad50ce9ad 100644
--- a/vendor/laravel/framework/src/Illuminate/Cache/RedisTaggedCache.php
+++ b/vendor/laravel/framework/src/Illuminate/Cache/RedisTaggedCache.php
@@ -21,7 +21,7 @@ class RedisTaggedCache extends TaggedCache
* Store an item in the cache.
*
* @param string $key
- * @param mixed $value
+ * @param mixed $value
* @param \DateTimeInterface|\DateInterval|int|null $ttl
* @return bool
*/
@@ -179,7 +179,7 @@ class RedisTaggedCache extends TaggedCache
if (count($values) > 0) {
foreach (array_chunk($values, 1000) as $valuesChunk) {
- call_user_func_array([$this->store->connection(), 'del'], $valuesChunk);
+ $this->store->connection()->del(...$valuesChunk);
}
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Repository.php b/vendor/laravel/framework/src/Illuminate/Cache/Repository.php
index a0b7d2c67..a242e8afc 100755
--- a/vendor/laravel/framework/src/Illuminate/Cache/Repository.php
+++ b/vendor/laravel/framework/src/Illuminate/Cache/Repository.php
@@ -2,25 +2,25 @@
namespace Illuminate\Cache;
-use Closure;
use ArrayAccess;
-use DateTimeInterface;
use BadMethodCallException;
-use Illuminate\Support\Carbon;
+use Closure;
+use DateTimeInterface;
use Illuminate\Cache\Events\CacheHit;
-use Illuminate\Contracts\Cache\Store;
-use Illuminate\Cache\Events\KeyWritten;
use Illuminate\Cache\Events\CacheMissed;
-use Illuminate\Support\Traits\Macroable;
use Illuminate\Cache\Events\KeyForgotten;
-use Illuminate\Support\InteractsWithTime;
-use Illuminate\Contracts\Events\Dispatcher;
+use Illuminate\Cache\Events\KeyWritten;
use Illuminate\Contracts\Cache\Repository as CacheContract;
+use Illuminate\Contracts\Cache\Store;
+use Illuminate\Contracts\Events\Dispatcher;
+use Illuminate\Support\Carbon;
+use Illuminate\Support\InteractsWithTime;
+use Illuminate\Support\Traits\Macroable;
/**
* @mixin \Illuminate\Contracts\Cache\Store
*/
-class Repository implements CacheContract, ArrayAccess
+class Repository implements ArrayAccess, CacheContract
{
use InteractsWithTime;
use Macroable {
@@ -504,7 +504,7 @@ class Repository implements CacheContract, ArrayAccess
/**
* Get the default cache time.
*
- * @return int
+ * @return int|null
*/
public function getDefaultCacheTime()
{
@@ -547,6 +547,16 @@ class Repository implements CacheContract, ArrayAccess
}
}
+ /**
+ * Get the event dispatcher instance.
+ *
+ * @return \Illuminate\Contracts\Events\Dispatcher
+ */
+ public function getEventDispatcher()
+ {
+ return $this->events;
+ }
+
/**
* Set the event dispatcher instance.
*
@@ -584,7 +594,7 @@ class Repository implements CacheContract, ArrayAccess
* Store an item in the cache for the default time.
*
* @param string $key
- * @param mixed $value
+ * @param mixed $value
* @return void
*/
public function offsetSet($key, $value)
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/composer.json b/vendor/laravel/framework/src/Illuminate/Cache/composer.json
index 974782f0a..adce54e6a 100755
--- a/vendor/laravel/framework/src/Illuminate/Cache/composer.json
+++ b/vendor/laravel/framework/src/Illuminate/Cache/composer.json
@@ -14,9 +14,9 @@
}
],
"require": {
- "php": "^7.1.3",
- "illuminate/contracts": "5.8.*",
- "illuminate/support": "5.8.*"
+ "php": "^7.2.5|^8.0",
+ "illuminate/contracts": "^7.0",
+ "illuminate/support": "^7.0"
},
"autoload": {
"psr-4": {
@@ -25,13 +25,15 @@
},
"extra": {
"branch-alias": {
- "dev-master": "5.8-dev"
+ "dev-master": "7.x-dev"
}
},
"suggest": {
- "illuminate/database": "Required to use the database cache driver (5.8.*).",
- "illuminate/filesystem": "Required to use the file cache driver (5.8.*).",
- "illuminate/redis": "Required to use the redis cache driver (5.8.*)."
+ "ext-memcached": "Required to use the memcache cache driver.",
+ "illuminate/database": "Required to use the database cache driver (^7.0).",
+ "illuminate/filesystem": "Required to use the file cache driver (^7.0).",
+ "illuminate/redis": "Required to use the redis cache driver (^7.0).",
+ "symfony/cache": "Required to PSR-6 cache bridge (^5.0)."
},
"config": {
"sort-packages": true
diff --git a/vendor/laravel/framework/src/Illuminate/Config/Repository.php b/vendor/laravel/framework/src/Illuminate/Config/Repository.php
index cadcd64c9..5bcdcbf48 100644
--- a/vendor/laravel/framework/src/Illuminate/Config/Repository.php
+++ b/vendor/laravel/framework/src/Illuminate/Config/Repository.php
@@ -3,8 +3,8 @@
namespace Illuminate\Config;
use ArrayAccess;
-use Illuminate\Support\Arr;
use Illuminate\Contracts\Config\Repository as ConfigContract;
+use Illuminate\Support\Arr;
class Repository implements ArrayAccess, ConfigContract
{
@@ -41,7 +41,7 @@ class Repository implements ArrayAccess, ConfigContract
* Get the specified configuration value.
*
* @param array|string $key
- * @param mixed $default
+ * @param mixed $default
* @return mixed
*/
public function get($key, $default = null)
@@ -78,7 +78,7 @@ class Repository implements ArrayAccess, ConfigContract
* Set a given configuration value.
*
* @param array|string $key
- * @param mixed $value
+ * @param mixed $value
* @return void
*/
public function set($key, $value = null)
diff --git a/vendor/laravel/framework/src/Illuminate/Config/composer.json b/vendor/laravel/framework/src/Illuminate/Config/composer.json
index 661104034..3446109f2 100755
--- a/vendor/laravel/framework/src/Illuminate/Config/composer.json
+++ b/vendor/laravel/framework/src/Illuminate/Config/composer.json
@@ -14,9 +14,9 @@
}
],
"require": {
- "php": "^7.1.3",
- "illuminate/contracts": "5.8.*",
- "illuminate/support": "5.8.*"
+ "php": "^7.2.5|^8.0",
+ "illuminate/contracts": "^7.0",
+ "illuminate/support": "^7.0"
},
"autoload": {
"psr-4": {
@@ -25,7 +25,7 @@
},
"extra": {
"branch-alias": {
- "dev-master": "5.8-dev"
+ "dev-master": "7.x-dev"
}
},
"config": {
diff --git a/vendor/laravel/framework/src/Illuminate/Console/Application.php b/vendor/laravel/framework/src/Illuminate/Console/Application.php
index 4e6ba8539..7066c8485 100755
--- a/vendor/laravel/framework/src/Illuminate/Console/Application.php
+++ b/vendor/laravel/framework/src/Illuminate/Console/Application.php
@@ -3,22 +3,25 @@
namespace Illuminate\Console;
use Closure;
-use Illuminate\Support\ProcessUtils;
-use Illuminate\Contracts\Events\Dispatcher;
+use Illuminate\Console\Events\ArtisanStarting;
+use Illuminate\Console\Events\CommandFinished;
+use Illuminate\Console\Events\CommandStarting;
+use Illuminate\Contracts\Console\Application as ApplicationContract;
use Illuminate\Contracts\Container\Container;
-use Symfony\Component\Console\Input\ArgvInput;
-use Symfony\Component\Console\Input\ArrayInput;
-use Symfony\Component\Console\Input\InputOption;
-use Symfony\Component\Console\Input\StringInput;
-use Symfony\Component\Process\PhpExecutableFinder;
-use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Output\ConsoleOutput;
-use Symfony\Component\Console\Output\BufferedOutput;
-use Symfony\Component\Console\Output\OutputInterface;
+use Illuminate\Contracts\Events\Dispatcher;
+use Illuminate\Support\ProcessUtils;
use Symfony\Component\Console\Application as SymfonyApplication;
use Symfony\Component\Console\Command\Command as SymfonyCommand;
use Symfony\Component\Console\Exception\CommandNotFoundException;
-use Illuminate\Contracts\Console\Application as ApplicationContract;
+use Symfony\Component\Console\Input\ArgvInput;
+use Symfony\Component\Console\Input\ArrayInput;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Input\InputOption;
+use Symfony\Component\Console\Input\StringInput;
+use Symfony\Component\Console\Output\BufferedOutput;
+use Symfony\Component\Console\Output\ConsoleOutput;
+use Symfony\Component\Console\Output\OutputInterface;
+use Symfony\Component\Process\PhpExecutableFinder;
class Application extends SymfonyApplication implements ApplicationContract
{
@@ -67,7 +70,7 @@ class Application extends SymfonyApplication implements ApplicationContract
$this->setAutoExit(false);
$this->setCatchExceptions(false);
- $this->events->dispatch(new Events\ArtisanStarting($this));
+ $this->events->dispatch(new ArtisanStarting($this));
$this->bootstrap();
}
@@ -82,7 +85,7 @@ class Application extends SymfonyApplication implements ApplicationContract
);
$this->events->dispatch(
- new Events\CommandStarting(
+ new CommandStarting(
$commandName, $input, $output = $output ?: new ConsoleOutput
)
);
@@ -90,7 +93,7 @@ class Application extends SymfonyApplication implements ApplicationContract
$exitCode = parent::run($input, $output);
$this->events->dispatch(
- new Events\CommandFinished($commandName, $input, $output, $exitCode)
+ new CommandFinished($commandName, $input, $output, $exitCode)
);
return $exitCode;
diff --git a/vendor/laravel/framework/src/Illuminate/Console/Command.php b/vendor/laravel/framework/src/Illuminate/Console/Command.php
index a15691e3c..d5836c00e 100755
--- a/vendor/laravel/framework/src/Illuminate/Console/Command.php
+++ b/vendor/laravel/framework/src/Illuminate/Console/Command.php
@@ -2,22 +2,17 @@
namespace Illuminate\Console;
-use Illuminate\Support\Str;
use Illuminate\Support\Traits\Macroable;
-use Illuminate\Contracts\Support\Arrayable;
-use Symfony\Component\Console\Helper\Table;
-use Symfony\Component\Console\Input\ArrayInput;
-use Symfony\Component\Console\Output\NullOutput;
-use Symfony\Component\Console\Question\Question;
+use Symfony\Component\Console\Command\Command as SymfonyCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Console\Question\ChoiceQuestion;
-use Symfony\Component\Console\Formatter\OutputFormatterStyle;
-use Symfony\Component\Console\Command\Command as SymfonyCommand;
class Command extends SymfonyCommand
{
- use Macroable;
+ use Concerns\CallsCommands,
+ Concerns\HasParameters,
+ Concerns\InteractsWithIO,
+ Macroable;
/**
* The Laravel application instance.
@@ -26,20 +21,6 @@ class Command extends SymfonyCommand
*/
protected $laravel;
- /**
- * The input interface implementation.
- *
- * @var \Symfony\Component\Console\Input\InputInterface
- */
- protected $input;
-
- /**
- * The output interface implementation.
- *
- * @var \Illuminate\Console\OutputStyle
- */
- protected $output;
-
/**
* The name and signature of the console command.
*
@@ -57,10 +38,17 @@ class Command extends SymfonyCommand
/**
* The console command description.
*
- * @var string
+ * @var string|null
*/
protected $description;
+ /**
+ * The console command help text.
+ *
+ * @var string|null
+ */
+ protected $help;
+
/**
* Indicates whether the command should be shown in the Artisan command list.
*
@@ -68,26 +56,6 @@ class Command extends SymfonyCommand
*/
protected $hidden = false;
- /**
- * The default verbosity of output commands.
- *
- * @var int
- */
- protected $verbosity = OutputInterface::VERBOSITY_NORMAL;
-
- /**
- * The mapping between human readable verbosity levels and Symfony's OutputInterface.
- *
- * @var array
- */
- protected $verbosityMap = [
- 'v' => OutputInterface::VERBOSITY_VERBOSE,
- 'vv' => OutputInterface::VERBOSITY_VERY_VERBOSE,
- 'vvv' => OutputInterface::VERBOSITY_DEBUG,
- 'quiet' => OutputInterface::VERBOSITY_QUIET,
- 'normal' => OutputInterface::VERBOSITY_NORMAL,
- ];
-
/**
* Create a new console command instance.
*
@@ -107,7 +75,9 @@ class Command extends SymfonyCommand
// Once we have constructed the command, we'll set the description and other
// related properties of the command. If a signature wasn't used to build
// the command we'll set the arguments and the options on this command.
- $this->setDescription($this->description);
+ $this->setDescription((string) $this->description);
+
+ $this->setHelp((string) $this->help);
$this->setHidden($this->isHidden());
@@ -134,25 +104,6 @@ class Command extends SymfonyCommand
$this->getDefinition()->addOptions($options);
}
- /**
- * Specify the arguments and options on the command.
- *
- * @return void
- */
- protected function specifyParameters()
- {
- // We will loop through all of the arguments and options for the command and
- // set them all on the base command instance. This specifies what can get
- // passed into these commands as "parameters" to control the execution.
- foreach ($this->getArguments() as $arguments) {
- call_user_func_array([$this, 'addArgument'], $arguments);
- }
-
- foreach ($this->getOptions() as $options) {
- call_user_func_array([$this, 'addOption'], $options);
- }
- }
-
/**
* Run the console command.
*
@@ -176,389 +127,36 @@ class Command extends SymfonyCommand
*
* @param \Symfony\Component\Console\Input\InputInterface $input
* @param \Symfony\Component\Console\Output\OutputInterface $output
- * @return mixed
+ * @return int
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
- return $this->laravel->call([$this, 'handle']);
+ return (int) $this->laravel->call([$this, 'handle']);
}
/**
- * Call another console command.
+ * Resolve the console command instance for the given command.
*
- * @param string $command
- * @param array $arguments
- * @return int
+ * @param \Symfony\Component\Console\Command\Command|string $command
+ * @return \Symfony\Component\Console\Command\Command
*/
- public function call($command, array $arguments = [])
+ protected function resolveCommand($command)
{
- $arguments['command'] = $command;
-
- return $this->getApplication()->find($command)->run(
- $this->createInputFromArguments($arguments), $this->output
- );
- }
-
- /**
- * Call another console command silently.
- *
- * @param string $command
- * @param array $arguments
- * @return int
- */
- public function callSilent($command, array $arguments = [])
- {
- $arguments['command'] = $command;
-
- return $this->getApplication()->find($command)->run(
- $this->createInputFromArguments($arguments), new NullOutput
- );
- }
-
- /**
- * Create an input instance from the given arguments.
- *
- * @param array $arguments
- * @return \Symfony\Component\Console\Input\ArrayInput
- */
- protected function createInputFromArguments(array $arguments)
- {
- return tap(new ArrayInput(array_merge($this->context(), $arguments)), function ($input) {
- if ($input->hasParameterOption(['--no-interaction'], true)) {
- $input->setInteractive(false);
- }
- });
- }
-
- /**
- * Get all of the context passed to the command.
- *
- * @return array
- */
- protected function context()
- {
- return collect($this->option())->only([
- 'ansi',
- 'no-ansi',
- 'no-interaction',
- 'quiet',
- 'verbose',
- ])->filter()->mapWithKeys(function ($value, $key) {
- return ["--{$key}" => $value];
- })->all();
- }
-
- /**
- * Determine if the given argument is present.
- *
- * @param string|int $name
- * @return bool
- */
- public function hasArgument($name)
- {
- return $this->input->hasArgument($name);
- }
-
- /**
- * Get the value of a command argument.
- *
- * @param string|null $key
- * @return string|array|null
- */
- public function argument($key = null)
- {
- if (is_null($key)) {
- return $this->input->getArguments();
+ if (! class_exists($command)) {
+ return $this->getApplication()->find($command);
}
- return $this->input->getArgument($key);
- }
+ $command = $this->laravel->make($command);
- /**
- * Get all of the arguments passed to the command.
- *
- * @return array
- */
- public function arguments()
- {
- return $this->argument();
- }
-
- /**
- * Determine if the given option is present.
- *
- * @param string $name
- * @return bool
- */
- public function hasOption($name)
- {
- return $this->input->hasOption($name);
- }
-
- /**
- * Get the value of a command option.
- *
- * @param string|null $key
- * @return string|array|bool|null
- */
- public function option($key = null)
- {
- if (is_null($key)) {
- return $this->input->getOptions();
+ if ($command instanceof SymfonyCommand) {
+ $command->setApplication($this->getApplication());
}
- return $this->input->getOption($key);
- }
-
- /**
- * Get all of the options passed to the command.
- *
- * @return array
- */
- public function options()
- {
- return $this->option();
- }
-
- /**
- * Confirm a question with the user.
- *
- * @param string $question
- * @param bool $default
- * @return bool
- */
- public function confirm($question, $default = false)
- {
- return $this->output->confirm($question, $default);
- }
-
- /**
- * Prompt the user for input.
- *
- * @param string $question
- * @param string|null $default
- * @return mixed
- */
- public function ask($question, $default = null)
- {
- return $this->output->ask($question, $default);
- }
-
- /**
- * Prompt the user for input with auto completion.
- *
- * @param string $question
- * @param array $choices
- * @param string|null $default
- * @return mixed
- */
- public function anticipate($question, array $choices, $default = null)
- {
- return $this->askWithCompletion($question, $choices, $default);
- }
-
- /**
- * Prompt the user for input with auto completion.
- *
- * @param string $question
- * @param array $choices
- * @param string|null $default
- * @return mixed
- */
- public function askWithCompletion($question, array $choices, $default = null)
- {
- $question = new Question($question, $default);
-
- $question->setAutocompleterValues($choices);
-
- return $this->output->askQuestion($question);
- }
-
- /**
- * Prompt the user for input but hide the answer from the console.
- *
- * @param string $question
- * @param bool $fallback
- * @return mixed
- */
- public function secret($question, $fallback = true)
- {
- $question = new Question($question);
-
- $question->setHidden(true)->setHiddenFallback($fallback);
-
- return $this->output->askQuestion($question);
- }
-
- /**
- * Give the user a single choice from an array of answers.
- *
- * @param string $question
- * @param array $choices
- * @param string|null $default
- * @param mixed|null $attempts
- * @param bool|null $multiple
- * @return string
- */
- public function choice($question, array $choices, $default = null, $attempts = null, $multiple = null)
- {
- $question = new ChoiceQuestion($question, $choices, $default);
-
- $question->setMaxAttempts($attempts)->setMultiselect($multiple);
-
- return $this->output->askQuestion($question);
- }
-
- /**
- * Format input to textual table.
- *
- * @param array $headers
- * @param \Illuminate\Contracts\Support\Arrayable|array $rows
- * @param string $tableStyle
- * @param array $columnStyles
- * @return void
- */
- public function table($headers, $rows, $tableStyle = 'default', array $columnStyles = [])
- {
- $table = new Table($this->output);
-
- if ($rows instanceof Arrayable) {
- $rows = $rows->toArray();
+ if ($command instanceof self) {
+ $command->setLaravel($this->getLaravel());
}
- $table->setHeaders((array) $headers)->setRows($rows)->setStyle($tableStyle);
-
- foreach ($columnStyles as $columnIndex => $columnStyle) {
- $table->setColumnStyle($columnIndex, $columnStyle);
- }
-
- $table->render();
- }
-
- /**
- * Write a string as information output.
- *
- * @param string $string
- * @param int|string|null $verbosity
- * @return void
- */
- public function info($string, $verbosity = null)
- {
- $this->line($string, 'info', $verbosity);
- }
-
- /**
- * Write a string as standard output.
- *
- * @param string $string
- * @param string|null $style
- * @param int|string|null $verbosity
- * @return void
- */
- public function line($string, $style = null, $verbosity = null)
- {
- $styled = $style ? "<$style>$string$style>" : $string;
-
- $this->output->writeln($styled, $this->parseVerbosity($verbosity));
- }
-
- /**
- * Write a string as comment output.
- *
- * @param string $string
- * @param int|string|null $verbosity
- * @return void
- */
- public function comment($string, $verbosity = null)
- {
- $this->line($string, 'comment', $verbosity);
- }
-
- /**
- * Write a string as question output.
- *
- * @param string $string
- * @param int|string|null $verbosity
- * @return void
- */
- public function question($string, $verbosity = null)
- {
- $this->line($string, 'question', $verbosity);
- }
-
- /**
- * Write a string as error output.
- *
- * @param string $string
- * @param int|string|null $verbosity
- * @return void
- */
- public function error($string, $verbosity = null)
- {
- $this->line($string, 'error', $verbosity);
- }
-
- /**
- * Write a string as warning output.
- *
- * @param string $string
- * @param int|string|null $verbosity
- * @return void
- */
- public function warn($string, $verbosity = null)
- {
- if (! $this->output->getFormatter()->hasStyle('warning')) {
- $style = new OutputFormatterStyle('yellow');
-
- $this->output->getFormatter()->setStyle('warning', $style);
- }
-
- $this->line($string, 'warning', $verbosity);
- }
-
- /**
- * Write a string in an alert box.
- *
- * @param string $string
- * @return void
- */
- public function alert($string)
- {
- $length = Str::length(strip_tags($string)) + 12;
-
- $this->comment(str_repeat('*', $length));
- $this->comment('* '.$string.' *');
- $this->comment(str_repeat('*', $length));
-
- $this->output->newLine();
- }
-
- /**
- * Set the verbosity level.
- *
- * @param string|int $level
- * @return void
- */
- protected function setVerbosity($level)
- {
- $this->verbosity = $this->parseVerbosity($level);
- }
-
- /**
- * Get the verbosity level in terms of Symfony's OutputInterface level.
- *
- * @param string|int|null $level
- * @return int
- */
- protected function parseVerbosity($level = null)
- {
- if (isset($this->verbosityMap[$level])) {
- $level = $this->verbosityMap[$level];
- } elseif (! is_int($level)) {
- $level = $this->verbosity;
- }
-
- return $level;
+ return $command;
}
/**
@@ -572,43 +170,13 @@ class Command extends SymfonyCommand
/**
* {@inheritdoc}
*/
- public function setHidden($hidden)
+ public function setHidden(bool $hidden)
{
parent::setHidden($this->hidden = $hidden);
return $this;
}
- /**
- * Get the console command arguments.
- *
- * @return array
- */
- protected function getArguments()
- {
- return [];
- }
-
- /**
- * Get the console command options.
- *
- * @return array
- */
- protected function getOptions()
- {
- return [];
- }
-
- /**
- * Get the output implementation.
- *
- * @return \Illuminate\Console\OutputStyle
- */
- public function getOutput()
- {
- return $this->output;
- }
-
/**
* Get the Laravel application instance.
*
diff --git a/vendor/laravel/framework/src/Illuminate/Console/Concerns/CallsCommands.php b/vendor/laravel/framework/src/Illuminate/Console/Concerns/CallsCommands.php
new file mode 100644
index 000000000..e060c5562
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Console/Concerns/CallsCommands.php
@@ -0,0 +1,92 @@
+runCommand($command, $arguments, $this->output);
+ }
+
+ /**
+ * Call another console command silently.
+ *
+ * @param \Symfony\Component\Console\Command\Command|string $command
+ * @param array $arguments
+ * @return int
+ */
+ public function callSilent($command, array $arguments = [])
+ {
+ return $this->runCommand($command, $arguments, new NullOutput);
+ }
+
+ /**
+ * Run the given the console command.
+ *
+ * @param \Symfony\Component\Console\Command\Command|string $command
+ * @param array $arguments
+ * @param \Symfony\Component\Console\Output\OutputInterface $output
+ * @return int
+ */
+ protected function runCommand($command, array $arguments, OutputInterface $output)
+ {
+ $arguments['command'] = $command;
+
+ return $this->resolveCommand($command)->run(
+ $this->createInputFromArguments($arguments), $output
+ );
+ }
+
+ /**
+ * Create an input instance from the given arguments.
+ *
+ * @param array $arguments
+ * @return \Symfony\Component\Console\Input\ArrayInput
+ */
+ protected function createInputFromArguments(array $arguments)
+ {
+ return tap(new ArrayInput(array_merge($this->context(), $arguments)), function ($input) {
+ if ($input->getParameterOption('--no-interaction')) {
+ $input->setInteractive(false);
+ }
+ });
+ }
+
+ /**
+ * Get all of the context passed to the command.
+ *
+ * @return array
+ */
+ protected function context()
+ {
+ return collect($this->option())->only([
+ 'ansi',
+ 'no-ansi',
+ 'no-interaction',
+ 'quiet',
+ 'verbose',
+ ])->filter()->mapWithKeys(function ($value, $key) {
+ return ["--{$key}" => $value];
+ })->all();
+ }
+}
diff --git a/vendor/laravel/framework/src/Illuminate/Console/Concerns/HasParameters.php b/vendor/laravel/framework/src/Illuminate/Console/Concerns/HasParameters.php
new file mode 100644
index 000000000..e860ec2a2
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Console/Concerns/HasParameters.php
@@ -0,0 +1,56 @@
+getArguments() as $arguments) {
+ if ($arguments instanceof InputArgument) {
+ $this->getDefinition()->addArgument($arguments);
+ } else {
+ $this->addArgument(...array_values($arguments));
+ }
+ }
+
+ foreach ($this->getOptions() as $options) {
+ if ($options instanceof InputOption) {
+ $this->getDefinition()->addOption($options);
+ } else {
+ $this->addOption(...array_values($options));
+ }
+ }
+ }
+
+ /**
+ * Get the console command arguments.
+ *
+ * @return array
+ */
+ protected function getArguments()
+ {
+ return [];
+ }
+
+ /**
+ * Get the console command options.
+ *
+ * @return array
+ */
+ protected function getOptions()
+ {
+ return [];
+ }
+}
diff --git a/vendor/laravel/framework/src/Illuminate/Console/Concerns/InteractsWithIO.php b/vendor/laravel/framework/src/Illuminate/Console/Concerns/InteractsWithIO.php
new file mode 100644
index 000000000..e61ef5604
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Console/Concerns/InteractsWithIO.php
@@ -0,0 +1,397 @@
+ OutputInterface::VERBOSITY_VERBOSE,
+ 'vv' => OutputInterface::VERBOSITY_VERY_VERBOSE,
+ 'vvv' => OutputInterface::VERBOSITY_DEBUG,
+ 'quiet' => OutputInterface::VERBOSITY_QUIET,
+ 'normal' => OutputInterface::VERBOSITY_NORMAL,
+ ];
+
+ /**
+ * Determine if the given argument is present.
+ *
+ * @param string|int $name
+ * @return bool
+ */
+ public function hasArgument($name)
+ {
+ return $this->input->hasArgument($name);
+ }
+
+ /**
+ * Get the value of a command argument.
+ *
+ * @param string|null $key
+ * @return string|array|null
+ */
+ public function argument($key = null)
+ {
+ if (is_null($key)) {
+ return $this->input->getArguments();
+ }
+
+ return $this->input->getArgument($key);
+ }
+
+ /**
+ * Get all of the arguments passed to the command.
+ *
+ * @return array
+ */
+ public function arguments()
+ {
+ return $this->argument();
+ }
+
+ /**
+ * Determine if the given option is present.
+ *
+ * @param string $name
+ * @return bool
+ */
+ public function hasOption($name)
+ {
+ return $this->input->hasOption($name);
+ }
+
+ /**
+ * Get the value of a command option.
+ *
+ * @param string|null $key
+ * @return string|array|bool|null
+ */
+ public function option($key = null)
+ {
+ if (is_null($key)) {
+ return $this->input->getOptions();
+ }
+
+ return $this->input->getOption($key);
+ }
+
+ /**
+ * Get all of the options passed to the command.
+ *
+ * @return array
+ */
+ public function options()
+ {
+ return $this->option();
+ }
+
+ /**
+ * Confirm a question with the user.
+ *
+ * @param string $question
+ * @param bool $default
+ * @return bool
+ */
+ public function confirm($question, $default = false)
+ {
+ return $this->output->confirm($question, $default);
+ }
+
+ /**
+ * Prompt the user for input.
+ *
+ * @param string $question
+ * @param string|null $default
+ * @return mixed
+ */
+ public function ask($question, $default = null)
+ {
+ return $this->output->ask($question, $default);
+ }
+
+ /**
+ * Prompt the user for input with auto completion.
+ *
+ * @param string $question
+ * @param array|callable $choices
+ * @param string|null $default
+ * @return mixed
+ */
+ public function anticipate($question, $choices, $default = null)
+ {
+ return $this->askWithCompletion($question, $choices, $default);
+ }
+
+ /**
+ * Prompt the user for input with auto completion.
+ *
+ * @param string $question
+ * @param array|callable $choices
+ * @param string|null $default
+ * @return mixed
+ */
+ public function askWithCompletion($question, $choices, $default = null)
+ {
+ $question = new Question($question, $default);
+
+ is_callable($choices)
+ ? $question->setAutocompleterCallback($choices)
+ : $question->setAutocompleterValues($choices);
+
+ return $this->output->askQuestion($question);
+ }
+
+ /**
+ * Prompt the user for input but hide the answer from the console.
+ *
+ * @param string $question
+ * @param bool $fallback
+ * @return mixed
+ */
+ public function secret($question, $fallback = true)
+ {
+ $question = new Question($question);
+
+ $question->setHidden(true)->setHiddenFallback($fallback);
+
+ return $this->output->askQuestion($question);
+ }
+
+ /**
+ * Give the user a single choice from an array of answers.
+ *
+ * @param string $question
+ * @param array $choices
+ * @param string|null $default
+ * @param mixed|null $attempts
+ * @param bool $multiple
+ * @return string|array
+ */
+ public function choice($question, array $choices, $default = null, $attempts = null, $multiple = false)
+ {
+ $question = new ChoiceQuestion($question, $choices, $default);
+
+ $question->setMaxAttempts($attempts)->setMultiselect($multiple);
+
+ return $this->output->askQuestion($question);
+ }
+
+ /**
+ * Format input to textual table.
+ *
+ * @param array $headers
+ * @param \Illuminate\Contracts\Support\Arrayable|array $rows
+ * @param string $tableStyle
+ * @param array $columnStyles
+ * @return void
+ */
+ public function table($headers, $rows, $tableStyle = 'default', array $columnStyles = [])
+ {
+ $table = new Table($this->output);
+
+ if ($rows instanceof Arrayable) {
+ $rows = $rows->toArray();
+ }
+
+ $table->setHeaders((array) $headers)->setRows($rows)->setStyle($tableStyle);
+
+ foreach ($columnStyles as $columnIndex => $columnStyle) {
+ $table->setColumnStyle($columnIndex, $columnStyle);
+ }
+
+ $table->render();
+ }
+
+ /**
+ * Write a string as information output.
+ *
+ * @param string $string
+ * @param int|string|null $verbosity
+ * @return void
+ */
+ public function info($string, $verbosity = null)
+ {
+ $this->line($string, 'info', $verbosity);
+ }
+
+ /**
+ * Write a string as standard output.
+ *
+ * @param string $string
+ * @param string|null $style
+ * @param int|string|null $verbosity
+ * @return void
+ */
+ public function line($string, $style = null, $verbosity = null)
+ {
+ $styled = $style ? "<$style>$string$style>" : $string;
+
+ $this->output->writeln($styled, $this->parseVerbosity($verbosity));
+ }
+
+ /**
+ * Write a string as comment output.
+ *
+ * @param string $string
+ * @param int|string|null $verbosity
+ * @return void
+ */
+ public function comment($string, $verbosity = null)
+ {
+ $this->line($string, 'comment', $verbosity);
+ }
+
+ /**
+ * Write a string as question output.
+ *
+ * @param string $string
+ * @param int|string|null $verbosity
+ * @return void
+ */
+ public function question($string, $verbosity = null)
+ {
+ $this->line($string, 'question', $verbosity);
+ }
+
+ /**
+ * Write a string as error output.
+ *
+ * @param string $string
+ * @param int|string|null $verbosity
+ * @return void
+ */
+ public function error($string, $verbosity = null)
+ {
+ $this->line($string, 'error', $verbosity);
+ }
+
+ /**
+ * Write a string as warning output.
+ *
+ * @param string $string
+ * @param int|string|null $verbosity
+ * @return void
+ */
+ public function warn($string, $verbosity = null)
+ {
+ if (! $this->output->getFormatter()->hasStyle('warning')) {
+ $style = new OutputFormatterStyle('yellow');
+
+ $this->output->getFormatter()->setStyle('warning', $style);
+ }
+
+ $this->line($string, 'warning', $verbosity);
+ }
+
+ /**
+ * Write a string in an alert box.
+ *
+ * @param string $string
+ * @return void
+ */
+ public function alert($string)
+ {
+ $length = Str::length(strip_tags($string)) + 12;
+
+ $this->comment(str_repeat('*', $length));
+ $this->comment('* '.$string.' *');
+ $this->comment(str_repeat('*', $length));
+
+ $this->output->newLine();
+ }
+
+ /**
+ * Set the input interface implementation.
+ *
+ * @param \Symfony\Component\Console\Input\InputInterface $input
+ * @return void
+ */
+ public function setInput(InputInterface $input)
+ {
+ $this->input = $input;
+ }
+
+ /**
+ * Set the output interface implementation.
+ *
+ * @param \Illuminate\Console\OutputStyle $output
+ * @return void
+ */
+ public function setOutput(OutputStyle $output)
+ {
+ $this->output = $output;
+ }
+
+ /**
+ * Set the verbosity level.
+ *
+ * @param string|int $level
+ * @return void
+ */
+ protected function setVerbosity($level)
+ {
+ $this->verbosity = $this->parseVerbosity($level);
+ }
+
+ /**
+ * Get the verbosity level in terms of Symfony's OutputInterface level.
+ *
+ * @param string|int|null $level
+ * @return int
+ */
+ protected function parseVerbosity($level = null)
+ {
+ if (isset($this->verbosityMap[$level])) {
+ $level = $this->verbosityMap[$level];
+ } elseif (! is_int($level)) {
+ $level = $this->verbosity;
+ }
+
+ return $level;
+ }
+
+ /**
+ * Get the output implementation.
+ *
+ * @return \Illuminate\Console\OutputStyle
+ */
+ public function getOutput()
+ {
+ return $this->output;
+ }
+}
diff --git a/vendor/laravel/framework/src/Illuminate/Console/ConfirmableTrait.php b/vendor/laravel/framework/src/Illuminate/Console/ConfirmableTrait.php
index 280747cf6..8d0d6df77 100644
--- a/vendor/laravel/framework/src/Illuminate/Console/ConfirmableTrait.php
+++ b/vendor/laravel/framework/src/Illuminate/Console/ConfirmableTrait.php
@@ -2,8 +2,6 @@
namespace Illuminate\Console;
-use Closure;
-
trait ConfirmableTrait
{
/**
@@ -19,7 +17,7 @@ trait ConfirmableTrait
{
$callback = is_null($callback) ? $this->getDefaultConfirmCallback() : $callback;
- $shouldConfirm = $callback instanceof Closure ? call_user_func($callback) : $callback;
+ $shouldConfirm = value($callback);
if ($shouldConfirm) {
if ($this->hasOption('force') && $this->option('force')) {
@@ -31,7 +29,7 @@ trait ConfirmableTrait
$confirmed = $this->confirm('Do you really wish to run this command?');
if (! $confirmed) {
- $this->comment('Command Cancelled!');
+ $this->comment('Command Canceled!');
return false;
}
diff --git a/vendor/laravel/framework/src/Illuminate/Console/DetectsApplicationNamespace.php b/vendor/laravel/framework/src/Illuminate/Console/DetectsApplicationNamespace.php
deleted file mode 100644
index cb5e8e849..000000000
--- a/vendor/laravel/framework/src/Illuminate/Console/DetectsApplicationNamespace.php
+++ /dev/null
@@ -1,18 +0,0 @@
-getNamespace();
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Console/Events/ScheduledTaskFailed.php b/vendor/laravel/framework/src/Illuminate/Console/Events/ScheduledTaskFailed.php
new file mode 100644
index 000000000..992d339f1
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Console/Events/ScheduledTaskFailed.php
@@ -0,0 +1,35 @@
+task = $task;
+ $this->exception = $exception;
+ }
+}
diff --git a/vendor/laravel/framework/src/Illuminate/Console/Events/ScheduledTaskFinished.php b/vendor/laravel/framework/src/Illuminate/Console/Events/ScheduledTaskFinished.php
new file mode 100644
index 000000000..614696622
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Console/Events/ScheduledTaskFinished.php
@@ -0,0 +1,35 @@
+task = $task;
+ $this->runtime = $runtime;
+ }
+}
diff --git a/vendor/laravel/framework/src/Illuminate/Console/Events/ScheduledTaskSkipped.php b/vendor/laravel/framework/src/Illuminate/Console/Events/ScheduledTaskSkipped.php
new file mode 100644
index 000000000..cfa7141da
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Console/Events/ScheduledTaskSkipped.php
@@ -0,0 +1,26 @@
+task = $task;
+ }
+}
diff --git a/vendor/laravel/framework/src/Illuminate/Console/Events/ScheduledTaskStarting.php b/vendor/laravel/framework/src/Illuminate/Console/Events/ScheduledTaskStarting.php
new file mode 100644
index 000000000..66aaaa4c0
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Console/Events/ScheduledTaskStarting.php
@@ -0,0 +1,26 @@
+task = $task;
+ }
+}
diff --git a/vendor/laravel/framework/src/Illuminate/Console/GeneratorCommand.php b/vendor/laravel/framework/src/Illuminate/Console/GeneratorCommand.php
index ec5eb8cd5..8af456b1f 100644
--- a/vendor/laravel/framework/src/Illuminate/Console/GeneratorCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Console/GeneratorCommand.php
@@ -2,8 +2,8 @@
namespace Illuminate\Console;
-use Illuminate\Support\Str;
use Illuminate\Filesystem\Filesystem;
+use Illuminate\Support\Str;
use Symfony\Component\Console\Input\InputArgument;
abstract class GeneratorCommand extends Command
@@ -22,6 +22,82 @@ abstract class GeneratorCommand extends Command
*/
protected $type;
+ /**
+ * Reserved names that cannot be used for generation.
+ *
+ * @var array
+ */
+ protected $reservedNames = [
+ '__halt_compiler',
+ 'abstract',
+ 'and',
+ 'array',
+ 'as',
+ 'break',
+ 'callable',
+ 'case',
+ 'catch',
+ 'class',
+ 'clone',
+ 'const',
+ 'continue',
+ 'declare',
+ 'default',
+ 'die',
+ 'do',
+ 'echo',
+ 'else',
+ 'elseif',
+ 'empty',
+ 'enddeclare',
+ 'endfor',
+ 'endforeach',
+ 'endif',
+ 'endswitch',
+ 'endwhile',
+ 'eval',
+ 'exit',
+ 'extends',
+ 'final',
+ 'finally',
+ 'fn',
+ 'for',
+ 'foreach',
+ 'function',
+ 'global',
+ 'goto',
+ 'if',
+ 'implements',
+ 'include',
+ 'include_once',
+ 'instanceof',
+ 'insteadof',
+ 'interface',
+ 'isset',
+ 'list',
+ 'namespace',
+ 'new',
+ 'or',
+ 'print',
+ 'private',
+ 'protected',
+ 'public',
+ 'require',
+ 'require_once',
+ 'return',
+ 'static',
+ 'switch',
+ 'throw',
+ 'trait',
+ 'try',
+ 'unset',
+ 'use',
+ 'var',
+ 'while',
+ 'xor',
+ 'yield',
+ ];
+
/**
* Create a new controller creator command instance.
*
@@ -46,15 +122,25 @@ abstract class GeneratorCommand extends Command
* Execute the console command.
*
* @return bool|null
+ *
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/
public function handle()
{
+ // First we need to ensure that the given name is not a reserved word within the PHP
+ // language and that the class name will actually be valid. If it is not valid we
+ // can error now and prevent from polluting the filesystem using invalid files.
+ if ($this->isReservedName($this->getNameInput())) {
+ $this->error('The name "'.$this->getNameInput().'" is reserved by PHP.');
+
+ return false;
+ }
+
$name = $this->qualifyClass($this->getNameInput());
$path = $this->getPath($name);
- // First we will check to see if the class already exists. If it does, we don't want
+ // Next, We will check to see if the class already exists. If it does, we don't want
// to create the class and overwrite the user's code. So, we will bail out so the
// code is untouched. Otherwise, we will continue generating this class' files.
if ((! $this->hasOption('force') ||
@@ -70,7 +156,7 @@ abstract class GeneratorCommand extends Command
// stub files so that it gets the correctly formatted namespace and class name.
$this->makeDirectory($path);
- $this->files->put($path, $this->buildClass($name));
+ $this->files->put($path, $this->sortImports($this->buildClass($name)));
$this->info($this->type.' created successfully.');
}
@@ -153,6 +239,7 @@ abstract class GeneratorCommand extends Command
*
* @param string $name
* @return string
+ *
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/
protected function buildClass($name)
@@ -171,11 +258,19 @@ abstract class GeneratorCommand extends Command
*/
protected function replaceNamespace(&$stub, $name)
{
- $stub = str_replace(
+ $searches = [
['DummyNamespace', 'DummyRootNamespace', 'NamespacedDummyUserModel'],
- [$this->getNamespace($name), $this->rootNamespace(), $this->userProviderModel()],
- $stub
- );
+ ['{{ namespace }}', '{{ rootNamespace }}', '{{ namespacedUserModel }}'],
+ ['{{namespace}}', '{{rootNamespace}}', '{{namespacedUserModel}}'],
+ ];
+
+ foreach ($searches as $search) {
+ $stub = str_replace(
+ $search,
+ [$this->getNamespace($name), $this->rootNamespace(), $this->userProviderModel()],
+ $stub
+ );
+ }
return $this;
}
@@ -202,7 +297,26 @@ abstract class GeneratorCommand extends Command
{
$class = str_replace($this->getNamespace($name).'\\', '', $name);
- return str_replace('DummyClass', $class, $stub);
+ return str_replace(['DummyClass', '{{ class }}', '{{class}}'], $class, $stub);
+ }
+
+ /**
+ * Alphabetically sorts the imports for the given stub.
+ *
+ * @param string $stub
+ * @return string
+ */
+ protected function sortImports($stub)
+ {
+ if (preg_match('/(?P(?:use [^;]+;$\n?)+)/m', $stub, $match)) {
+ $imports = explode("\n", trim($match['imports']));
+
+ sort($imports);
+
+ return str_replace(trim($match['imports']), implode("\n", $imports), $stub);
+ }
+
+ return $stub;
}
/**
@@ -232,11 +346,37 @@ abstract class GeneratorCommand extends Command
*/
protected function userProviderModel()
{
- $guard = config('auth.defaults.guard');
+ $config = $this->laravel['config'];
- $provider = config("auth.guards.{$guard}.provider");
+ $provider = $config->get('auth.guards.'.$config->get('auth.defaults.guard').'.provider');
- return config("auth.providers.{$provider}.model");
+ return $config->get("auth.providers.{$provider}.model");
+ }
+
+ /**
+ * Checks whether the given name is reserved.
+ *
+ * @param string $name
+ * @return bool
+ */
+ protected function isReservedName($name)
+ {
+ $name = strtolower($name);
+
+ return in_array($name, $this->reservedNames);
+ }
+
+ /**
+ * Get the first view directory path from the application configuration.
+ *
+ * @param string $path
+ * @return string
+ */
+ protected function viewPath($path = '')
+ {
+ $views = $this->laravel['config']['view.paths'][0] ?? resource_path('views');
+
+ return $views.($path ? DIRECTORY_SEPARATOR.$path : $path);
}
/**
diff --git a/vendor/laravel/framework/src/Illuminate/Console/OutputStyle.php b/vendor/laravel/framework/src/Illuminate/Console/OutputStyle.php
index 925e66dac..fe5dc450c 100644
--- a/vendor/laravel/framework/src/Illuminate/Console/OutputStyle.php
+++ b/vendor/laravel/framework/src/Illuminate/Console/OutputStyle.php
@@ -2,9 +2,9 @@
namespace Illuminate\Console;
-use Symfony\Component\Console\Style\SymfonyStyle;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
+use Symfony\Component\Console\Style\SymfonyStyle;
class OutputStyle extends SymfonyStyle
{
diff --git a/vendor/laravel/framework/src/Illuminate/Console/Parser.php b/vendor/laravel/framework/src/Illuminate/Console/Parser.php
index 776431014..00dca1cd6 100644
--- a/vendor/laravel/framework/src/Illuminate/Console/Parser.php
+++ b/vendor/laravel/framework/src/Illuminate/Console/Parser.php
@@ -4,8 +4,8 @@ namespace Illuminate\Console;
use Illuminate\Support\Str;
use InvalidArgumentException;
-use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
+use Symfony\Component\Console\Input\InputOption;
class Parser
{
@@ -40,10 +40,6 @@ class Parser
*/
protected static function name($expression)
{
- if (trim($expression) === '') {
- throw new InvalidArgumentException('Console command definition is empty.');
- }
-
if (! preg_match('/[^\s]+/', $expression, $matches)) {
throw new InvalidArgumentException('Unable to determine command name from signature.');
}
diff --git a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/CacheAware.php b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/CacheAware.php
new file mode 100644
index 000000000..862c47f5e
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/CacheAware.php
@@ -0,0 +1,14 @@
+mutex = $mutex;
$this->callback = $callback;
$this->parameters = $parameters;
+ $this->timezone = $timezone;
}
/**
@@ -161,6 +164,6 @@ class CallbackEvent extends Event
return $this->description;
}
- return is_string($this->callback) ? $this->callback : 'Closure';
+ return is_string($this->callback) ? $this->callback : 'Callback';
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/CommandBuilder.php b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/CommandBuilder.php
index df7cdf61d..bc833bd27 100644
--- a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/CommandBuilder.php
+++ b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/CommandBuilder.php
@@ -51,8 +51,12 @@ class CommandBuilder
$finished = Application::formatCommandString('schedule:finish').' "'.$event->mutexName().'"';
+ if (windows_os()) {
+ return 'start /b cmd /c "('.$event->command.' & '.$finished.' "%errorlevel%")'.$redirect.$output.' 2>&1"';
+ }
+
return $this->ensureCorrectUser($event,
- '('.$event->command.$redirect.$output.' 2>&1 '.(windows_os() ? '&' : ';').' '.$finished.') > '
+ '('.$event->command.$redirect.$output.' 2>&1 ; '.$finished.' "$?") > '
.ProcessUtils::escapeArgument($event->getDefaultOutput()).' 2>&1 &'
);
}
diff --git a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/Event.php b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/Event.php
index 510cbaba8..dfb505045 100644
--- a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/Event.php
+++ b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/Event.php
@@ -4,18 +4,23 @@ namespace Illuminate\Console\Scheduling;
use Closure;
use Cron\CronExpression;
+use GuzzleHttp\Client as HttpClient;
+use GuzzleHttp\Exception\TransferException;
+use Illuminate\Contracts\Container\Container;
+use Illuminate\Contracts\Debug\ExceptionHandler;
+use Illuminate\Contracts\Mail\Mailer;
use Illuminate\Support\Arr;
use Illuminate\Support\Carbon;
-use GuzzleHttp\Client as HttpClient;
use Illuminate\Support\Facades\Date;
-use Illuminate\Contracts\Mail\Mailer;
-use Symfony\Component\Process\Process;
+use Illuminate\Support\Reflector;
use Illuminate\Support\Traits\Macroable;
-use Illuminate\Contracts\Container\Container;
+use Illuminate\Support\Traits\ReflectsClosures;
+use Psr\Http\Client\ClientExceptionInterface;
+use Symfony\Component\Process\Process;
class Event
{
- use Macroable, ManagesFrequencies;
+ use Macroable, ManagesFrequencies, ReflectsClosures;
/**
* The command string.
@@ -155,7 +160,7 @@ class Event
*
* @param \Illuminate\Console\Scheduling\EventMutex $mutex
* @param string $command
- * @param \DateTimeZone|string|null $timezone
+ * @param \DateTimeZone|string|null $timezone
* @return void
*/
public function __construct(EventMutex $mutex, $command, $timezone = null)
@@ -259,6 +264,20 @@ class Event
}
}
+ /**
+ * Call all of the "after" callbacks for the event.
+ *
+ * @param \Illuminate\Contracts\Container\Container $container
+ * @param int $exitCode
+ * @return void
+ */
+ public function callAfterCallbacksWithExitCode(Container $container, $exitCode)
+ {
+ $this->exitCode = (int) $exitCode;
+
+ $this->callAfterCallbacks($container);
+ }
+
/**
* Build the command string.
*
@@ -489,9 +508,7 @@ class Event
*/
public function pingBefore($url)
{
- return $this->before(function () use ($url) {
- (new HttpClient)->get($url);
- });
+ return $this->before($this->pingCallback($url));
}
/**
@@ -514,9 +531,7 @@ class Event
*/
public function thenPing($url)
{
- return $this->then(function () use ($url) {
- (new HttpClient)->get($url);
- });
+ return $this->then($this->pingCallback($url));
}
/**
@@ -539,9 +554,7 @@ class Event
*/
public function pingOnSuccess($url)
{
- return $this->onSuccess(function () use ($url) {
- (new HttpClient)->get($url);
- });
+ return $this->onSuccess($this->pingCallback($url));
}
/**
@@ -552,9 +565,24 @@ class Event
*/
public function pingOnFailure($url)
{
- return $this->onFailure(function () use ($url) {
- (new HttpClient)->get($url);
- });
+ return $this->onFailure($this->pingCallback($url));
+ }
+
+ /**
+ * Get the callback that pings the given URL.
+ *
+ * @param string $url
+ * @return \Closure
+ */
+ protected function pingCallback($url)
+ {
+ return function (Container $container, HttpClient $http) use ($url) {
+ try {
+ $http->request('GET', $url);
+ } catch (ClientExceptionInterface | TransferException $e) {
+ $container->make(ExceptionHandler::class)->report($e);
+ }
+ };
}
/**
@@ -646,7 +674,7 @@ class Event
*/
public function when($callback)
{
- $this->filters[] = is_callable($callback) ? $callback : function () use ($callback) {
+ $this->filters[] = Reflector::isCallable($callback) ? $callback : function () use ($callback) {
return $callback;
};
@@ -661,7 +689,7 @@ class Event
*/
public function skip($callback)
{
- $this->rejects[] = is_callable($callback) ? $callback : function () use ($callback) {
+ $this->rejects[] = Reflector::isCallable($callback) ? $callback : function () use ($callback) {
return $callback;
};
@@ -705,6 +733,20 @@ class Event
return $this;
}
+ /**
+ * Register a callback that uses the output after the job runs.
+ *
+ * @param \Closure $callback
+ * @param bool $onlyIfOutputExists
+ * @return $this
+ */
+ public function thenWithOutput(Closure $callback, $onlyIfOutputExists = false)
+ {
+ $this->ensureOutputIsBeingCaptured();
+
+ return $this->then($this->withOutputCallback($callback, $onlyIfOutputExists));
+ }
+
/**
* Register a callback to be called if the operation succeeds.
*
@@ -720,6 +762,20 @@ class Event
});
}
+ /**
+ * Register a callback that uses the output if the operation succeeds.
+ *
+ * @param \Closure $callback
+ * @param bool $onlyIfOutputExists
+ * @return $this
+ */
+ public function onSuccessWithOutput(Closure $callback, $onlyIfOutputExists = false)
+ {
+ $this->ensureOutputIsBeingCaptured();
+
+ return $this->onSuccess($this->withOutputCallback($callback, $onlyIfOutputExists));
+ }
+
/**
* Register a callback to be called if the operation fails.
*
@@ -735,6 +791,38 @@ class Event
});
}
+ /**
+ * Register a callback that uses the output if the operation fails.
+ *
+ * @param \Closure $callback
+ * @param bool $onlyIfOutputExists
+ * @return $this
+ */
+ public function onFailureWithOutput(Closure $callback, $onlyIfOutputExists = false)
+ {
+ $this->ensureOutputIsBeingCaptured();
+
+ return $this->onFailure($this->withOutputCallback($callback, $onlyIfOutputExists));
+ }
+
+ /**
+ * Get a callback that provides output.
+ *
+ * @param \Closure $callback
+ * @param bool $onlyIfOutputExists
+ * @return \Closure
+ */
+ protected function withOutputCallback(Closure $callback, $onlyIfOutputExists = false)
+ {
+ return function (Container $container) use ($callback, $onlyIfOutputExists) {
+ $output = $this->output && file_exists($this->output) ? file_get_contents($this->output) : '';
+
+ return $onlyIfOutputExists && empty($output)
+ ? null
+ : $container->call($callback, ['output' => $output]);
+ };
+ }
+
/**
* Set the human-friendly description of the event.
*
diff --git a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ManagesFrequencies.php b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ManagesFrequencies.php
index ced7e754a..6972642c0 100644
--- a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ManagesFrequencies.php
+++ b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ManagesFrequencies.php
@@ -52,12 +52,22 @@ trait ManagesFrequencies
*/
private function inTimeInterval($startTime, $endTime)
{
- return function () use ($startTime, $endTime) {
- return Carbon::now($this->timezone)->between(
- Carbon::parse($startTime, $this->timezone),
- Carbon::parse($endTime, $this->timezone),
- true
- );
+ [$now, $startTime, $endTime] = [
+ Carbon::now($this->timezone),
+ Carbon::parse($startTime, $this->timezone),
+ Carbon::parse($endTime, $this->timezone),
+ ];
+
+ if ($endTime->lessThan($startTime)) {
+ if ($startTime->greaterThan($now)) {
+ $startTime->subDay(1);
+ } else {
+ $endTime->addDay(1);
+ }
+ }
+
+ return function () use ($now, $startTime, $endTime) {
+ return $now->between($startTime, $endTime);
};
}
@@ -71,6 +81,36 @@ trait ManagesFrequencies
return $this->spliceIntoPosition(1, '*');
}
+ /**
+ * Schedule the event to run every two minutes.
+ *
+ * @return $this
+ */
+ public function everyTwoMinutes()
+ {
+ return $this->spliceIntoPosition(1, '*/2');
+ }
+
+ /**
+ * Schedule the event to run every three minutes.
+ *
+ * @return $this
+ */
+ public function everyThreeMinutes()
+ {
+ return $this->spliceIntoPosition(1, '*/3');
+ }
+
+ /**
+ * Schedule the event to run every four minutes.
+ *
+ * @return $this
+ */
+ public function everyFourMinutes()
+ {
+ return $this->spliceIntoPosition(1, '*/4');
+ }
+
/**
* Schedule the event to run every five minutes.
*
@@ -134,6 +174,50 @@ trait ManagesFrequencies
return $this->spliceIntoPosition(1, $offset);
}
+ /**
+ * Schedule the event to run every two hours.
+ *
+ * @return $this
+ */
+ public function everyTwoHours()
+ {
+ return $this->spliceIntoPosition(1, 0)
+ ->spliceIntoPosition(2, '*/2');
+ }
+
+ /**
+ * Schedule the event to run every three hours.
+ *
+ * @return $this
+ */
+ public function everyThreeHours()
+ {
+ return $this->spliceIntoPosition(1, 0)
+ ->spliceIntoPosition(2, '*/3');
+ }
+
+ /**
+ * Schedule the event to run every four hours.
+ *
+ * @return $this
+ */
+ public function everyFourHours()
+ {
+ return $this->spliceIntoPosition(1, 0)
+ ->spliceIntoPosition(2, '*/4');
+ }
+
+ /**
+ * Schedule the event to run every six hours.
+ *
+ * @return $this
+ */
+ public function everySixHours()
+ {
+ return $this->spliceIntoPosition(1, 0)
+ ->spliceIntoPosition(2, '*/6');
+ }
+
/**
* Schedule the event to run daily.
*
@@ -328,21 +412,37 @@ trait ManagesFrequencies
}
/**
- * Schedule the event to run twice monthly.
+ * Schedule the event to run twice monthly at a given time.
*
* @param int $first
* @param int $second
+ * @param string $time
* @return $this
*/
- public function twiceMonthly($first = 1, $second = 16)
+ public function twiceMonthly($first = 1, $second = 16, $time = '0:0')
{
$days = $first.','.$second;
+ $this->dailyAt($time);
+
return $this->spliceIntoPosition(1, 0)
->spliceIntoPosition(2, 0)
->spliceIntoPosition(3, $days);
}
+ /**
+ * Schedule the event to run on the last day of the month.
+ *
+ * @param string $time
+ * @return $this
+ */
+ public function lastDayOfMonth($time = '0:0')
+ {
+ $this->dailyAt($time);
+
+ return $this->spliceIntoPosition(3, Carbon::now()->endOfMonth()->day);
+ }
+
/**
* Schedule the event to run quarterly.
*
diff --git a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/Schedule.php b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/Schedule.php
index b2de55157..89ad97209 100644
--- a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/Schedule.php
+++ b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/Schedule.php
@@ -2,14 +2,23 @@
namespace Illuminate\Console\Scheduling;
+use Closure;
use DateTimeInterface;
use Illuminate\Console\Application;
use Illuminate\Container\Container;
-use Illuminate\Support\ProcessUtils;
+use Illuminate\Contracts\Bus\Dispatcher;
+use Illuminate\Contracts\Container\BindingResolutionException;
use Illuminate\Contracts\Queue\ShouldQueue;
+use Illuminate\Queue\CallQueuedClosure;
+use Illuminate\Support\ProcessUtils;
+use Illuminate\Support\Str;
+use Illuminate\Support\Traits\Macroable;
+use RuntimeException;
class Schedule
{
+ use Macroable;
+
/**
* All of the events on the schedule.
*
@@ -38,6 +47,13 @@ class Schedule
*/
protected $timezone;
+ /**
+ * The job dispatcher implementation.
+ *
+ * @var \Illuminate\Contracts\Bus\Dispatcher
+ */
+ protected $dispatcher;
+
/**
* Create a new schedule instance.
*
@@ -48,6 +64,12 @@ class Schedule
{
$this->timezone = $timezone;
+ if (! class_exists(Container::class)) {
+ throw new RuntimeException(
+ 'A container implementation is required to use the scheduler. Please install the illuminate/container package.'
+ );
+ }
+
$container = Container::getInstance();
$this->eventMutex = $container->bound(EventMutex::class)
@@ -69,7 +91,7 @@ class Schedule
public function call($callback, array $parameters = [])
{
$this->events[] = $event = new CallbackEvent(
- $this->eventMutex, $callback, $parameters
+ $this->eventMutex, $callback, $parameters, $this->timezone
);
return $event;
@@ -104,18 +126,52 @@ class Schedule
public function job($job, $queue = null, $connection = null)
{
return $this->call(function () use ($job, $queue, $connection) {
- $job = is_string($job) ? resolve($job) : $job;
+ $job = is_string($job) ? Container::getInstance()->make($job) : $job;
if ($job instanceof ShouldQueue) {
- dispatch($job)
- ->onConnection($connection ?? $job->connection)
- ->onQueue($queue ?? $job->queue);
+ $this->dispatchToQueue($job, $queue ?? $job->queue, $connection ?? $job->connection);
} else {
- dispatch_now($job);
+ $this->dispatchNow($job);
}
})->name(is_string($job) ? $job : get_class($job));
}
+ /**
+ * Dispatch the given job to the queue.
+ *
+ * @param object $job
+ * @param string|null $queue
+ * @param string|null $connection
+ * @return void
+ */
+ protected function dispatchToQueue($job, $queue, $connection)
+ {
+ if ($job instanceof Closure) {
+ if (! class_exists(CallQueuedClosure::class)) {
+ throw new RuntimeException(
+ 'To enable support for closure jobs, please install the illuminate/queue package.'
+ );
+ }
+
+ $job = CallQueuedClosure::create($job);
+ }
+
+ $this->getDispatcher()->dispatch(
+ $job->onConnection($connection)->onQueue($queue)
+ );
+ }
+
+ /**
+ * Dispatch the given job right now.
+ *
+ * @param object $job
+ * @return void
+ */
+ protected function dispatchNow($job)
+ {
+ $this->getDispatcher()->dispatchNow($job);
+ }
+
/**
* Add a new command event to the schedule.
*
@@ -144,10 +200,10 @@ class Schedule
{
return collect($parameters)->map(function ($value, $key) {
if (is_array($value)) {
- $value = collect($value)->map(function ($value) {
- return ProcessUtils::escapeArgument($value);
- })->implode(' ');
- } elseif (! is_numeric($value) && ! preg_match('/^(-.$|--.*)/i', $value)) {
+ return $this->compileArrayInput($key, $value);
+ }
+
+ if (! is_numeric($value) && ! preg_match('/^(-.$|--.*)/i', $value)) {
$value = ProcessUtils::escapeArgument($value);
}
@@ -155,6 +211,32 @@ class Schedule
})->implode(' ');
}
+ /**
+ * Compile array input for a command.
+ *
+ * @param string|int $key
+ * @param array $value
+ * @return string
+ */
+ public function compileArrayInput($key, $value)
+ {
+ $value = collect($value)->map(function ($value) {
+ return ProcessUtils::escapeArgument($value);
+ });
+
+ if (Str::startsWith($key, '--')) {
+ $value = $value->map(function ($value) use ($key) {
+ return "{$key}={$value}";
+ });
+ } elseif (Str::startsWith($key, '-')) {
+ $value = $value->map(function ($value) use ($key) {
+ return "{$key} {$value}";
+ });
+ }
+
+ return $value->implode(' ');
+ }
+
/**
* Determine if the server is allowed to run this event.
*
@@ -196,14 +278,35 @@ class Schedule
*/
public function useCache($store)
{
- if ($this->eventMutex instanceof CacheEventMutex) {
+ if ($this->eventMutex instanceof CacheAware) {
$this->eventMutex->useStore($store);
}
- if ($this->schedulingMutex instanceof CacheSchedulingMutex) {
+ if ($this->schedulingMutex instanceof CacheAware) {
$this->schedulingMutex->useStore($store);
}
return $this;
}
+
+ /**
+ * Get the job dispatcher, if available.
+ *
+ * @return \Illuminate\Contracts\Bus\Dispatcher
+ */
+ protected function getDispatcher()
+ {
+ if ($this->dispatcher === null) {
+ try {
+ $this->dispatcher = Container::getInstance()->make(Dispatcher::class);
+ } catch (BindingResolutionException $e) {
+ throw new RuntimeException(
+ 'Unable to resolve the dispatcher from the service container. Please bind it or install the illuminate/bus package.',
+ $e->getCode(), $e
+ );
+ }
+ }
+
+ return $this->dispatcher;
+ }
}
diff --git a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleFinishCommand.php b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleFinishCommand.php
index f697ea819..c19381f08 100644
--- a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleFinishCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleFinishCommand.php
@@ -11,7 +11,7 @@ class ScheduleFinishCommand extends Command
*
* @var string
*/
- protected $signature = 'schedule:finish {id}';
+ protected $signature = 'schedule:finish {id} {code=0}';
/**
* The console command description.
@@ -28,34 +28,15 @@ class ScheduleFinishCommand extends Command
protected $hidden = true;
/**
- * The schedule instance.
- *
- * @var \Illuminate\Console\Scheduling\Schedule
- */
- protected $schedule;
-
- /**
- * Create a new command instance.
+ * Execute the console command.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
- public function __construct(Schedule $schedule)
+ public function handle(Schedule $schedule)
{
- $this->schedule = $schedule;
-
- parent::__construct();
- }
-
- /**
- * Execute the console command.
- *
- * @return void
- */
- public function handle()
- {
- collect($this->schedule->events())->filter(function ($value) {
+ collect($schedule->events())->filter(function ($value) {
return $value->mutexName() == $this->argument('id');
- })->each->callAfterCallbacks($this->laravel);
+ })->each->callAfterCallbacksWithExitCode($this->laravel, $this->argument('code'));
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleRunCommand.php b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleRunCommand.php
index 1340141cc..926585a7b 100644
--- a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleRunCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleRunCommand.php
@@ -3,7 +3,14 @@
namespace Illuminate\Console\Scheduling;
use Illuminate\Console\Command;
+use Illuminate\Console\Events\ScheduledTaskFailed;
+use Illuminate\Console\Events\ScheduledTaskFinished;
+use Illuminate\Console\Events\ScheduledTaskSkipped;
+use Illuminate\Console\Events\ScheduledTaskStarting;
+use Illuminate\Contracts\Debug\ExceptionHandler;
+use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Support\Facades\Date;
+use Throwable;
class ScheduleRunCommand extends Command
{
@@ -31,7 +38,7 @@ class ScheduleRunCommand extends Command
/**
* The 24 hour timestamp this scheduler command started running.
*
- * @var \Illuminate\Support\Carbon;
+ * @var \Illuminate\Support\Carbon
*/
protected $startedAt;
@@ -42,16 +49,27 @@ class ScheduleRunCommand extends Command
*/
protected $eventsRan = false;
+ /**
+ * The event dispatcher.
+ *
+ * @var \Illuminate\Contracts\Events\Dispatcher
+ */
+ protected $dispatcher;
+
+ /**
+ * The exception handler.
+ *
+ * @var \Illuminate\Contracts\Debug\ExceptionHandler
+ */
+ protected $handler;
+
/**
* Create a new command instance.
*
- * @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
- public function __construct(Schedule $schedule)
+ public function __construct()
{
- $this->schedule = $schedule;
-
$this->startedAt = Date::now();
parent::__construct();
@@ -60,12 +78,21 @@ class ScheduleRunCommand extends Command
/**
* Execute the console command.
*
+ * @param \Illuminate\Console\Scheduling\Schedule $schedule
+ * @param \Illuminate\Contracts\Events\Dispatcher $dispatcher
+ * @param \Illuminate\Contracts\Debug\ExceptionHandler $handler
* @return void
*/
- public function handle()
+ public function handle(Schedule $schedule, Dispatcher $dispatcher, ExceptionHandler $handler)
{
+ $this->schedule = $schedule;
+ $this->dispatcher = $dispatcher;
+ $this->handler = $handler;
+
foreach ($this->schedule->dueEvents($this->laravel) as $event) {
if (! $event->filtersPass($this->laravel)) {
+ $this->dispatcher->dispatch(new ScheduledTaskSkipped($event));
+
continue;
}
@@ -108,8 +135,23 @@ class ScheduleRunCommand extends Command
{
$this->line('Running scheduled command: '.$event->getSummaryForDisplay());
- $event->run($this->laravel);
+ $this->dispatcher->dispatch(new ScheduledTaskStarting($event));
- $this->eventsRan = true;
+ $start = microtime(true);
+
+ try {
+ $event->run($this->laravel);
+
+ $this->dispatcher->dispatch(new ScheduledTaskFinished(
+ $event,
+ round(microtime(true) - $start, 2)
+ ));
+
+ $this->eventsRan = true;
+ } catch (Throwable $e) {
+ $this->dispatcher->dispatch(new ScheduledTaskFailed($event, $e));
+
+ $this->handler->report($e);
+ }
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Console/composer.json b/vendor/laravel/framework/src/Illuminate/Console/composer.json
index cd0882152..41e0bad13 100755
--- a/vendor/laravel/framework/src/Illuminate/Console/composer.json
+++ b/vendor/laravel/framework/src/Illuminate/Console/composer.json
@@ -14,11 +14,11 @@
}
],
"require": {
- "php": "^7.1.3",
- "illuminate/contracts": "5.8.*",
- "illuminate/support": "5.8.*",
- "symfony/console": "^4.2",
- "symfony/process": "^4.2"
+ "php": "^7.2.5|^8.0",
+ "illuminate/contracts": "^7.0",
+ "illuminate/support": "^7.0",
+ "symfony/console": "^5.0",
+ "symfony/process": "^5.0"
},
"autoload": {
"psr-4": {
@@ -27,13 +27,16 @@
},
"extra": {
"branch-alias": {
- "dev-master": "5.8-dev"
+ "dev-master": "7.x-dev"
}
},
"suggest": {
- "dragonmantank/cron-expression": "Required to use scheduling component (^2.0).",
- "guzzlehttp/guzzle": "Required to use the ping methods on schedules (^6.0).",
- "illuminate/filesystem": "Required to use the generator command (5.8.*)"
+ "dragonmantank/cron-expression": "Required to use scheduler (^2.3.1).",
+ "guzzlehttp/guzzle": "Required to use the ping methods on schedules (^6.3.1|^7.0.1).",
+ "illuminate/bus": "Required to use the scheduled job dispatcher (^7.0).",
+ "illuminate/container": "Required to use the scheduler (^7.0).",
+ "illuminate/filesystem": "Required to use the generator command (^7.0).",
+ "illuminate/queue": "Required to use closures for scheduled jobs (^7.0)."
},
"config": {
"sort-packages": true
diff --git a/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php b/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php
index f5d4bba39..c617bf797 100644
--- a/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php
+++ b/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php
@@ -3,9 +3,10 @@
namespace Illuminate\Container;
use Closure;
-use ReflectionMethod;
-use ReflectionFunction;
+use Illuminate\Contracts\Container\BindingResolutionException;
use InvalidArgumentException;
+use ReflectionFunction;
+use ReflectionMethod;
class BoundMethod
{
@@ -23,14 +24,16 @@ class BoundMethod
*/
public static function call($container, $callback, array $parameters = [], $defaultMethod = null)
{
+ if (is_string($callback) && ! $defaultMethod && method_exists($callback, '__invoke')) {
+ $defaultMethod = '__invoke';
+ }
+
if (static::isCallableWithAtSign($callback) || $defaultMethod) {
return static::callClass($container, $callback, $parameters, $defaultMethod);
}
return static::callBoundMethod($container, $callback, function () use ($container, $callback, $parameters) {
- return call_user_func_array(
- $callback, static::getMethodDependencies($container, $callback, $parameters)
- );
+ return $callback(...array_values(static::getMethodDependencies($container, $callback, $parameters)));
});
}
@@ -75,7 +78,7 @@ class BoundMethod
protected static function callBoundMethod($container, $callback, $default)
{
if (! is_array($callback)) {
- return $default instanceof Closure ? $default() : $default;
+ return Util::unwrapIfClosure($default);
}
// Here we need to turn the array callable into a Class@method string we can use to
@@ -87,7 +90,7 @@ class BoundMethod
return $container->callMethodBinding($method, $callback[0]);
}
- return $default instanceof Closure ? $default() : $default;
+ return Util::unwrapIfClosure($default);
}
/**
@@ -121,13 +124,13 @@ class BoundMethod
static::addDependencyForCallParameter($container, $parameter, $parameters, $dependencies);
}
- return array_merge($dependencies, $parameters);
+ return array_merge($dependencies, array_values($parameters));
}
/**
* Get the proper reflection instance for the given callback.
*
- * @param callable|string $callback
+ * @param callable|string $callback
* @return \ReflectionFunctionAbstract
*
* @throws \ReflectionException
@@ -136,6 +139,8 @@ class BoundMethod
{
if (is_string($callback) && strpos($callback, '::') !== false) {
$callback = explode('::', $callback);
+ } elseif (is_object($callback) && ! $callback instanceof Closure) {
+ $callback = [$callback, '__invoke'];
}
return is_array($callback)
@@ -155,18 +160,24 @@ class BoundMethod
protected static function addDependencyForCallParameter($container, $parameter,
array &$parameters, &$dependencies)
{
- if (array_key_exists($parameter->name, $parameters)) {
- $dependencies[] = $parameters[$parameter->name];
+ if (array_key_exists($paramName = $parameter->getName(), $parameters)) {
+ $dependencies[] = $parameters[$paramName];
- unset($parameters[$parameter->name]);
- } elseif ($parameter->getClass() && array_key_exists($parameter->getClass()->name, $parameters)) {
- $dependencies[] = $parameters[$parameter->getClass()->name];
+ unset($parameters[$paramName]);
+ } elseif (! is_null($className = Util::getParameterClassName($parameter))) {
+ if (array_key_exists($className, $parameters)) {
+ $dependencies[] = $parameters[$className];
- unset($parameters[$parameter->getClass()->name]);
- } elseif ($parameter->getClass()) {
- $dependencies[] = $container->make($parameter->getClass()->name);
+ unset($parameters[$className]);
+ } else {
+ $dependencies[] = $container->make($className);
+ }
} elseif ($parameter->isDefaultValueAvailable()) {
$dependencies[] = $parameter->getDefaultValue();
+ } elseif (! $parameter->isOptional() && ! array_key_exists($paramName, $parameters)) {
+ $message = "Unable to resolve dependency [{$parameter}] in class {$parameter->getDeclaringClass()->getName()}";
+
+ throw new BindingResolutionException($message);
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Container/Container.php b/vendor/laravel/framework/src/Illuminate/Container/Container.php
index 7dc70f7f4..1eb489a4f 100755
--- a/vendor/laravel/framework/src/Illuminate/Container/Container.php
+++ b/vendor/laravel/framework/src/Illuminate/Container/Container.php
@@ -2,15 +2,15 @@
namespace Illuminate\Container;
+use ArrayAccess;
use Closure;
use Exception;
-use ArrayAccess;
-use LogicException;
-use ReflectionClass;
-use ReflectionParameter;
-use Illuminate\Support\Arr;
use Illuminate\Contracts\Container\BindingResolutionException;
use Illuminate\Contracts\Container\Container as ContainerContract;
+use LogicException;
+use ReflectionClass;
+use ReflectionException;
+use ReflectionParameter;
class Container implements ArrayAccess, ContainerContract
{
@@ -143,7 +143,7 @@ class Container implements ArrayAccess, ContainerContract
{
$aliases = [];
- foreach (Arr::wrap($concrete) as $c) {
+ foreach (Util::arrayWrap($concrete) as $c) {
$aliases[] = $this->getAlias($c);
}
@@ -234,6 +234,10 @@ class Container implements ArrayAccess, ContainerContract
// bound into this container to the abstract type and we will just wrap it
// up inside its own Closure to give us more convenience when extending.
if (! $concrete instanceof Closure) {
+ if (! is_string($concrete)) {
+ throw new \TypeError(self::class.'::bind(): Argument #2 ($concrete) must be of type Closure|string|null');
+ }
+
$concrete = $this->getClosure($abstract, $concrete);
}
@@ -293,7 +297,7 @@ class Container implements ArrayAccess, ContainerContract
/**
* Get the method to be bound in class@method format.
*
- * @param array|string $method
+ * @param array|string $method
* @return string
*/
protected function parseBindMethod($method)
@@ -357,10 +361,24 @@ class Container implements ArrayAccess, ContainerContract
$this->bind($abstract, $concrete, true);
}
+ /**
+ * Register a shared binding if it hasn't already been registered.
+ *
+ * @param string $abstract
+ * @param \Closure|string|null $concrete
+ * @return void
+ */
+ public function singletonIf($abstract, $concrete = null)
+ {
+ if (! $this->bound($abstract)) {
+ $this->singleton($abstract, $concrete);
+ }
+ }
+
/**
* "Extend" an abstract type in the container.
*
- * @param string $abstract
+ * @param string $abstract
* @param \Closure $closure
* @return void
*
@@ -387,7 +405,7 @@ class Container implements ArrayAccess, ContainerContract
* Register an existing instance as shared in the container.
*
* @param string $abstract
- * @param mixed $instance
+ * @param mixed $instance
* @return mixed
*/
public function instance($abstract, $instance)
@@ -435,7 +453,7 @@ class Container implements ArrayAccess, ContainerContract
* Assign a set of tags to a given binding.
*
* @param array|string $abstracts
- * @param array|mixed ...$tags
+ * @param array|mixed ...$tags
* @return void
*/
public function tag($abstracts, $tags)
@@ -495,7 +513,7 @@ class Container implements ArrayAccess, ContainerContract
/**
* Bind a new callback to an abstract's rebind event.
*
- * @param string $abstract
+ * @param string $abstract
* @param \Closure $callback
* @return mixed
*/
@@ -512,7 +530,7 @@ class Container implements ArrayAccess, ContainerContract
* Refresh an instance on the given target and method.
*
* @param string $abstract
- * @param mixed $target
+ * @param mixed $target
* @param string $method
* @return mixed
*/
@@ -567,9 +585,11 @@ class Container implements ArrayAccess, ContainerContract
* Call the given Closure / class@method and inject its dependencies.
*
* @param callable|string $callback
- * @param array $parameters
+ * @param array $parameters
* @param string|null $defaultMethod
* @return mixed
+ *
+ * @throws \InvalidArgumentException
*/
public function call($callback, array $parameters = [], $defaultMethod = null)
{
@@ -595,6 +615,8 @@ class Container implements ArrayAccess, ContainerContract
* @param string $abstract
* @param array $parameters
* @return mixed
+ *
+ * @throws \Illuminate\Contracts\Container\BindingResolutionException
*/
public function makeWith($abstract, array $parameters = [])
{
@@ -627,7 +649,7 @@ class Container implements ArrayAccess, ContainerContract
throw $e;
}
- throw new EntryNotFoundException($id);
+ throw new EntryNotFoundException($id, $e->getCode(), $e);
}
}
@@ -636,7 +658,7 @@ class Container implements ArrayAccess, ContainerContract
*
* @param string $abstract
* @param array $parameters
- * @param bool $raiseEvents
+ * @param bool $raiseEvents
* @return mixed
*
* @throws \Illuminate\Contracts\Container\BindingResolutionException
@@ -645,9 +667,9 @@ class Container implements ArrayAccess, ContainerContract
{
$abstract = $this->getAlias($abstract);
- $needsContextualBuild = ! empty($parameters) || ! is_null(
- $this->getContextualConcrete($abstract)
- );
+ $concrete = $this->getContextualConcrete($abstract);
+
+ $needsContextualBuild = ! empty($parameters) || ! is_null($concrete);
// If an instance of the type is currently being managed as a singleton we'll
// just return an existing instance instead of instantiating new instances
@@ -658,7 +680,9 @@ class Container implements ArrayAccess, ContainerContract
$this->with[] = $parameters;
- $concrete = $this->getConcrete($abstract);
+ if (is_null($concrete)) {
+ $concrete = $this->getConcrete($abstract);
+ }
// We're ready to instantiate an instance of the concrete type registered for
// the binding. This will instantiate the types, as well as resolve any of
@@ -701,14 +725,10 @@ class Container implements ArrayAccess, ContainerContract
* Get the concrete type for a given abstract.
*
* @param string $abstract
- * @return mixed $concrete
+ * @return mixed
*/
protected function getConcrete($abstract)
{
- if (! is_null($concrete = $this->getContextualConcrete($abstract))) {
- return $concrete;
- }
-
// If we don't have a registered resolver or concrete for the type, we'll just
// assume each type is a concrete name and will attempt to resolve it as is
// since the container should be able to resolve concretes automatically.
@@ -723,7 +743,7 @@ class Container implements ArrayAccess, ContainerContract
* Get the contextual concrete binding for the given abstract.
*
* @param string $abstract
- * @return \Closure|string|null
+ * @return \Closure|string|array|null
*/
protected function getContextualConcrete($abstract)
{
@@ -759,7 +779,7 @@ class Container implements ArrayAccess, ContainerContract
/**
* Determine if the given concrete is buildable.
*
- * @param mixed $concrete
+ * @param mixed $concrete
* @param string $abstract
* @return bool
*/
@@ -771,7 +791,7 @@ class Container implements ArrayAccess, ContainerContract
/**
* Instantiate a concrete instance of the given type.
*
- * @param string $concrete
+ * @param \Closure|string $concrete
* @return mixed
*
* @throws \Illuminate\Contracts\Container\BindingResolutionException
@@ -785,7 +805,11 @@ class Container implements ArrayAccess, ContainerContract
return $concrete($this, $this->getLastParameterOverride());
}
- $reflector = new ReflectionClass($concrete);
+ try {
+ $reflector = new ReflectionClass($concrete);
+ } catch (ReflectionException $e) {
+ throw new BindingResolutionException("Target class [$concrete] does not exist.", 0, $e);
+ }
// If the type is not instantiable, the developer is attempting to resolve
// an abstract type such as an Interface or Abstract Class and there is
@@ -828,7 +852,7 @@ class Container implements ArrayAccess, ContainerContract
/**
* Resolve all of the dependencies from the ReflectionParameters.
*
- * @param array $dependencies
+ * @param \ReflectionParameter[] $dependencies
* @return array
*
* @throws \Illuminate\Contracts\Container\BindingResolutionException
@@ -838,7 +862,7 @@ class Container implements ArrayAccess, ContainerContract
$results = [];
foreach ($dependencies as $dependency) {
- // If this dependency has a override for this particular build we will use
+ // If the dependency has an override for this particular build we will use
// that instead as the value. Otherwise, we will continue with this run
// of resolutions and let reflection attempt to determine the result.
if ($this->hasParameterOverride($dependency)) {
@@ -850,9 +874,15 @@ class Container implements ArrayAccess, ContainerContract
// If the class is null, it means the dependency is a string or some other
// primitive type which we can not resolve since it is not a class and
// we will just bomb out with an error since we have no-where to go.
- $results[] = is_null($dependency->getClass())
+ $result = is_null(Util::getParameterClassName($dependency))
? $this->resolvePrimitive($dependency)
: $this->resolveClass($dependency);
+
+ if ($dependency->isVariadic()) {
+ $results = array_merge($results, $result);
+ } else {
+ $results[] = $result;
+ }
}
return $results;
@@ -902,7 +932,7 @@ class Container implements ArrayAccess, ContainerContract
*/
protected function resolvePrimitive(ReflectionParameter $parameter)
{
- if (! is_null($concrete = $this->getContextualConcrete('$'.$parameter->name))) {
+ if (! is_null($concrete = $this->getContextualConcrete('$'.$parameter->getName()))) {
return $concrete instanceof Closure ? $concrete($this) : $concrete;
}
@@ -924,21 +954,48 @@ class Container implements ArrayAccess, ContainerContract
protected function resolveClass(ReflectionParameter $parameter)
{
try {
- return $this->make($parameter->getClass()->name);
+ return $parameter->isVariadic()
+ ? $this->resolveVariadicClass($parameter)
+ : $this->make(Util::getParameterClassName($parameter));
}
// If we can not resolve the class instance, we will check to see if the value
// is optional, and if it is we will return the optional parameter value as
// the value of the dependency, similarly to how we do this with scalars.
catch (BindingResolutionException $e) {
- if ($parameter->isOptional()) {
+ if ($parameter->isDefaultValueAvailable()) {
return $parameter->getDefaultValue();
}
+ if ($parameter->isVariadic()) {
+ return [];
+ }
+
throw $e;
}
}
+ /**
+ * Resolve a class based variadic dependency from the container.
+ *
+ * @param \ReflectionParameter $parameter
+ * @return mixed
+ */
+ protected function resolveVariadicClass(ReflectionParameter $parameter)
+ {
+ $className = Util::getParameterClassName($parameter);
+
+ $abstract = $this->getAlias($className);
+
+ if (! is_array($concrete = $this->getContextualConcrete($abstract))) {
+ return $this->make($className);
+ }
+
+ return array_map(function ($abstract) {
+ return $this->resolve($abstract);
+ }, $concrete);
+ }
+
/**
* Throw an exception that the concrete is not instantiable.
*
@@ -1019,7 +1076,7 @@ class Container implements ArrayAccess, ContainerContract
* Fire all of the resolving callbacks.
*
* @param string $abstract
- * @param mixed $object
+ * @param mixed $object
* @return void
*/
protected function fireResolvingCallbacks($abstract, $object)
@@ -1037,7 +1094,7 @@ class Container implements ArrayAccess, ContainerContract
* Fire all of the after resolving callbacks.
*
* @param string $abstract
- * @param mixed $object
+ * @param mixed $object
* @return void
*/
protected function fireAfterResolvingCallbacks($abstract, $object)
@@ -1054,7 +1111,7 @@ class Container implements ArrayAccess, ContainerContract
*
* @param string $abstract
* @param object $object
- * @param array $callbacksPerType
+ * @param array $callbacksPerType
*
* @return array
*/
@@ -1231,7 +1288,7 @@ class Container implements ArrayAccess, ContainerContract
* Set the value at a given offset.
*
* @param string $key
- * @param mixed $value
+ * @param mixed $value
* @return void
*/
public function offsetSet($key, $value)
@@ -1267,7 +1324,7 @@ class Container implements ArrayAccess, ContainerContract
* Dynamically set container services.
*
* @param string $key
- * @param mixed $value
+ * @param mixed $value
* @return void
*/
public function __set($key, $value)
diff --git a/vendor/laravel/framework/src/Illuminate/Container/ContextualBindingBuilder.php b/vendor/laravel/framework/src/Illuminate/Container/ContextualBindingBuilder.php
index ac280dba5..5da6ccab3 100644
--- a/vendor/laravel/framework/src/Illuminate/Container/ContextualBindingBuilder.php
+++ b/vendor/laravel/framework/src/Illuminate/Container/ContextualBindingBuilder.php
@@ -2,7 +2,6 @@
namespace Illuminate\Container;
-use Illuminate\Support\Arr;
use Illuminate\Contracts\Container\Container;
use Illuminate\Contracts\Container\ContextualBindingBuilder as ContextualBindingBuilderContract;
@@ -58,13 +57,28 @@ class ContextualBindingBuilder implements ContextualBindingBuilderContract
/**
* Define the implementation for the contextual binding.
*
- * @param \Closure|string $implementation
+ * @param \Closure|string|array $implementation
* @return void
*/
public function give($implementation)
{
- foreach (Arr::wrap($this->concrete) as $concrete) {
+ foreach (Util::arrayWrap($this->concrete) as $concrete) {
$this->container->addContextualBinding($concrete, $this->needs, $implementation);
}
}
+
+ /**
+ * Define tagged services to be used as the implementation for the contextual binding.
+ *
+ * @param string $tag
+ * @return void
+ */
+ public function giveTagged($tag)
+ {
+ $this->give(function ($container) use ($tag) {
+ $taggedServices = $container->tagged($tag);
+
+ return is_array($taggedServices) ? $taggedServices : iterator_to_array($taggedServices);
+ });
+ }
}
diff --git a/vendor/laravel/framework/src/Illuminate/Container/Util.php b/vendor/laravel/framework/src/Illuminate/Container/Util.php
new file mode 100644
index 000000000..0b4bb1283
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Container/Util.php
@@ -0,0 +1,70 @@
+getType();
+
+ if (! $type instanceof ReflectionNamedType || $type->isBuiltin()) {
+ return;
+ }
+
+ $name = $type->getName();
+
+ if (! is_null($class = $parameter->getDeclaringClass())) {
+ if ($name === 'self') {
+ return $class->getName();
+ }
+
+ if ($name === 'parent' && $parent = $class->getParentClass()) {
+ return $parent->getName();
+ }
+ }
+
+ return $name;
+ }
+}
diff --git a/vendor/laravel/framework/src/Illuminate/Container/composer.json b/vendor/laravel/framework/src/Illuminate/Container/composer.json
index 92f0063c1..e65b8b84d 100755
--- a/vendor/laravel/framework/src/Illuminate/Container/composer.json
+++ b/vendor/laravel/framework/src/Illuminate/Container/composer.json
@@ -14,11 +14,13 @@
}
],
"require": {
- "php": "^7.1.3",
- "illuminate/contracts": "5.8.*",
- "illuminate/support": "5.8.*",
+ "php": "^7.2.5|^8.0",
+ "illuminate/contracts": "^7.0",
"psr/container": "^1.0"
},
+ "provide": {
+ "psr/container-implementation": "1.0"
+ },
"autoload": {
"psr-4": {
"Illuminate\\Container\\": ""
@@ -26,7 +28,7 @@
},
"extra": {
"branch-alias": {
- "dev-master": "5.8-dev"
+ "dev-master": "7.x-dev"
}
},
"config": {
diff --git a/vendor/laravel/framework/src/Illuminate/Contracts/Auth/Access/Authorizable.php b/vendor/laravel/framework/src/Illuminate/Contracts/Auth/Access/Authorizable.php
index 2f9657c57..cedeb6ea3 100644
--- a/vendor/laravel/framework/src/Illuminate/Contracts/Auth/Access/Authorizable.php
+++ b/vendor/laravel/framework/src/Illuminate/Contracts/Auth/Access/Authorizable.php
@@ -7,9 +7,9 @@ interface Authorizable
/**
* Determine if the entity has a given ability.
*
- * @param string $ability
+ * @param iterable|string $abilities
* @param array|mixed $arguments
* @return bool
*/
- public function can($ability, $arguments = []);
+ public function can($abilities, $arguments = []);
}
diff --git a/vendor/laravel/framework/src/Illuminate/Contracts/Auth/Access/Gate.php b/vendor/laravel/framework/src/Illuminate/Contracts/Auth/Access/Gate.php
index 779ad46de..b88ab1796 100644
--- a/vendor/laravel/framework/src/Illuminate/Contracts/Auth/Access/Gate.php
+++ b/vendor/laravel/framework/src/Illuminate/Contracts/Auth/Access/Gate.php
@@ -21,6 +21,16 @@ interface Gate
*/
public function define($ability, $callback);
+ /**
+ * Define abilities for a resource.
+ *
+ * @param string $name
+ * @param string $class
+ * @param array|null $abilities
+ * @return $this
+ */
+ public function resource($name, $class, array $abilities = null);
+
/**
* Define a policy class for a given class type.
*
@@ -93,12 +103,23 @@ interface Gate
*/
public function authorize($ability, $arguments = []);
+ /**
+ * Inspect the user for the given ability.
+ *
+ * @param string $ability
+ * @param array|mixed $arguments
+ * @return \Illuminate\Auth\Access\Response
+ */
+ public function inspect($ability, $arguments = []);
+
/**
* Get the raw result from the authorization callback.
*
* @param string $ability
* @param array|mixed $arguments
* @return mixed
+ *
+ * @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function raw($ability, $arguments = []);
diff --git a/vendor/laravel/framework/src/Illuminate/Contracts/Auth/Factory.php b/vendor/laravel/framework/src/Illuminate/Contracts/Auth/Factory.php
index 3ee9c8ce6..d76ee7648 100644
--- a/vendor/laravel/framework/src/Illuminate/Contracts/Auth/Factory.php
+++ b/vendor/laravel/framework/src/Illuminate/Contracts/Auth/Factory.php
@@ -8,7 +8,7 @@ interface Factory
* Get a guard instance by name.
*
* @param string|null $name
- * @return mixed
+ * @return \Illuminate\Contracts\Auth\Guard|\Illuminate\Contracts\Auth\StatefulGuard
*/
public function guard($name = null);
diff --git a/vendor/laravel/framework/src/Illuminate/Contracts/Auth/Middleware/AuthenticatesRequests.php b/vendor/laravel/framework/src/Illuminate/Contracts/Auth/Middleware/AuthenticatesRequests.php
new file mode 100644
index 000000000..b782761f9
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Contracts/Auth/Middleware/AuthenticatesRequests.php
@@ -0,0 +1,8 @@
+queued($key));
+ return ! is_null($this->queued($key, null, $path));
}
/**
* Get a queued cookie instance.
*
* @param string $key
- * @param mixed $default
- * @return \Symfony\Component\HttpFoundation\Cookie
+ * @param mixed $default
+ * @param string|null $path
+ * @return \Symfony\Component\HttpFoundation\Cookie|null
*/
- public function queued($key, $default = null)
+ public function queued($key, $default = null, $path = null)
{
- return Arr::get($this->queued, $key, $default);
+ $queued = Arr::get($this->queued, $key, $default);
+
+ if ($path === null) {
+ return Arr::last($queued, null, $default);
+ }
+
+ return Arr::get($queued, $path, $default);
}
/**
@@ -132,32 +140,47 @@ class CookieJar implements JarContract
*/
public function queue(...$parameters)
{
- if (head($parameters) instanceof Cookie) {
- $cookie = head($parameters);
+ if (isset($parameters[0]) && $parameters[0] instanceof Cookie) {
+ $cookie = $parameters[0];
} else {
- $cookie = call_user_func_array([$this, 'make'], $parameters);
+ $cookie = $this->make(...array_values($parameters));
}
- $this->queued[$cookie->getName()] = $cookie;
+ if (! isset($this->queued[$cookie->getName()])) {
+ $this->queued[$cookie->getName()] = [];
+ }
+
+ $this->queued[$cookie->getName()][$cookie->getPath()] = $cookie;
}
/**
* Remove a cookie from the queue.
*
* @param string $name
+ * @param string|null $path
* @return void
*/
- public function unqueue($name)
+ public function unqueue($name, $path = null)
{
- unset($this->queued[$name]);
+ if ($path === null) {
+ unset($this->queued[$name]);
+
+ return;
+ }
+
+ unset($this->queued[$name][$path]);
+
+ if (empty($this->queued[$name])) {
+ unset($this->queued[$name]);
+ }
}
/**
* Get the path and domain, or the default values.
*
- * @param string $path
- * @param string $domain
- * @param bool|null $secure
+ * @param string $path
+ * @param string $domain
+ * @param bool|null $secure
* @param string|null $sameSite
* @return array
*/
@@ -171,7 +194,7 @@ class CookieJar implements JarContract
*
* @param string $path
* @param string $domain
- * @param bool $secure
+ * @param bool $secure
* @param string|null $sameSite
* @return $this
*/
@@ -189,6 +212,6 @@ class CookieJar implements JarContract
*/
public function getQueuedCookies()
{
- return $this->queued;
+ return Arr::flatten($this->queued);
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Cookie/CookieValuePrefix.php b/vendor/laravel/framework/src/Illuminate/Cookie/CookieValuePrefix.php
new file mode 100644
index 000000000..e39cb69fa
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Cookie/CookieValuePrefix.php
@@ -0,0 +1,29 @@
+cookies->set($key, $this->decryptCookie($key, $cookie));
+ $value = $this->decryptCookie($key, $cookie);
+
+ $hasValidPrefix = strpos($value, CookieValuePrefix::create($key, $this->encrypter->getKey())) === 0;
+
+ $request->cookies->set(
+ $key, $hasValidPrefix ? CookieValuePrefix::remove($value) : null
+ );
} catch (DecryptException $e) {
$request->cookies->set($key, null);
}
@@ -136,7 +143,11 @@ class EncryptCookies
}
$response->headers->setCookie($this->duplicate(
- $cookie, $this->encrypter->encrypt($cookie->getValue(), static::serialized($cookie->getName()))
+ $cookie,
+ $this->encrypter->encrypt(
+ CookieValuePrefix::create($cookie->getName(), $this->encrypter->getKey()).$cookie->getValue(),
+ static::serialized($cookie->getName())
+ )
));
}
@@ -162,7 +173,7 @@ class EncryptCookies
/**
* Determine whether encryption has been disabled for the given cookie.
*
- * @param string $name
+ * @param string $name
* @return bool
*/
public function isDisabled($name)
diff --git a/vendor/laravel/framework/src/Illuminate/Cookie/composer.json b/vendor/laravel/framework/src/Illuminate/Cookie/composer.json
index e6c6b9a9c..6e3cb7208 100755
--- a/vendor/laravel/framework/src/Illuminate/Cookie/composer.json
+++ b/vendor/laravel/framework/src/Illuminate/Cookie/composer.json
@@ -14,11 +14,11 @@
}
],
"require": {
- "php": "^7.1.3",
- "illuminate/contracts": "5.8.*",
- "illuminate/support": "5.8.*",
- "symfony/http-foundation": "^4.2",
- "symfony/http-kernel": "^4.2"
+ "php": "^7.2.5|^8.0",
+ "illuminate/contracts": "^7.0",
+ "illuminate/support": "^7.0",
+ "symfony/http-foundation": "^5.0",
+ "symfony/http-kernel": "^5.0"
},
"autoload": {
"psr-4": {
@@ -27,7 +27,7 @@
},
"extra": {
"branch-alias": {
- "dev-master": "5.8-dev"
+ "dev-master": "7.x-dev"
}
},
"config": {
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Capsule/Manager.php b/vendor/laravel/framework/src/Illuminate/Database/Capsule/Manager.php
index 115724324..b877e7c6d 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Capsule/Manager.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Capsule/Manager.php
@@ -2,13 +2,13 @@
namespace Illuminate\Database\Capsule;
-use PDO;
use Illuminate\Container\Container;
-use Illuminate\Database\DatabaseManager;
use Illuminate\Contracts\Events\Dispatcher;
-use Illuminate\Support\Traits\CapsuleManagerTrait;
-use Illuminate\Database\Eloquent\Model as Eloquent;
use Illuminate\Database\Connectors\ConnectionFactory;
+use Illuminate\Database\DatabaseManager;
+use Illuminate\Database\Eloquent\Model as Eloquent;
+use Illuminate\Support\Traits\CapsuleManagerTrait;
+use PDO;
class Manager
{
@@ -77,13 +77,14 @@ class Manager
/**
* Get a fluent query builder instance.
*
- * @param string $table
+ * @param \Closure|\Illuminate\Database\Query\Builder|string $table
+ * @param string|null $as
* @param string|null $connection
* @return \Illuminate\Database\Query\Builder
*/
- public static function table($table, $connection = null)
+ public static function table($table, $as = null, $connection = null)
{
- return static::$instance->connection($connection)->table($table);
+ return static::$instance->connection($connection)->table($table, $as);
}
/**
@@ -111,7 +112,7 @@ class Manager
/**
* Register a connection with the manager.
*
- * @param array $config
+ * @param array $config
* @param string $name
* @return void
*/
@@ -191,7 +192,7 @@ class Manager
* Dynamically pass methods to the default connection.
*
* @param string $method
- * @param array $parameters
+ * @param array $parameters
* @return mixed
*/
public static function __callStatic($method, $parameters)
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php b/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php
index f68ab43c4..d8ec45c0c 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php
@@ -3,8 +3,8 @@
namespace Illuminate\Database\Concerns;
use Illuminate\Container\Container;
-use Illuminate\Pagination\Paginator;
use Illuminate\Pagination\LengthAwarePaginator;
+use Illuminate\Pagination\Paginator;
trait BuildsQueries
{
@@ -66,10 +66,76 @@ trait BuildsQueries
});
}
+ /**
+ * Chunk the results of a query by comparing IDs.
+ *
+ * @param int $count
+ * @param callable $callback
+ * @param string|null $column
+ * @param string|null $alias
+ * @return bool
+ */
+ public function chunkById($count, callable $callback, $column = null, $alias = null)
+ {
+ $column = $column ?? $this->defaultKeyName();
+
+ $alias = $alias ?? $column;
+
+ $lastId = null;
+
+ do {
+ $clone = clone $this;
+
+ // We'll execute the query for the given page and get the results. If there are
+ // no results we can just break and return from here. When there are results
+ // we will call the callback with the current chunk of these results here.
+ $results = $clone->forPageAfterId($count, $lastId, $column)->get();
+
+ $countResults = $results->count();
+
+ if ($countResults == 0) {
+ break;
+ }
+
+ // On each chunk result set, we will pass them to the callback and then let the
+ // developer take care of everything within the callback, which allows us to
+ // keep the memory low for spinning through large result sets for working.
+ if ($callback($results) === false) {
+ return false;
+ }
+
+ $lastId = $results->last()->{$alias};
+
+ unset($results);
+ } while ($countResults == $count);
+
+ return true;
+ }
+
+ /**
+ * Execute a callback over each item while chunking by ID.
+ *
+ * @param callable $callback
+ * @param int $count
+ * @param string|null $column
+ * @param string|null $alias
+ * @return bool
+ */
+ public function eachById(callable $callback, $count = 1000, $column = null, $alias = null)
+ {
+ return $this->chunkById($count, function ($results) use ($callback) {
+ foreach ($results as $key => $value) {
+ if ($callback($value, $key) === false) {
+ return false;
+ }
+ }
+ }, $column, $alias);
+ }
+
/**
* Execute the query and get the first result.
*
- * @param array $columns
+ * @param array|string $columns
* @return \Illuminate\Database\Eloquent\Model|object|static|null
*/
public function first($columns = ['*'])
@@ -100,7 +166,7 @@ trait BuildsQueries
* Pass the query to a given callback.
*
* @param callable $callback
- * @return \Illuminate\Database\Query\Builder
+ * @return $this
*/
public function tap($callback)
{
@@ -147,8 +213,8 @@ trait BuildsQueries
* Create a new simple paginator instance.
*
* @param \Illuminate\Support\Collection $items
- * @param int $perPage
- * @param int $currentPage
+ * @param int $perPage
+ * @param int $currentPage
* @param array $options
* @return \Illuminate\Pagination\Paginator
*/
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php b/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php
index f8a3d6612..1dd447529 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php
@@ -3,7 +3,6 @@
namespace Illuminate\Database\Concerns;
use Closure;
-use Exception;
use Throwable;
trait ManagesTransactions
@@ -15,7 +14,7 @@ trait ManagesTransactions
* @param int $attempts
* @return mixed
*
- * @throws \Exception|\Throwable
+ * @throws \Throwable
*/
public function transaction(Closure $callback, $attempts = 1)
{
@@ -26,42 +25,56 @@ trait ManagesTransactions
// catch any exception we can rollback this transaction so that none of this
// gets actually persisted to a database or stored in a permanent fashion.
try {
- return tap($callback($this), function () {
- $this->commit();
- });
+ $callbackResult = $callback($this);
}
// If we catch an exception we'll rollback this transaction and try again if we
// are not out of attempts. If we are out of attempts we will just throw the
// exception back out and let the developer handle an uncaught exceptions.
- catch (Exception $e) {
+ catch (Throwable $e) {
$this->handleTransactionException(
$e, $currentAttempt, $attempts
);
- } catch (Throwable $e) {
- $this->rollBack();
- throw $e;
+ continue;
}
+
+ try {
+ if ($this->transactions == 1) {
+ $this->getPdo()->commit();
+ }
+
+ $this->transactions = max(0, $this->transactions - 1);
+ } catch (Throwable $e) {
+ $this->handleCommitTransactionException(
+ $e, $currentAttempt, $attempts
+ );
+
+ continue;
+ }
+
+ $this->fireConnectionEvent('committed');
+
+ return $callbackResult;
}
}
/**
* Handle an exception encountered when running a transacted statement.
*
- * @param \Exception $e
+ * @param \Throwable $e
* @param int $currentAttempt
* @param int $maxAttempts
* @return void
*
- * @throws \Exception
+ * @throws \Throwable
*/
- protected function handleTransactionException($e, $currentAttempt, $maxAttempts)
+ protected function handleTransactionException(Throwable $e, $currentAttempt, $maxAttempts)
{
// On a deadlock, MySQL rolls back the entire transaction so we can't just
// retry the query. We have to throw this exception all the way out and
// let the developer handle it in another way. We will decrement too.
- if ($this->causedByDeadlock($e) &&
+ if ($this->causedByConcurrencyError($e) &&
$this->transactions > 1) {
$this->transactions--;
@@ -73,7 +86,7 @@ trait ManagesTransactions
// if we haven't we will return and try this query again in our loop.
$this->rollBack();
- if ($this->causedByDeadlock($e) &&
+ if ($this->causedByConcurrencyError($e) &&
$currentAttempt < $maxAttempts) {
return;
}
@@ -86,7 +99,7 @@ trait ManagesTransactions
*
* @return void
*
- * @throws \Exception
+ * @throws \Throwable
*/
public function beginTransaction()
{
@@ -101,13 +114,17 @@ trait ManagesTransactions
* Create a transaction within the database.
*
* @return void
+ *
+ * @throws \Throwable
*/
protected function createTransaction()
{
if ($this->transactions == 0) {
+ $this->reconnectIfMissingConnection();
+
try {
$this->getPdo()->beginTransaction();
- } catch (Exception $e) {
+ } catch (Throwable $e) {
$this->handleBeginTransactionException($e);
}
} elseif ($this->transactions >= 1 && $this->queryGrammar->supportsSavepoints()) {
@@ -119,6 +136,8 @@ trait ManagesTransactions
* Create a save point within the database.
*
* @return void
+ *
+ * @throws \Throwable
*/
protected function createSavepoint()
{
@@ -133,14 +152,14 @@ trait ManagesTransactions
* @param \Throwable $e
* @return void
*
- * @throws \Exception
+ * @throws \Throwable
*/
- protected function handleBeginTransactionException($e)
+ protected function handleBeginTransactionException(Throwable $e)
{
if ($this->causedByLostConnection($e)) {
$this->reconnect();
- $this->pdo->beginTransaction();
+ $this->getPdo()->beginTransaction();
} else {
throw $e;
}
@@ -150,6 +169,8 @@ trait ManagesTransactions
* Commit the active database transaction.
*
* @return void
+ *
+ * @throws \Throwable
*/
public function commit()
{
@@ -162,13 +183,39 @@ trait ManagesTransactions
$this->fireConnectionEvent('committed');
}
+ /**
+ * Handle an exception encountered when committing a transaction.
+ *
+ * @param \Throwable $e
+ * @param int $currentAttempt
+ * @param int $maxAttempts
+ * @return void
+ *
+ * @throws \Throwable
+ */
+ protected function handleCommitTransactionException(Throwable $e, $currentAttempt, $maxAttempts)
+ {
+ $this->transactions = max(0, $this->transactions - 1);
+
+ if ($this->causedByConcurrencyError($e) &&
+ $currentAttempt < $maxAttempts) {
+ return;
+ }
+
+ if ($this->causedByLostConnection($e)) {
+ $this->transactions = 0;
+ }
+
+ throw $e;
+ }
+
/**
* Rollback the active database transaction.
*
* @param int|null $toLevel
* @return void
*
- * @throws \Exception
+ * @throws \Throwable
*/
public function rollBack($toLevel = null)
{
@@ -188,7 +235,7 @@ trait ManagesTransactions
// level that was passed into this method so it will be right from here out.
try {
$this->performRollBack($toLevel);
- } catch (Exception $e) {
+ } catch (Throwable $e) {
$this->handleRollBackException($e);
}
@@ -202,6 +249,8 @@ trait ManagesTransactions
*
* @param int $toLevel
* @return void
+ *
+ * @throws \Throwable
*/
protected function performRollBack($toLevel)
{
@@ -217,11 +266,12 @@ trait ManagesTransactions
/**
* Handle an exception from a rollback.
*
- * @param \Exception $e
+ * @param \Throwable $e
+ * @return void
*
- * @throws \Exception
+ * @throws \Throwable
*/
- protected function handleRollBackException($e)
+ protected function handleRollBackException(Throwable $e)
{
if ($this->causedByLostConnection($e)) {
$this->transactions = 0;
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Connection.php b/vendor/laravel/framework/src/Illuminate/Database/Connection.php
index 9341a2fc8..6c7569225 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Connection.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Connection.php
@@ -2,25 +2,29 @@
namespace Illuminate\Database;
-use PDO;
use Closure;
-use Exception;
-use PDOStatement;
-use LogicException;
use DateTimeInterface;
-use Illuminate\Support\Arr;
-use Illuminate\Database\Query\Expression;
+use Doctrine\DBAL\Connection as DoctrineConnection;
+use Exception;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Database\Events\QueryExecuted;
-use Doctrine\DBAL\Connection as DoctrineConnection;
-use Illuminate\Database\Query\Processors\Processor;
+use Illuminate\Database\Events\StatementPrepared;
+use Illuminate\Database\Events\TransactionBeginning;
+use Illuminate\Database\Events\TransactionCommitted;
+use Illuminate\Database\Events\TransactionRolledBack;
use Illuminate\Database\Query\Builder as QueryBuilder;
-use Illuminate\Database\Schema\Builder as SchemaBuilder;
+use Illuminate\Database\Query\Expression;
use Illuminate\Database\Query\Grammars\Grammar as QueryGrammar;
+use Illuminate\Database\Query\Processors\Processor;
+use Illuminate\Database\Schema\Builder as SchemaBuilder;
+use Illuminate\Support\Arr;
+use LogicException;
+use PDO;
+use PDOStatement;
class Connection implements ConnectionInterface
{
- use DetectsDeadlocks,
+ use DetectsConcurrencyErrors,
DetectsLostConnections,
Concerns\ManagesTransactions;
@@ -153,10 +157,10 @@ class Connection implements ConnectionInterface
/**
* Create a new database connection instance.
*
- * @param \PDO|\Closure $pdo
- * @param string $database
- * @param string $tablePrefix
- * @param array $config
+ * @param \PDO|\Closure $pdo
+ * @param string $database
+ * @param string $tablePrefix
+ * @param array $config
* @return void
*/
public function __construct($pdo, $database = '', $tablePrefix = '', array $config = [])
@@ -257,12 +261,13 @@ class Connection implements ConnectionInterface
/**
* Begin a fluent query against a database table.
*
- * @param string $table
+ * @param \Closure|\Illuminate\Database\Query\Builder|string $table
+ * @param string|null $as
* @return \Illuminate\Database\Query\Builder
*/
- public function table($table)
+ public function table($table, $as = null)
{
- return $this->query()->from($table);
+ return $this->query()->from($table, $as);
}
/**
@@ -281,7 +286,7 @@ class Connection implements ConnectionInterface
* Run a select statement and return a single result.
*
* @param string $query
- * @param array $bindings
+ * @param array $bindings
* @param bool $useReadPdo
* @return mixed
*/
@@ -296,7 +301,7 @@ class Connection implements ConnectionInterface
* Run a select statement against the database.
*
* @param string $query
- * @param array $bindings
+ * @param array $bindings
* @return array
*/
public function selectFromWriteConnection($query, $bindings = [])
@@ -322,8 +327,9 @@ class Connection implements ConnectionInterface
// For select statements, we'll simply execute the query and return an array
// of the database result set. Each element in the array will be a single
// row from the database table, and will either be an array or objects.
- $statement = $this->prepared($this->getPdoForSelect($useReadPdo)
- ->prepare($query));
+ $statement = $this->prepared(
+ $this->getPdoForSelect($useReadPdo)->prepare($query)
+ );
$this->bindValues($statement, $this->prepareBindings($bindings));
@@ -381,7 +387,7 @@ class Connection implements ConnectionInterface
{
$statement->setFetchMode($this->fetchMode);
- $this->event(new Events\StatementPrepared(
+ $this->event(new StatementPrepared(
$this, $statement
));
@@ -403,7 +409,7 @@ class Connection implements ConnectionInterface
* Run an insert statement against the database.
*
* @param string $query
- * @param array $bindings
+ * @param array $bindings
* @return bool
*/
public function insert($query, $bindings = [])
@@ -415,7 +421,7 @@ class Connection implements ConnectionInterface
* Run an update statement against the database.
*
* @param string $query
- * @param array $bindings
+ * @param array $bindings
* @return int
*/
public function update($query, $bindings = [])
@@ -427,7 +433,7 @@ class Connection implements ConnectionInterface
* Run a delete statement against the database.
*
* @param string $query
- * @param array $bindings
+ * @param array $bindings
* @return int
*/
public function delete($query, $bindings = [])
@@ -439,7 +445,7 @@ class Connection implements ConnectionInterface
* Execute an SQL statement and return the boolean result.
*
* @param string $query
- * @param array $bindings
+ * @param array $bindings
* @return bool
*/
public function statement($query, $bindings = [])
@@ -463,7 +469,7 @@ class Connection implements ConnectionInterface
* Run an SQL statement and get the number of rows affected.
*
* @param string $query
- * @param array $bindings
+ * @param array $bindings
* @return int
*/
public function affectingStatement($query, $bindings = [])
@@ -563,7 +569,7 @@ class Connection implements ConnectionInterface
/**
* Bind values to their parameters in the given statement.
*
- * @param \PDOStatement $statement
+ * @param \PDOStatement $statement
* @param array $bindings
* @return void
*/
@@ -571,7 +577,8 @@ class Connection implements ConnectionInterface
{
foreach ($bindings as $key => $value) {
$statement->bindValue(
- is_string($key) ? $key : $key + 1, $value,
+ is_string($key) ? $key : $key + 1,
+ $value,
is_int($value) ? PDO::PARAM_INT : PDO::PARAM_STR
);
}
@@ -604,8 +611,8 @@ class Connection implements ConnectionInterface
/**
* Run a SQL statement and log its execution context.
*
- * @param string $query
- * @param array $bindings
+ * @param string $query
+ * @param array $bindings
* @param \Closure $callback
* @return mixed
*
@@ -641,8 +648,8 @@ class Connection implements ConnectionInterface
/**
* Run a SQL statement.
*
- * @param string $query
- * @param array $bindings
+ * @param string $query
+ * @param array $bindings
* @param \Closure $callback
* @return mixed
*
@@ -673,7 +680,7 @@ class Connection implements ConnectionInterface
* Log a query in the connection's query log.
*
* @param string $query
- * @param array $bindings
+ * @param array $bindings
* @param float|null $time
* @return void
*/
@@ -689,7 +696,7 @@ class Connection implements ConnectionInterface
/**
* Get the elapsed time since a given starting point.
*
- * @param int $start
+ * @param int $start
* @return float
*/
protected function getElapsedTime($start)
@@ -723,8 +730,8 @@ class Connection implements ConnectionInterface
* Handle a query exception that occurred during query execution.
*
* @param \Illuminate\Database\QueryException $e
- * @param string $query
- * @param array $bindings
+ * @param string $query
+ * @param array $bindings
* @param \Closure $callback
* @return mixed
*
@@ -808,11 +815,11 @@ class Connection implements ConnectionInterface
switch ($event) {
case 'beganTransaction':
- return $this->events->dispatch(new Events\TransactionBeginning($this));
+ return $this->events->dispatch(new TransactionBeginning($this));
case 'committed':
- return $this->events->dispatch(new Events\TransactionCommitted($this));
+ return $this->events->dispatch(new TransactionCommitted($this));
case 'rollingBack':
- return $this->events->dispatch(new Events\TransactionRolledBack($this));
+ return $this->events->dispatch(new TransactionRolledBack($this));
}
}
@@ -899,7 +906,7 @@ class Connection implements ConnectionInterface
$this->doctrineConnection = new DoctrineConnection(array_filter([
'pdo' => $this->getPdo(),
- 'dbname' => $this->getConfig('database'),
+ 'dbname' => $this->getDatabaseName(),
'driver' => $driver->getName(),
'serverVersion' => $this->getConfig('server_version'),
]), $driver);
@@ -922,6 +929,16 @@ class Connection implements ConnectionInterface
return $this->pdo;
}
+ /**
+ * Get the current PDO connection parameter without executing any reconnect logic.
+ *
+ * @return \PDO|\Closure|null
+ */
+ public function getRawPdo()
+ {
+ return $this->pdo;
+ }
+
/**
* Get the current PDO connection used for reading.
*
@@ -944,6 +961,16 @@ class Connection implements ConnectionInterface
return $this->readPdo ?: $this->getPdo();
}
+ /**
+ * Get the current read PDO connection parameter without executing any reconnect logic.
+ *
+ * @return \PDO|\Closure|null
+ */
+ public function getRawReadPdo()
+ {
+ return $this->readPdo;
+ }
+
/**
* Set the PDO connection.
*
diff --git a/vendor/laravel/framework/src/Illuminate/Database/ConnectionInterface.php b/vendor/laravel/framework/src/Illuminate/Database/ConnectionInterface.php
index 56127e1c7..c7e24b1ab 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/ConnectionInterface.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/ConnectionInterface.php
@@ -9,10 +9,11 @@ interface ConnectionInterface
/**
* Begin a fluent query against a database table.
*
- * @param string $table
+ * @param \Closure|\Illuminate\Database\Query\Builder|string $table
+ * @param string|null $as
* @return \Illuminate\Database\Query\Builder
*/
- public function table($table);
+ public function table($table, $as = null);
/**
* Get a new raw query expression.
@@ -26,7 +27,7 @@ interface ConnectionInterface
* Run a select statement and return a single result.
*
* @param string $query
- * @param array $bindings
+ * @param array $bindings
* @param bool $useReadPdo
* @return mixed
*/
@@ -36,7 +37,7 @@ interface ConnectionInterface
* Run a select statement against the database.
*
* @param string $query
- * @param array $bindings
+ * @param array $bindings
* @param bool $useReadPdo
* @return array
*/
@@ -56,7 +57,7 @@ interface ConnectionInterface
* Run an insert statement against the database.
*
* @param string $query
- * @param array $bindings
+ * @param array $bindings
* @return bool
*/
public function insert($query, $bindings = []);
@@ -65,7 +66,7 @@ interface ConnectionInterface
* Run an update statement against the database.
*
* @param string $query
- * @param array $bindings
+ * @param array $bindings
* @return int
*/
public function update($query, $bindings = []);
@@ -74,7 +75,7 @@ interface ConnectionInterface
* Run a delete statement against the database.
*
* @param string $query
- * @param array $bindings
+ * @param array $bindings
* @return int
*/
public function delete($query, $bindings = []);
@@ -83,7 +84,7 @@ interface ConnectionInterface
* Execute an SQL statement and return the boolean result.
*
* @param string $query
- * @param array $bindings
+ * @param array $bindings
* @return bool
*/
public function statement($query, $bindings = []);
@@ -92,7 +93,7 @@ interface ConnectionInterface
* Run an SQL statement and get the number of rows affected.
*
* @param string $query
- * @param array $bindings
+ * @param array $bindings
* @return int
*/
public function affectingStatement($query, $bindings = []);
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php b/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php
index 4153196c3..ad4650550 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php
@@ -2,15 +2,15 @@
namespace Illuminate\Database\Connectors;
-use PDOException;
-use Illuminate\Support\Arr;
-use InvalidArgumentException;
+use Illuminate\Contracts\Container\Container;
use Illuminate\Database\Connection;
use Illuminate\Database\MySqlConnection;
-use Illuminate\Database\SQLiteConnection;
use Illuminate\Database\PostgresConnection;
+use Illuminate\Database\SQLiteConnection;
use Illuminate\Database\SqlServerConnection;
-use Illuminate\Contracts\Container\Container;
+use Illuminate\Support\Arr;
+use InvalidArgumentException;
+use PDOException;
class ConnectionFactory
{
@@ -35,7 +35,7 @@ class ConnectionFactory
/**
* Establish a PDO connection based on the configuration.
*
- * @param array $config
+ * @param array $config
* @param string|null $name
* @return \Illuminate\Database\Connection
*/
@@ -53,7 +53,7 @@ class ConnectionFactory
/**
* Parse and prepare the database configuration.
*
- * @param array $config
+ * @param array $config
* @param string $name
* @return array
*/
@@ -78,7 +78,7 @@ class ConnectionFactory
}
/**
- * Create a single database connection instance.
+ * Create a read / write database connection instance.
*
* @param array $config
* @return \Illuminate\Database\Connection
@@ -115,7 +115,7 @@ class ConnectionFactory
}
/**
- * Get the read configuration for a read / write connection.
+ * Get the write configuration for a read / write connection.
*
* @param array $config
* @return array
@@ -130,7 +130,7 @@ class ConnectionFactory
/**
* Get a read / write level configuration.
*
- * @param array $config
+ * @param array $config
* @param string $type
* @return array
*/
@@ -171,6 +171,8 @@ class ConnectionFactory
*
* @param array $config
* @return \Closure
+ *
+ * @throws \PDOException
*/
protected function createPdoResolverWithHosts(array $config)
{
@@ -194,6 +196,8 @@ class ConnectionFactory
*
* @param array $config
* @return array
+ *
+ * @throws \InvalidArgumentException
*/
protected function parseHosts(array $config)
{
@@ -248,17 +252,17 @@ class ConnectionFactory
return new SqlServerConnector;
}
- throw new InvalidArgumentException("Unsupported driver [{$config['driver']}]");
+ throw new InvalidArgumentException("Unsupported driver [{$config['driver']}].");
}
/**
* Create a new connection instance.
*
- * @param string $driver
- * @param \PDO|\Closure $connection
- * @param string $database
- * @param string $prefix
- * @param array $config
+ * @param string $driver
+ * @param \PDO|\Closure $connection
+ * @param string $database
+ * @param string $prefix
+ * @param array $config
* @return \Illuminate\Database\Connection
*
* @throws \InvalidArgumentException
@@ -280,6 +284,6 @@ class ConnectionFactory
return new SqlServerConnection($connection, $database, $prefix, $config);
}
- throw new InvalidArgumentException("Unsupported driver [{$driver}]");
+ throw new InvalidArgumentException("Unsupported driver [{$driver}].");
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php b/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php
index ab0903d9c..0fecfb5e2 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php
@@ -2,11 +2,11 @@
namespace Illuminate\Database\Connectors;
-use PDO;
-use Exception;
-use Throwable;
use Doctrine\DBAL\Driver\PDOConnection;
+use Exception;
use Illuminate\Database\DetectsLostConnections;
+use PDO;
+use Throwable;
class Connector
{
@@ -29,8 +29,8 @@ class Connector
* Create a new PDO connection.
*
* @param string $dsn
- * @param array $config
- * @param array $options
+ * @param array $config
+ * @param array $options
* @return \PDO
*
* @throws \Exception
@@ -89,7 +89,7 @@ class Connector
* @param string $dsn
* @param string $username
* @param string $password
- * @param array $options
+ * @param array $options
* @return \PDO
*
* @throws \Exception
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php b/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php
index 9665172ec..a7640859d 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php
@@ -27,6 +27,8 @@ class MySqlConnector extends Connector implements ConnectorInterface
$connection->exec("use `{$config['database']}`;");
}
+ $this->configureIsolationLevel($connection, $config);
+
$this->configureEncoding($connection, $config);
// Next, we will check to see if a timezone has been specified in this config
@@ -40,12 +42,30 @@ class MySqlConnector extends Connector implements ConnectorInterface
}
/**
- * Set the connection character set and collation.
+ * Set the connection transaction isolation level.
*
* @param \PDO $connection
* @param array $config
* @return void
*/
+ protected function configureIsolationLevel($connection, array $config)
+ {
+ if (! isset($config['isolation_level'])) {
+ return;
+ }
+
+ $connection->prepare(
+ "SET SESSION TRANSACTION ISOLATION LEVEL {$config['isolation_level']}"
+ )->execute();
+ }
+
+ /**
+ * Set the connection character set and collation.
+ *
+ * @param \PDO $connection
+ * @param array $config
+ * @return void|\PDO
+ */
protected function configureEncoding($connection, array $config)
{
if (! isset($config['charset'])) {
@@ -87,7 +107,7 @@ class MySqlConnector extends Connector implements ConnectorInterface
*
* Chooses socket or host/port based on the 'unix_socket' config value.
*
- * @param array $config
+ * @param array $config
* @return string
*/
protected function getDsn(array $config)
@@ -147,7 +167,7 @@ class MySqlConnector extends Connector implements ConnectorInterface
$this->setCustomModes($connection, $config);
} elseif (isset($config['strict'])) {
if ($config['strict']) {
- $connection->prepare($this->strictMode($connection))->execute();
+ $connection->prepare($this->strictMode($connection, $config))->execute();
} else {
$connection->prepare("set session sql_mode='NO_ENGINE_SUBSTITUTION'")->execute();
}
@@ -172,11 +192,14 @@ class MySqlConnector extends Connector implements ConnectorInterface
* Get the query to enable strict mode.
*
* @param \PDO $connection
+ * @param array $config
* @return string
*/
- protected function strictMode(PDO $connection)
+ protected function strictMode(PDO $connection, $config)
{
- if (version_compare($connection->getAttribute(PDO::ATTR_SERVER_VERSION), '8.0.11') >= 0) {
+ $version = $config['version'] ?? $connection->getAttribute(PDO::ATTR_SERVER_VERSION);
+
+ if (version_compare($version, '8.0.11') >= 0) {
return "set session sql_mode='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'";
}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Connectors/PostgresConnector.php b/vendor/laravel/framework/src/Illuminate/Database/Connectors/PostgresConnector.php
index c80fea632..a3ca25e96 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Connectors/PostgresConnector.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Connectors/PostgresConnector.php
@@ -47,6 +47,8 @@ class PostgresConnector extends Connector implements ConnectorInterface
// determine if the option has been specified and run a statement if so.
$this->configureApplicationName($connection, $config);
+ $this->configureSynchronousCommit($connection, $config);
+
return $connection;
}
@@ -132,7 +134,7 @@ class PostgresConnector extends Connector implements ConnectorInterface
/**
* Create a DSN string from a configuration.
*
- * @param array $config
+ * @param array $config
* @return string
*/
protected function getDsn(array $config)
@@ -173,4 +175,20 @@ class PostgresConnector extends Connector implements ConnectorInterface
return $dsn;
}
+
+ /**
+ * Configure the synchronous_commit setting.
+ *
+ * @param \PDO $connection
+ * @param array $config
+ * @return void
+ */
+ protected function configureSynchronousCommit($connection, array $config)
+ {
+ if (! isset($config['synchronous_commit'])) {
+ return;
+ }
+
+ $connection->prepare("set synchronous_commit to '{$config['synchronous_commit']}'")->execute();
+ }
}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Connectors/SqlServerConnector.php b/vendor/laravel/framework/src/Illuminate/Database/Connectors/SqlServerConnector.php
index 6d6ac2d07..caefa6846 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Connectors/SqlServerConnector.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Connectors/SqlServerConnector.php
@@ -2,8 +2,8 @@
namespace Illuminate\Database\Connectors;
-use PDO;
use Illuminate\Support\Arr;
+use PDO;
class SqlServerConnector extends Connector implements ConnectorInterface
{
@@ -35,7 +35,7 @@ class SqlServerConnector extends Connector implements ConnectorInterface
/**
* Create a DSN string from a configuration.
*
- * @param array $config
+ * @param array $config
* @return string
*/
protected function getDsn(array $config)
@@ -140,6 +140,26 @@ class SqlServerConnector extends Connector implements ConnectorInterface
$arguments['MultiSubnetFailover'] = $config['multi_subnet_failover'];
}
+ if (isset($config['column_encryption'])) {
+ $arguments['ColumnEncryption'] = $config['column_encryption'];
+ }
+
+ if (isset($config['key_store_authentication'])) {
+ $arguments['KeyStoreAuthentication'] = $config['key_store_authentication'];
+ }
+
+ if (isset($config['key_store_principal_id'])) {
+ $arguments['KeyStorePrincipalId'] = $config['key_store_principal_id'];
+ }
+
+ if (isset($config['key_store_secret'])) {
+ $arguments['KeyStoreSecret'] = $config['key_store_secret'];
+ }
+
+ if (isset($config['login_timeout'])) {
+ $arguments['LoginTimeout'] = $config['login_timeout'];
+ }
+
return $this->buildConnectString('sqlsrv', $arguments);
}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Factories/FactoryMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Factories/FactoryMakeCommand.php
index 725a69ccc..3c0951588 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/Console/Factories/FactoryMakeCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Factories/FactoryMakeCommand.php
@@ -35,7 +35,20 @@ class FactoryMakeCommand extends GeneratorCommand
*/
protected function getStub()
{
- return __DIR__.'/stubs/factory.stub';
+ return $this->resolveStubPath('/stubs/factory.stub');
+ }
+
+ /**
+ * Resolve the fully-qualified path to the stub.
+ *
+ * @param string $stub
+ * @return string
+ */
+ protected function resolveStubPath($stub)
+ {
+ return file_exists($customPath = $this->laravel->basePath(trim($stub, '/')))
+ ? $customPath
+ : __DIR__.$stub;
}
/**
@@ -52,16 +65,17 @@ class FactoryMakeCommand extends GeneratorCommand
$model = class_basename($namespaceModel);
+ $replace = [
+ 'NamespacedDummyModel' => $namespaceModel,
+ '{{ namespacedModel }}' => $namespaceModel,
+ '{{namespacedModel}}' => $namespaceModel,
+ 'DummyModel' => $model,
+ '{{ model }}' => $model,
+ '{{model}}' => $model,
+ ];
+
return str_replace(
- [
- 'NamespacedDummyModel',
- 'DummyModel',
- ],
- [
- $namespaceModel,
- $model,
- ],
- parent::buildClass($name)
+ array_keys($replace), array_values($replace), parent::buildClass($name)
);
}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Factories/stubs/factory.stub b/vendor/laravel/framework/src/Illuminate/Database/Console/Factories/stubs/factory.stub
index eee3086c8..5e1b10245 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/Console/Factories/stubs/factory.stub
+++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Factories/stubs/factory.stub
@@ -2,10 +2,10 @@
/** @var \Illuminate\Database\Eloquent\Factory $factory */
-use NamespacedDummyModel;
use Faker\Generator as Faker;
+use {{ namespacedModel }};
-$factory->define(DummyModel::class, function (Faker $faker) {
+$factory->define({{ model }}::class, function (Faker $faker) {
return [
//
];
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/FreshCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/FreshCommand.php
index e936c98f4..29021e0c3 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/FreshCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/FreshCommand.php
@@ -27,31 +27,22 @@ class FreshCommand extends Command
/**
* Execute the console command.
*
- * @return void
+ * @return int
*/
public function handle()
{
if (! $this->confirmToProceed()) {
- return;
+ return 1;
}
$database = $this->input->getOption('database');
- if ($this->option('drop-views')) {
- $this->dropAllViews($database);
-
- $this->info('Dropped all views successfully.');
- }
-
- $this->dropAllTables($database);
-
- $this->info('Dropped all tables successfully.');
-
- if ($this->option('drop-types')) {
- $this->dropAllTypes($database);
-
- $this->info('Dropped all types successfully.');
- }
+ $this->call('db:wipe', array_filter([
+ '--database' => $database,
+ '--drop-views' => $this->option('drop-views'),
+ '--drop-types' => $this->option('drop-types'),
+ '--force' => true,
+ ]));
$this->call('migrate', array_filter([
'--database' => $database,
@@ -64,45 +55,8 @@ class FreshCommand extends Command
if ($this->needsSeeding()) {
$this->runSeeder($database);
}
- }
- /**
- * Drop all of the database tables.
- *
- * @param string $database
- * @return void
- */
- protected function dropAllTables($database)
- {
- $this->laravel['db']->connection($database)
- ->getSchemaBuilder()
- ->dropAllTables();
- }
-
- /**
- * Drop all of the database views.
- *
- * @param string $database
- * @return void
- */
- protected function dropAllViews($database)
- {
- $this->laravel['db']->connection($database)
- ->getSchemaBuilder()
- ->dropAllViews();
- }
-
- /**
- * Drop all of the database types.
- *
- * @param string $database
- * @return void
- */
- protected function dropAllTypes($database)
- {
- $this->laravel['db']->connection($database)
- ->getSchemaBuilder()
- ->dropAllTypes();
+ return 0;
}
/**
@@ -142,7 +96,7 @@ class FreshCommand extends Command
['drop-views', null, InputOption::VALUE_NONE, 'Drop all tables and views'],
['drop-types', null, InputOption::VALUE_NONE, 'Drop all tables and types (Postgres only)'],
['force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production'],
- ['path', null, InputOption::VALUE_OPTIONAL, 'The path to the migrations files to be executed'],
+ ['path', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'The path(s) to the migrations files to be executed'],
['realpath', null, InputOption::VALUE_NONE, 'Indicate any provided migration file paths are pre-resolved absolute paths'],
['seed', null, InputOption::VALUE_NONE, 'Indicates if the seed task should be re-run'],
['seeder', null, InputOption::VALUE_OPTIONAL, 'The class name of the root seeder'],
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/InstallCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/InstallCommand.php
index 354d7a1c1..d69c2ab6b 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/InstallCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/InstallCommand.php
@@ -3,8 +3,8 @@
namespace Illuminate\Database\Console\Migrations;
use Illuminate\Console\Command;
-use Symfony\Component\Console\Input\InputOption;
use Illuminate\Database\Migrations\MigrationRepositoryInterface;
+use Symfony\Component\Console\Input\InputOption;
class InstallCommand extends Command
{
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php
index 9fa978d0f..688b67da8 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php
@@ -52,31 +52,35 @@ class MigrateCommand extends BaseCommand
/**
* Execute the console command.
*
- * @return void
+ * @return int
*/
public function handle()
{
if (! $this->confirmToProceed()) {
- return;
+ return 1;
}
- $this->prepareDatabase();
+ $this->migrator->usingConnection($this->option('database'), function () {
+ $this->prepareDatabase();
- // Next, we will check to see if a path option has been defined. If it has
- // we will use the path relative to the root of this installation folder
- // so that migrations may be run for any path within the applications.
- $this->migrator->setOutput($this->output)
- ->run($this->getMigrationPaths(), [
- 'pretend' => $this->option('pretend'),
- 'step' => $this->option('step'),
- ]);
+ // Next, we will check to see if a path option has been defined. If it has
+ // we will use the path relative to the root of this installation folder
+ // so that migrations may be run for any path within the applications.
+ $this->migrator->setOutput($this->output)
+ ->run($this->getMigrationPaths(), [
+ 'pretend' => $this->option('pretend'),
+ 'step' => $this->option('step'),
+ ]);
- // Finally, if the "seed" option has been given, we will re-run the database
- // seed task to re-populate the database, which is convenient when adding
- // a migration and a seed at the same time, as it is only this command.
- if ($this->option('seed') && ! $this->option('pretend')) {
- $this->call('db:seed', ['--force' => true]);
- }
+ // Finally, if the "seed" option has been given, we will re-run the database
+ // seed task to re-populate the database, which is convenient when adding
+ // a migration and a seed at the same time, as it is only this command.
+ if ($this->option('seed') && ! $this->option('pretend')) {
+ $this->call('db:seed', ['--force' => true]);
+ }
+ });
+
+ return 0;
}
/**
@@ -86,8 +90,6 @@ class MigrateCommand extends BaseCommand
*/
protected function prepareDatabase()
{
- $this->migrator->setConnection($this->option('database'));
-
if (! $this->migrator->repositoryExists()) {
$this->call('migrate:install', array_filter([
'--database' => $this->option('database'),
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateMakeCommand.php
index c41986d94..2c2a71155 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateMakeCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateMakeCommand.php
@@ -2,9 +2,9 @@
namespace Illuminate\Database\Console\Migrations;
-use Illuminate\Support\Str;
-use Illuminate\Support\Composer;
use Illuminate\Database\Migrations\MigrationCreator;
+use Illuminate\Support\Composer;
+use Illuminate\Support\Str;
class MigrateMakeCommand extends BaseCommand
{
@@ -101,7 +101,7 @@ class MigrateMakeCommand extends BaseCommand
*
* @param string $name
* @param string $table
- * @param bool $create
+ * @param bool $create
* @return string
*/
protected function writeMigration($name, $table, $create)
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RefreshCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RefreshCommand.php
index d27bb1555..9a799c521 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RefreshCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RefreshCommand.php
@@ -27,12 +27,12 @@ class RefreshCommand extends Command
/**
* Execute the console command.
*
- * @return void
+ * @return int
*/
public function handle()
{
if (! $this->confirmToProceed()) {
- return;
+ return 1;
}
// Next we'll gather some of the options so that we can have the right options
@@ -66,6 +66,8 @@ class RefreshCommand extends Command
if ($this->needsSeeding()) {
$this->runSeeder($database);
}
+
+ return 0;
}
/**
@@ -138,17 +140,11 @@ class RefreshCommand extends Command
{
return [
['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use'],
-
['force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production'],
-
- ['path', null, InputOption::VALUE_OPTIONAL, 'The path to the migrations files to be executed'],
-
+ ['path', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'The path(s) to the migrations files to be executed'],
['realpath', null, InputOption::VALUE_NONE, 'Indicate any provided migration file paths are pre-resolved absolute paths'],
-
['seed', null, InputOption::VALUE_NONE, 'Indicates if the seed task should be re-run'],
-
['seeder', null, InputOption::VALUE_OPTIONAL, 'The class name of the root seeder'],
-
['step', null, InputOption::VALUE_OPTIONAL, 'The number of migrations to be reverted & re-run'],
];
}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/ResetCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/ResetCommand.php
index 28803806a..21b532979 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/ResetCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/ResetCommand.php
@@ -47,26 +47,28 @@ class ResetCommand extends BaseCommand
/**
* Execute the console command.
*
- * @return void
+ * @return int
*/
public function handle()
{
if (! $this->confirmToProceed()) {
- return;
+ return 1;
}
- $this->migrator->setConnection($this->option('database'));
+ return $this->migrator->usingConnection($this->option('database'), function () {
+ // First, we'll make sure that the migration table actually exists before we
+ // start trying to rollback and re-run all of the migrations. If it's not
+ // present we'll just bail out with an info message for the developers.
+ if (! $this->migrator->repositoryExists()) {
+ return $this->comment('Migration table not found.');
+ }
- // First, we'll make sure that the migration table actually exists before we
- // start trying to rollback and re-run all of the migrations. If it's not
- // present we'll just bail out with an info message for the developers.
- if (! $this->migrator->repositoryExists()) {
- return $this->comment('Migration table not found.');
- }
+ $this->migrator->setOutput($this->output)->reset(
+ $this->getMigrationPaths(), $this->option('pretend')
+ );
+ });
- $this->migrator->setOutput($this->output)->reset(
- $this->getMigrationPaths(), $this->option('pretend')
- );
+ return 0;
}
/**
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RollbackCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RollbackCommand.php
index 65a50eb06..c851360f7 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RollbackCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RollbackCommand.php
@@ -47,22 +47,24 @@ class RollbackCommand extends BaseCommand
/**
* Execute the console command.
*
- * @return void
+ * @return int
*/
public function handle()
{
if (! $this->confirmToProceed()) {
- return;
+ return 1;
}
- $this->migrator->setConnection($this->option('database'));
+ $this->migrator->usingConnection($this->option('database'), function () {
+ $this->migrator->setOutput($this->output)->rollback(
+ $this->getMigrationPaths(), [
+ 'pretend' => $this->option('pretend'),
+ 'step' => (int) $this->option('step'),
+ ]
+ );
+ });
- $this->migrator->setOutput($this->output)->rollback(
- $this->getMigrationPaths(), [
- 'pretend' => $this->option('pretend'),
- 'step' => (int) $this->option('step'),
- ]
- );
+ return 0;
}
/**
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/StatusCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/StatusCommand.php
index 0040fe517..2cf82f96f 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/StatusCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/StatusCommand.php
@@ -2,8 +2,8 @@
namespace Illuminate\Database\Console\Migrations;
-use Illuminate\Support\Collection;
use Illuminate\Database\Migrations\Migrator;
+use Illuminate\Support\Collection;
use Symfony\Component\Console\Input\InputOption;
class StatusCommand extends BaseCommand
@@ -32,7 +32,7 @@ class StatusCommand extends BaseCommand
/**
* Create a new migration rollback command instance.
*
- * @param \Illuminate\Database\Migrations\Migrator $migrator
+ * @param \Illuminate\Database\Migrations\Migrator $migrator
* @return void
*/
public function __construct(Migrator $migrator)
@@ -45,25 +45,27 @@ class StatusCommand extends BaseCommand
/**
* Execute the console command.
*
- * @return void
+ * @return int|null
*/
public function handle()
{
- $this->migrator->setConnection($this->option('database'));
+ return $this->migrator->usingConnection($this->option('database'), function () {
+ if (! $this->migrator->repositoryExists()) {
+ $this->error('Migration table not found.');
- if (! $this->migrator->repositoryExists()) {
- return $this->error('Migration table not found.');
- }
+ return 1;
+ }
- $ran = $this->migrator->getRepository()->getRan();
+ $ran = $this->migrator->getRepository()->getRan();
- $batches = $this->migrator->getRepository()->getMigrationBatches();
+ $batches = $this->migrator->getRepository()->getMigrationBatches();
- if (count($migrations = $this->getStatusFor($ran, $batches)) > 0) {
- $this->table(['Ran?', 'Migration', 'Batch'], $migrations);
- } else {
- $this->error('No migrations found');
- }
+ if (count($migrations = $this->getStatusFor($ran, $batches)) > 0) {
+ $this->table(['Ran?', 'Migration', 'Batch'], $migrations);
+ } else {
+ $this->error('No migrations found');
+ }
+ });
}
/**
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeedCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeedCommand.php
index 06a13e0cb..2e4fdd709 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeedCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeedCommand.php
@@ -3,10 +3,10 @@
namespace Illuminate\Database\Console\Seeds;
use Illuminate\Console\Command;
-use Illuminate\Database\Eloquent\Model;
use Illuminate\Console\ConfirmableTrait;
-use Symfony\Component\Console\Input\InputOption;
use Illuminate\Database\ConnectionResolverInterface as Resolver;
+use Illuminate\Database\Eloquent\Model;
+use Symfony\Component\Console\Input\InputOption;
class SeedCommand extends Command
{
@@ -49,21 +49,29 @@ class SeedCommand extends Command
/**
* Execute the console command.
*
- * @return void
+ * @return int
*/
public function handle()
{
if (! $this->confirmToProceed()) {
- return;
+ return 1;
}
+ $previousConnection = $this->resolver->getDefaultConnection();
+
$this->resolver->setDefaultConnection($this->getDatabase());
Model::unguarded(function () {
$this->getSeeder()->__invoke();
});
+ if ($previousConnection) {
+ $this->resolver->setDefaultConnection($previousConnection);
+ }
+
$this->info('Database seeding completed successfully.');
+
+ return 0;
}
/**
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeederMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeederMakeCommand.php
index 6e85e3e43..62ec1d46a 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeederMakeCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeederMakeCommand.php
@@ -2,9 +2,9 @@
namespace Illuminate\Database\Console\Seeds;
-use Illuminate\Support\Composer;
-use Illuminate\Filesystem\Filesystem;
use Illuminate\Console\GeneratorCommand;
+use Illuminate\Filesystem\Filesystem;
+use Illuminate\Support\Composer;
class SeederMakeCommand extends GeneratorCommand
{
@@ -69,7 +69,20 @@ class SeederMakeCommand extends GeneratorCommand
*/
protected function getStub()
{
- return __DIR__.'/stubs/seeder.stub';
+ return $this->resolveStubPath('/stubs/seeder.stub');
+ }
+
+ /**
+ * Resolve the fully-qualified path to the stub.
+ *
+ * @param string $stub
+ * @return string
+ */
+ protected function resolveStubPath($stub)
+ {
+ return file_exists($customPath = $this->laravel->basePath(trim($stub, '/')))
+ ? $customPath
+ : __DIR__.$stub;
}
/**
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/stubs/seeder.stub b/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/stubs/seeder.stub
index 4aa384542..ee4d85d51 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/stubs/seeder.stub
+++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/stubs/seeder.stub
@@ -2,7 +2,7 @@
use Illuminate\Database\Seeder;
-class DummyClass extends Seeder
+class {{ class }} extends Seeder
{
/**
* Run the database seeds.
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/WipeCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/WipeCommand.php
new file mode 100644
index 000000000..30825ed7c
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Database/Console/WipeCommand.php
@@ -0,0 +1,112 @@
+confirmToProceed()) {
+ return 1;
+ }
+
+ $database = $this->input->getOption('database');
+
+ if ($this->option('drop-views')) {
+ $this->dropAllViews($database);
+
+ $this->info('Dropped all views successfully.');
+ }
+
+ $this->dropAllTables($database);
+
+ $this->info('Dropped all tables successfully.');
+
+ if ($this->option('drop-types')) {
+ $this->dropAllTypes($database);
+
+ $this->info('Dropped all types successfully.');
+ }
+
+ return 0;
+ }
+
+ /**
+ * Drop all of the database tables.
+ *
+ * @param string $database
+ * @return void
+ */
+ protected function dropAllTables($database)
+ {
+ $this->laravel['db']->connection($database)
+ ->getSchemaBuilder()
+ ->dropAllTables();
+ }
+
+ /**
+ * Drop all of the database views.
+ *
+ * @param string $database
+ * @return void
+ */
+ protected function dropAllViews($database)
+ {
+ $this->laravel['db']->connection($database)
+ ->getSchemaBuilder()
+ ->dropAllViews();
+ }
+
+ /**
+ * Drop all of the database types.
+ *
+ * @param string $database
+ * @return void
+ */
+ protected function dropAllTypes($database)
+ {
+ $this->laravel['db']->connection($database)
+ ->getSchemaBuilder()
+ ->dropAllTypes();
+ }
+
+ /**
+ * Get the console command options.
+ *
+ * @return array
+ */
+ protected function getOptions()
+ {
+ return [
+ ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use'],
+ ['drop-views', null, InputOption::VALUE_NONE, 'Drop all tables and views'],
+ ['drop-types', null, InputOption::VALUE_NONE, 'Drop all tables and types (Postgres only)'],
+ ['force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production'],
+ ];
+ }
+}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php b/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php
index c95b5835e..d558d1665 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php
@@ -2,12 +2,12 @@
namespace Illuminate\Database;
-use PDO;
+use Illuminate\Database\Connectors\ConnectionFactory;
use Illuminate\Support\Arr;
+use Illuminate\Support\ConfigurationUrlParser;
use Illuminate\Support\Str;
use InvalidArgumentException;
-use Illuminate\Support\ConfigurationUrlParser;
-use Illuminate\Database\Connectors\ConnectionFactory;
+use PDO;
/**
* @mixin \Illuminate\Database\Connection
@@ -149,7 +149,7 @@ class DatabaseManager implements ConnectionResolverInterface
$connections = $this->app['config']['database.connections'];
if (is_null($config = Arr::get($connections, $name))) {
- throw new InvalidArgumentException("Database [{$name}] not configured.");
+ throw new InvalidArgumentException("Database connection [{$name}] not configured.");
}
return (new ConfigurationUrlParser)
@@ -245,6 +245,24 @@ class DatabaseManager implements ConnectionResolverInterface
return $this->refreshPdoConnections($name);
}
+ /**
+ * Set the default database connection for the callback execution.
+ *
+ * @param string $name
+ * @param callable $callback
+ * @return mixed
+ */
+ public function usingConnection($name, callable $callback)
+ {
+ $previousName = $this->getDefaultConnection();
+
+ $this->setDefaultConnection($name);
+
+ return tap($callback(), function () use ($previousName) {
+ $this->setDefaultConnection($previousName);
+ });
+ }
+
/**
* Refresh the PDO connections on a given connection.
*
@@ -256,8 +274,8 @@ class DatabaseManager implements ConnectionResolverInterface
$fresh = $this->makeConnection($name);
return $this->connections[$name]
- ->setPdo($fresh->getPdo())
- ->setReadPdo($fresh->getReadPdo());
+ ->setPdo($fresh->getRawPdo())
+ ->setReadPdo($fresh->getRawReadPdo());
}
/**
@@ -307,7 +325,7 @@ class DatabaseManager implements ConnectionResolverInterface
/**
* Register an extension connection resolver.
*
- * @param string $name
+ * @param string $name
* @param callable $resolver
* @return void
*/
@@ -341,7 +359,7 @@ class DatabaseManager implements ConnectionResolverInterface
* Dynamically pass methods to the default connection.
*
* @param string $method
- * @param array $parameters
+ * @param array $parameters
* @return mixed
*/
public function __call($method, $parameters)
diff --git a/vendor/laravel/framework/src/Illuminate/Database/DatabaseServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Database/DatabaseServiceProvider.php
index a8ee7b030..3008e5b6b 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/DatabaseServiceProvider.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/DatabaseServiceProvider.php
@@ -4,15 +4,22 @@ namespace Illuminate\Database;
use Faker\Factory as FakerFactory;
use Faker\Generator as FakerGenerator;
-use Illuminate\Database\Eloquent\Model;
-use Illuminate\Support\ServiceProvider;
use Illuminate\Contracts\Queue\EntityResolver;
use Illuminate\Database\Connectors\ConnectionFactory;
-use Illuminate\Database\Eloquent\QueueEntityResolver;
use Illuminate\Database\Eloquent\Factory as EloquentFactory;
+use Illuminate\Database\Eloquent\Model;
+use Illuminate\Database\Eloquent\QueueEntityResolver;
+use Illuminate\Support\ServiceProvider;
class DatabaseServiceProvider extends ServiceProvider
{
+ /**
+ * The array of resolved Faker instances.
+ *
+ * @var array
+ */
+ protected static $fakers = [];
+
/**
* Bootstrap the application events.
*
@@ -74,8 +81,16 @@ class DatabaseServiceProvider extends ServiceProvider
*/
protected function registerEloquentFactory()
{
- $this->app->singleton(FakerGenerator::class, function ($app) {
- return FakerFactory::create($app['config']->get('app.faker_locale', 'en_US'));
+ $this->app->singleton(FakerGenerator::class, function ($app, $parameters) {
+ $locale = $parameters['locale'] ?? $app['config']->get('app.faker_locale', 'en_US');
+
+ if (! isset(static::$fakers[$locale])) {
+ static::$fakers[$locale] = FakerFactory::create($locale);
+ }
+
+ static::$fakers[$locale]->unique(true);
+
+ return static::$fakers[$locale];
});
$this->app->singleton(EloquentFactory::class, function ($app) {
diff --git a/vendor/laravel/framework/src/Illuminate/Database/DetectsConcurrencyErrors.php b/vendor/laravel/framework/src/Illuminate/Database/DetectsConcurrencyErrors.php
new file mode 100644
index 000000000..adbe4dc48
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Database/DetectsConcurrencyErrors.php
@@ -0,0 +1,37 @@
+getCode() === '40001') {
+ return true;
+ }
+
+ $message = $e->getMessage();
+
+ return Str::contains($message, [
+ 'Deadlock found when trying to get lock',
+ 'deadlock detected',
+ 'The database file is locked',
+ 'database is locked',
+ 'database table is locked',
+ 'A table in the database is locked',
+ 'has been chosen as the deadlock victim',
+ 'Lock wait timeout exceeded; try restarting transaction',
+ 'WSREP detected deadlock/conflict and aborted the transaction. Try restarting the transaction',
+ ]);
+ }
+}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/DetectsDeadlocks.php b/vendor/laravel/framework/src/Illuminate/Database/DetectsDeadlocks.php
deleted file mode 100644
index a8193eeb9..000000000
--- a/vendor/laravel/framework/src/Illuminate/Database/DetectsDeadlocks.php
+++ /dev/null
@@ -1,32 +0,0 @@
-getMessage();
-
- return Str::contains($message, [
- 'Deadlock found when trying to get lock',
- 'deadlock detected',
- 'The database file is locked',
- 'database is locked',
- 'database table is locked',
- 'A table in the database is locked',
- 'has been chosen as the deadlock victim',
- 'Lock wait timeout exceeded; try restarting transaction',
- 'WSREP detected deadlock/conflict and aborted the transaction. Try restarting the transaction',
- ]);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/DetectsLostConnections.php b/vendor/laravel/framework/src/Illuminate/Database/DetectsLostConnections.php
index 7a69bec0e..36b460999 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/DetectsLostConnections.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/DetectsLostConnections.php
@@ -2,8 +2,8 @@
namespace Illuminate\Database;
-use Throwable;
use Illuminate\Support\Str;
+use Throwable;
trait DetectsLostConnections
{
@@ -38,6 +38,13 @@ trait DetectsLostConnections
'Packets out of order. Expected',
'Adaptive Server connection failed',
'Communication link failure',
+ 'connection is no longer usable',
+ 'Login timeout expired',
+ 'SQLSTATE[HY000] [2002] Connection refused',
+ 'running with the --read-only option so it cannot execute this statement',
+ 'The connection is broken and recovery is not possible. The connection is marked by the client driver as unrecoverable. No attempt was made to restore the connection.',
+ 'SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Try again',
+ 'SQLSTATE[HY000]: General error: 7 SSL SYSCALL error: EOF detected',
]);
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php
index 051b5aa2d..66cd2ded4 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php
@@ -2,17 +2,20 @@
namespace Illuminate\Database\Eloquent;
+use BadMethodCallException;
use Closure;
use Exception;
-use BadMethodCallException;
-use Illuminate\Support\Arr;
-use Illuminate\Support\Str;
-use Illuminate\Pagination\Paginator;
use Illuminate\Contracts\Support\Arrayable;
-use Illuminate\Support\Traits\ForwardsCalls;
use Illuminate\Database\Concerns\BuildsQueries;
+use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\Relation;
use Illuminate\Database\Query\Builder as QueryBuilder;
+use Illuminate\Pagination\Paginator;
+use Illuminate\Support\Arr;
+use Illuminate\Support\Str;
+use Illuminate\Support\Traits\ForwardsCalls;
+use ReflectionClass;
+use ReflectionMethod;
/**
* @property-read HigherOrderBuilderProxy $orWhere
@@ -72,7 +75,7 @@ class Builder
*/
protected $passthru = [
'insert', 'insertOrIgnore', 'insertGetId', 'insertUsing', 'getBindings', 'toSql', 'dump', 'dd',
- 'exists', 'doesntExist', 'count', 'min', 'max', 'avg', 'average', 'sum', 'getConnection',
+ 'exists', 'doesntExist', 'count', 'min', 'max', 'avg', 'average', 'sum', 'getConnection', 'raw', 'getGrammar',
];
/**
@@ -104,7 +107,7 @@ class Builder
* Create and return an un-saved model instance.
*
* @param array $attributes
- * @return \Illuminate\Database\Eloquent\Model
+ * @return \Illuminate\Database\Eloquent\Model|static
*/
public function make(array $attributes = [])
{
@@ -191,6 +194,10 @@ class Builder
return $this;
}
+ if ($id !== null && $this->model->getKeyType() === 'string') {
+ $id = (string) $id;
+ }
+
return $this->where($this->model->getQualifiedKeyName(), '=', $id);
}
@@ -208,22 +215,26 @@ class Builder
return $this;
}
+ if ($id !== null && $this->model->getKeyType() === 'string') {
+ $id = (string) $id;
+ }
+
return $this->where($this->model->getQualifiedKeyName(), '!=', $id);
}
/**
* Add a basic where clause to the query.
*
- * @param string|array|\Closure $column
- * @param mixed $operator
- * @param mixed $value
+ * @param \Closure|string|array|\Illuminate\Database\Query\Expression $column
+ * @param mixed $operator
+ * @param mixed $value
* @param string $boolean
* @return $this
*/
public function where($column, $operator = null, $value = null, $boolean = 'and')
{
- if ($column instanceof Closure) {
- $column($query = $this->model->newModelQuery());
+ if ($column instanceof Closure && is_null($operator)) {
+ $column($query = $this->model->newQueryWithoutRelationships());
$this->query->addNestedWhereQuery($query->getQuery(), $boolean);
} else {
@@ -234,12 +245,26 @@ class Builder
}
/**
- * Add an "or where" clause to the query.
+ * Add a basic where clause to the query, and return the first result.
*
- * @param \Closure|array|string $column
+ * @param \Closure|string|array|\Illuminate\Database\Query\Expression $column
* @param mixed $operator
* @param mixed $value
- * @return \Illuminate\Database\Eloquent\Builder|static
+ * @param string $boolean
+ * @return \Illuminate\Database\Eloquent\Model|static
+ */
+ public function firstWhere($column, $operator = null, $value = null, $boolean = 'and')
+ {
+ return $this->where($column, $operator, $value, $boolean)->first();
+ }
+
+ /**
+ * Add an "or where" clause to the query.
+ *
+ * @param \Closure|array|string|\Illuminate\Database\Query\Expression $column
+ * @param mixed $operator
+ * @param mixed $value
+ * @return $this
*/
public function orWhere($column, $operator = null, $value = null)
{
@@ -253,7 +278,7 @@ class Builder
/**
* Add an "order by" clause for a timestamp to the query.
*
- * @param string $column
+ * @param string|\Illuminate\Database\Query\Expression $column
* @return $this
*/
public function latest($column = null)
@@ -270,7 +295,7 @@ class Builder
/**
* Add an "order by" clause for a timestamp to the query.
*
- * @param string $column
+ * @param string|\Illuminate\Database\Query\Expression $column
* @return $this
*/
public function oldest($column = null)
@@ -360,6 +385,8 @@ class Builder
{
$result = $this->find($id, $columns);
+ $id = $id instanceof Arrayable ? $id->toArray() : $id;
+
if (is_array($id)) {
if (count($result) === count(array_unique($id))) {
return $result;
@@ -396,7 +423,7 @@ class Builder
* @param array $values
* @return \Illuminate\Database\Eloquent\Model|static
*/
- public function firstOrNew(array $attributes, array $values = [])
+ public function firstOrNew(array $attributes = [], array $values = [])
{
if (! is_null($instance = $this->where($attributes)->first())) {
return $instance;
@@ -473,26 +500,26 @@ class Builder
return $model;
}
- return call_user_func($callback);
+ return $callback();
}
/**
* Get a single column's value from the first result of a query.
*
- * @param string $column
+ * @param string|\Illuminate\Database\Query\Expression $column
* @return mixed
*/
public function value($column)
{
if ($result = $this->first([$column])) {
- return $result->{$column};
+ return $result->{Str::afterLast($column, '.')};
}
}
/**
* Execute the query as a "select" statement.
*
- * @param array $columns
+ * @param array|string $columns
* @return \Illuminate\Database\Eloquent\Collection|static[]
*/
public function get($columns = ['*'])
@@ -512,7 +539,7 @@ class Builder
/**
* Get the hydrated models without eager loading.
*
- * @param array $columns
+ * @param array|string $columns
* @return \Illuminate\Database\Eloquent\Model[]|static[]
*/
public function getModels($columns = ['*'])
@@ -636,61 +663,15 @@ class Builder
}
/**
- * Get a generator for the given query.
+ * Get a lazy collection for the given query.
*
- * @return \Generator
+ * @return \Illuminate\Support\LazyCollection
*/
public function cursor()
{
- foreach ($this->applyScopes()->query->cursor() as $record) {
- yield $this->newModelInstance()->newFromBuilder($record);
- }
- }
-
- /**
- * Chunk the results of a query by comparing numeric IDs.
- *
- * @param int $count
- * @param callable $callback
- * @param string|null $column
- * @param string|null $alias
- * @return bool
- */
- public function chunkById($count, callable $callback, $column = null, $alias = null)
- {
- $column = is_null($column) ? $this->getModel()->getKeyName() : $column;
-
- $alias = is_null($alias) ? $column : $alias;
-
- $lastId = null;
-
- do {
- $clone = clone $this;
-
- // We'll execute the query for the given page and get the results. If there are
- // no results we can just break and return from here. When there are results
- // we will call the callback with the current chunk of these results here.
- $results = $clone->forPageAfterId($count, $lastId, $column)->get();
-
- $countResults = $results->count();
-
- if ($countResults == 0) {
- break;
- }
-
- // On each chunk result set, we will pass them to the callback and then let the
- // developer take care of everything within the callback, which allows us to
- // keep the memory low for spinning through large result sets for working.
- if ($callback($results) === false) {
- return false;
- }
-
- $lastId = $results->last()->{$alias};
-
- unset($results);
- } while ($countResults == $count);
-
- return true;
+ return $this->applyScopes()->query->cursor()->map(function ($record) {
+ return $this->newModelInstance()->newFromBuilder($record);
+ });
}
/**
@@ -708,7 +689,7 @@ class Builder
/**
* Get an array with the values of a given column.
*
- * @param string $column
+ * @param string|\Illuminate\Database\Query\Expression $column
* @param string|null $key
* @return \Illuminate\Support\Collection
*/
@@ -733,7 +714,7 @@ class Builder
/**
* Paginate the given query.
*
- * @param int $perPage
+ * @param int|null $perPage
* @param array $columns
* @param string $pageName
* @param int|null $page
@@ -760,7 +741,7 @@ class Builder
/**
* Paginate the given query into a simple paginator.
*
- * @param int $perPage
+ * @param int|null $perPage
* @param array $columns
* @param string $pageName
* @param int|null $page
@@ -823,7 +804,7 @@ class Builder
/**
* Increment a column's value by a given amount.
*
- * @param string $column
+ * @param string|\Illuminate\Database\Query\Expression $column
* @param float|int $amount
* @param array $extra
* @return int
@@ -838,7 +819,7 @@ class Builder
/**
* Decrement a column's value by a given amount.
*
- * @param string $column
+ * @param string|\Illuminate\Database\Query\Expression $column
* @param float|int $amount
* @param array $extra
* @return int
@@ -918,17 +899,28 @@ class Builder
$this->onDelete = $callback;
}
+ /**
+ * Determine if the given model has a scope.
+ *
+ * @param string $scope
+ * @return bool
+ */
+ public function hasNamedScope($scope)
+ {
+ return $this->model && $this->model->hasNamedScope($scope);
+ }
+
/**
* Call the given local model scopes.
*
- * @param array $scopes
+ * @param array|string $scopes
* @return static|mixed
*/
- public function scopes(array $scopes)
+ public function scopes($scopes)
{
$builder = $this;
- foreach ($scopes as $scope => $parameters) {
+ foreach (Arr::wrap($scopes) as $scope => $parameters) {
// If the scope key is an integer, then the scope was passed as the value and
// the parameter list is empty, so we will format the scope name and these
// parameters here. Then, we'll be ready to call the scope on the model.
@@ -939,10 +931,7 @@ class Builder
// Next we'll pass the scope callback to the callScope method which will take
// care of grouping the "wheres" properly so the logical order doesn't get
// messed up when adding scopes. Then we'll return back out the builder.
- $builder = $builder->callScope(
- [$this->model, 'scope'.ucfirst($scope)],
- (array) $parameters
- );
+ $builder = $builder->callNamedScope($scope, (array) $parameters);
}
return $builder;
@@ -993,7 +982,7 @@ class Builder
* @param array $parameters
* @return mixed
*/
- protected function callScope(callable $scope, $parameters = [])
+ protected function callScope(callable $scope, array $parameters = [])
{
array_unshift($parameters, $this);
@@ -1014,6 +1003,20 @@ class Builder
return $result;
}
+ /**
+ * Apply the given named scope on the current builder instance.
+ *
+ * @param string $scope
+ * @param array $parameters
+ * @return mixed
+ */
+ protected function callNamedScope($scope, array $parameters = [])
+ {
+ return $this->callScope(function (...$parameters) use ($scope) {
+ return $this->model->callNamedScope($scope, $parameters);
+ }, $parameters);
+ }
+
/**
* Nest where conditions by slicing them at the given where count.
*
@@ -1132,15 +1135,15 @@ class Builder
$results = [];
foreach ($relations as $name => $constraints) {
- // If the "name" value is a numeric key, we can assume that no
- // constraints have been specified. We'll just put an empty
- // Closure there, so that we can treat them all the same.
+ // If the "name" value is a numeric key, we can assume that no constraints
+ // have been specified. We will just put an empty Closure there so that
+ // we can treat these all the same while we are looping through them.
if (is_numeric($name)) {
$name = $constraints;
[$name, $constraints] = Str::contains($name, ':')
? $this->createSelectWithConstraint($name)
- : [$name, function () {
+ : [$name, static function () {
//
}];
}
@@ -1164,8 +1167,16 @@ class Builder
*/
protected function createSelectWithConstraint($name)
{
- return [explode(':', $name)[0], function ($query) use ($name) {
- $query->select(explode(',', explode(':', $name)[1]));
+ return [explode(':', $name)[0], static function ($query) use ($name) {
+ $query->select(array_map(static function ($column) use ($query) {
+ if (Str::contains($column, '.')) {
+ return $column;
+ }
+
+ return $query instanceof BelongsToMany
+ ? $query->getRelated()->getTable().'.'.$column
+ : $column;
+ }, explode(',', explode(':', $name)[1])));
}];
}
@@ -1187,7 +1198,7 @@ class Builder
$progress[] = $segment;
if (! isset($results[$last = implode('.', $progress)])) {
- $results[$last] = function () {
+ $results[$last] = static function () {
//
};
}
@@ -1196,6 +1207,19 @@ class Builder
return $results;
}
+ /**
+ * Apply query-time casts to the model instance.
+ *
+ * @param array $casts
+ * @return $this
+ */
+ public function withCasts($casts)
+ {
+ $this->model->mergeCasts($casts);
+
+ return $this;
+ }
+
/**
* Get the underlying query builder instance.
*
@@ -1252,6 +1276,16 @@ class Builder
return $this;
}
+ /**
+ * Get the default key name of the table.
+ *
+ * @return string
+ */
+ protected function defaultKeyName()
+ {
+ return $this->getModel()->getKeyName();
+ }
+
/**
* Get the model instance being queried.
*
@@ -1280,7 +1314,7 @@ class Builder
/**
* Qualify the given column name by the model's table.
*
- * @param string $column
+ * @param string|\Illuminate\Database\Query\Expression $column
* @return string
*/
public function qualifyColumn($column)
@@ -1299,6 +1333,39 @@ class Builder
return Arr::get($this->localMacros, $name);
}
+ /**
+ * Checks if a macro is registered.
+ *
+ * @param string $name
+ * @return bool
+ */
+ public function hasMacro($name)
+ {
+ return isset($this->localMacros[$name]);
+ }
+
+ /**
+ * Get the given global macro by name.
+ *
+ * @param string $name
+ * @return \Closure
+ */
+ public static function getGlobalMacro($name)
+ {
+ return Arr::get(static::$macros, $name);
+ }
+
+ /**
+ * Checks if a global macro is registered.
+ *
+ * @param string $name
+ * @return bool
+ */
+ public static function hasGlobalMacro($name)
+ {
+ return isset(static::$macros[$name]);
+ }
+
/**
* Dynamically access builder proxies.
*
@@ -1331,22 +1398,24 @@ class Builder
return;
}
- if (isset($this->localMacros[$method])) {
+ if ($this->hasMacro($method)) {
array_unshift($parameters, $this);
return $this->localMacros[$method](...$parameters);
}
- if (isset(static::$macros[$method])) {
- if (static::$macros[$method] instanceof Closure) {
- return call_user_func_array(static::$macros[$method]->bindTo($this, static::class), $parameters);
+ if (static::hasGlobalMacro($method)) {
+ $callable = static::$macros[$method];
+
+ if ($callable instanceof Closure) {
+ $callable = $callable->bindTo($this, static::class);
}
- return call_user_func_array(static::$macros[$method], $parameters);
+ return $callable(...$parameters);
}
- if (method_exists($this->model, $scope = 'scope'.ucfirst($method))) {
- return $this->callScope([$this->model, $scope], $parameters);
+ if ($this->hasNamedScope($method)) {
+ return $this->callNamedScope($method, $parameters);
}
if (in_array($method, $this->passthru)) {
@@ -1375,15 +1444,43 @@ class Builder
return;
}
- if (! isset(static::$macros[$method])) {
+ if ($method === 'mixin') {
+ return static::registerMixin($parameters[0], $parameters[1] ?? true);
+ }
+
+ if (! static::hasGlobalMacro($method)) {
static::throwBadMethodCallException($method);
}
- if (static::$macros[$method] instanceof Closure) {
- return call_user_func_array(Closure::bind(static::$macros[$method], null, static::class), $parameters);
+ $callable = static::$macros[$method];
+
+ if ($callable instanceof Closure) {
+ $callable = $callable->bindTo(null, static::class);
}
- return call_user_func_array(static::$macros[$method], $parameters);
+ return $callable(...$parameters);
+ }
+
+ /**
+ * Register the given mixin with the builder.
+ *
+ * @param string $mixin
+ * @param bool $replace
+ * @return void
+ */
+ protected static function registerMixin($mixin, $replace)
+ {
+ $methods = (new ReflectionClass($mixin))->getMethods(
+ ReflectionMethod::IS_PUBLIC | ReflectionMethod::IS_PROTECTED
+ );
+
+ foreach ($methods as $method) {
+ if ($replace || ! static::hasGlobalMacro($method->name)) {
+ $method->setAccessible(true);
+
+ static::macro($method->name, $method->invoke($mixin));
+ }
+ }
}
/**
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Collection.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Collection.php
index cbbf3c593..17199e8b3 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Collection.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Collection.php
@@ -2,13 +2,13 @@
namespace Illuminate\Database\Eloquent;
-use LogicException;
-use Illuminate\Support\Arr;
-use Illuminate\Support\Str;
-use Illuminate\Contracts\Support\Arrayable;
-use Illuminate\Contracts\Queue\QueueableEntity;
use Illuminate\Contracts\Queue\QueueableCollection;
+use Illuminate\Contracts\Queue\QueueableEntity;
+use Illuminate\Contracts\Support\Arrayable;
+use Illuminate\Support\Arr;
use Illuminate\Support\Collection as BaseCollection;
+use Illuminate\Support\Str;
+use LogicException;
class Collection extends BaseCollection implements QueueableCollection
{
@@ -79,17 +79,18 @@ class Collection extends BaseCollection implements QueueableCollection
->whereKey($this->modelKeys())
->select($this->first()->getKeyName())
->withCount(...func_get_args())
- ->get();
+ ->get()
+ ->keyBy($this->first()->getKeyName());
$attributes = Arr::except(
array_keys($models->first()->getAttributes()),
$models->first()->getKeyName()
);
- $models->each(function ($model) use ($attributes) {
- $this->find($model->getKey())->forceFill(
- Arr::only($model->getAttributes(), $attributes)
- )->syncOriginalAttributes($attributes);
+ $this->each(function ($model) use ($models, $attributes) {
+ $extraAttributes = Arr::only($models->get($model->getKey())->getAttributes(), $attributes);
+
+ $model->forceFill($extraAttributes)->syncOriginalAttributes($attributes);
});
return $this;
@@ -189,6 +190,27 @@ class Collection extends BaseCollection implements QueueableCollection
return $this;
}
+ /**
+ * Load a set of relationship counts onto the mixed relationship collection.
+ *
+ * @param string $relation
+ * @param array $relations
+ * @return $this
+ */
+ public function loadMorphCount($relation, $relations)
+ {
+ $this->pluck($relation)
+ ->filter()
+ ->groupBy(function ($model) {
+ return get_class($model);
+ })
+ ->each(function ($models, $className) use ($relations) {
+ static::make($models)->loadCount($relations[$className] ?? []);
+ });
+
+ return $this;
+ }
+
/**
* Determine if a key exists in the collection.
*
@@ -258,6 +280,23 @@ class Collection extends BaseCollection implements QueueableCollection
}) ? $result->toBase() : $result;
}
+ /**
+ * Run an associative map over each of the items.
+ *
+ * The callback should return an associative array with a single key / value pair.
+ *
+ * @param callable $callback
+ * @return \Illuminate\Support\Collection|static
+ */
+ public function mapWithKeys(callable $callback)
+ {
+ $result = parent::mapWithKeys($callback);
+
+ return $result->contains(function ($item) {
+ return ! $item instanceof Model;
+ }) ? $result->toBase() : $result;
+ }
+
/**
* Reload a fresh model instance from the database for all the entities.
*
@@ -315,6 +354,10 @@ class Collection extends BaseCollection implements QueueableCollection
{
$intersect = new static;
+ if (empty($items)) {
+ return $intersect;
+ }
+
$dictionary = $this->getDictionary($items);
foreach ($this->items as $item) {
@@ -331,7 +374,7 @@ class Collection extends BaseCollection implements QueueableCollection
*
* @param string|callable|null $key
* @param bool $strict
- * @return static|\Illuminate\Support\Collection
+ * @return static
*/
public function unique($key = null, $strict = false)
{
@@ -380,7 +423,7 @@ class Collection extends BaseCollection implements QueueableCollection
*/
public function makeHidden($attributes)
{
- return $this->each->addHidden($attributes);
+ return $this->each->makeHidden($attributes);
}
/**
@@ -394,6 +437,17 @@ class Collection extends BaseCollection implements QueueableCollection
return $this->each->makeVisible($attributes);
}
+ /**
+ * Append an attribute across the entire collection.
+ *
+ * @param array|string $attributes
+ * @return $this
+ */
+ public function append($attributes)
+ {
+ return $this->each->append($attributes);
+ }
+
/**
* Get a dictionary keyed by primary keys.
*
@@ -420,7 +474,7 @@ class Collection extends BaseCollection implements QueueableCollection
/**
* Get an array with the values of a given key.
*
- * @param string $value
+ * @param string|array $value
* @param string|null $key
* @return \Illuminate\Support\Collection
*/
@@ -442,12 +496,12 @@ class Collection extends BaseCollection implements QueueableCollection
/**
* Zip the collection together with one or more arrays.
*
- * @param mixed ...$items
+ * @param mixed ...$items
* @return \Illuminate\Support\Collection
*/
public function zip($items)
{
- return call_user_func_array([$this->toBase(), 'zip'], func_get_args());
+ return $this->toBase()->zip(...func_get_args());
}
/**
@@ -485,7 +539,7 @@ class Collection extends BaseCollection implements QueueableCollection
* Pad collection to the specified length with a value.
*
* @param int $size
- * @param mixed $value
+ * @param mixed $value
* @return \Illuminate\Support\Collection
*/
public function pad($size, $value)
@@ -553,7 +607,19 @@ class Collection extends BaseCollection implements QueueableCollection
*/
public function getQueueableRelations()
{
- return $this->isNotEmpty() ? $this->first()->getQueueableRelations() : [];
+ if ($this->isEmpty()) {
+ return [];
+ }
+
+ $relations = $this->map->getQueueableRelations()->all();
+
+ if (count($relations) === 0 || $relations === [[]]) {
+ return [];
+ } elseif (count($relations) === 1) {
+ return reset($relations);
+ } else {
+ return array_intersect(...$relations);
+ }
}
/**
@@ -579,4 +645,30 @@ class Collection extends BaseCollection implements QueueableCollection
return $connection;
}
+
+ /**
+ * Get the Eloquent query builder from the collection.
+ *
+ * @return \Illuminate\Database\Eloquent\Builder
+ *
+ * @throws \LogicException
+ */
+ public function toQuery()
+ {
+ $model = $this->first();
+
+ if (! $model) {
+ throw new LogicException('Unable to create query for empty collection.');
+ }
+
+ $class = get_class($model);
+
+ if ($this->filter(function ($model) use ($class) {
+ return ! $model instanceof $class;
+ })->isNotEmpty()) {
+ throw new LogicException('Unable to create query for collection with mixed types.');
+ }
+
+ return $model->newModelQuery()->whereKey($this->modelKeys());
+ }
}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/GuardsAttributes.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/GuardsAttributes.php
index b9095c048..d7e4ac8a4 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/GuardsAttributes.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/GuardsAttributes.php
@@ -27,6 +27,13 @@ trait GuardsAttributes
*/
protected static $unguarded = false;
+ /**
+ * The actual columns that exist on the database and can be guarded.
+ *
+ * @var array
+ */
+ protected static $guardableColumns = [];
+
/**
* Get the fillable attributes for the model.
*
@@ -50,6 +57,19 @@ trait GuardsAttributes
return $this;
}
+ /**
+ * Merge new fillable attributes with existing fillable attributes on the model.
+ *
+ * @param array $fillable
+ * @return $this
+ */
+ public function mergeFillable(array $fillable)
+ {
+ $this->fillable = array_merge($this->fillable, $fillable);
+
+ return $this;
+ }
+
/**
* Get the guarded attributes for the model.
*
@@ -73,6 +93,19 @@ trait GuardsAttributes
return $this;
}
+ /**
+ * Merge new guarded attributes with existing guarded attributes on the model.
+ *
+ * @param array $guarded
+ * @return $this
+ */
+ public function mergeGuarded(array $guarded)
+ {
+ $this->guarded = array_merge($this->guarded, $guarded);
+
+ return $this;
+ }
+
/**
* Disable all mass assignable restrictions.
*
@@ -152,6 +185,7 @@ trait GuardsAttributes
}
return empty($this->getFillable()) &&
+ strpos($key, '.') === false &&
! Str::startsWith($key, '_');
}
@@ -163,7 +197,30 @@ trait GuardsAttributes
*/
public function isGuarded($key)
{
- return in_array($key, $this->getGuarded()) || $this->getGuarded() == ['*'];
+ if (empty($this->getGuarded())) {
+ return false;
+ }
+
+ return $this->getGuarded() == ['*'] ||
+ ! empty(preg_grep('/^'.preg_quote($key).'$/i', $this->getGuarded())) ||
+ ! $this->isGuardableColumn($key);
+ }
+
+ /**
+ * Determine if the given column is a valid, guardable column.
+ *
+ * @param string $key
+ * @return bool
+ */
+ protected function isGuardableColumn($key)
+ {
+ if (! isset(static::$guardableColumns[get_class($this)])) {
+ static::$guardableColumns[get_class($this)] = $this->getConnection()
+ ->getSchemaBuilder()
+ ->getColumnListing($this->getTable());
+ }
+
+ return in_array($key, static::$guardableColumns[get_class($this)]);
}
/**
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php
index f69af6795..498e87195 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php
@@ -2,17 +2,19 @@
namespace Illuminate\Database\Eloquent\Concerns;
-use LogicException;
-use DateTimeInterface;
use Carbon\CarbonInterface;
-use Illuminate\Support\Arr;
-use Illuminate\Support\Str;
-use Illuminate\Support\Carbon;
-use Illuminate\Support\Facades\Date;
+use DateTimeInterface;
+use Illuminate\Contracts\Database\Eloquent\Castable;
+use Illuminate\Contracts\Database\Eloquent\CastsInboundAttributes;
use Illuminate\Contracts\Support\Arrayable;
-use Illuminate\Database\Eloquent\Relations\Relation;
-use Illuminate\Support\Collection as BaseCollection;
use Illuminate\Database\Eloquent\JsonEncodingException;
+use Illuminate\Database\Eloquent\Relations\Relation;
+use Illuminate\Support\Arr;
+use Illuminate\Support\Carbon;
+use Illuminate\Support\Collection as BaseCollection;
+use Illuminate\Support\Facades\Date;
+use Illuminate\Support\Str;
+use LogicException;
trait HasAttributes
{
@@ -38,12 +40,44 @@ trait HasAttributes
protected $changes = [];
/**
- * The attributes that should be cast to native types.
+ * The attributes that should be cast.
*
* @var array
*/
protected $casts = [];
+ /**
+ * The attributes that have been cast using custom classes.
+ *
+ * @var array
+ */
+ protected $classCastCache = [];
+
+ /**
+ * The built-in, primitive cast types supported by Eloquent.
+ *
+ * @var array
+ */
+ protected static $primitiveCastTypes = [
+ 'array',
+ 'bool',
+ 'boolean',
+ 'collection',
+ 'custom_datetime',
+ 'date',
+ 'datetime',
+ 'decimal',
+ 'double',
+ 'float',
+ 'int',
+ 'integer',
+ 'json',
+ 'object',
+ 'real',
+ 'string',
+ 'timestamp',
+ ];
+
/**
* The attributes that should be mutated to dates.
*
@@ -173,7 +207,8 @@ trait HasAttributes
protected function addCastAttributesToArray(array $attributes, array $mutatedAttributes)
{
foreach ($this->getCasts() as $key => $value) {
- if (! array_key_exists($key, $attributes) || in_array($key, $mutatedAttributes)) {
+ if (! array_key_exists($key, $attributes) ||
+ in_array($key, $mutatedAttributes)) {
continue;
}
@@ -195,6 +230,15 @@ trait HasAttributes
if ($attributes[$key] && $this->isCustomDateTimeCast($value)) {
$attributes[$key] = $attributes[$key]->format(explode(':', $value, 2)[1]);
}
+
+ if ($attributes[$key] && $attributes[$key] instanceof DateTimeInterface &&
+ $this->isClassCastable($key)) {
+ $attributes[$key] = $this->serializeDate($attributes[$key]);
+ }
+
+ if ($attributes[$key] instanceof Arrayable) {
+ $attributes[$key] = $attributes[$key]->toArray();
+ }
}
return $attributes;
@@ -207,7 +251,7 @@ trait HasAttributes
*/
protected function getArrayableAttributes()
{
- return $this->getArrayableItems($this->attributes);
+ return $this->getArrayableItems($this->getAttributes());
}
/**
@@ -315,7 +359,9 @@ trait HasAttributes
// get the attribute's value. Otherwise, we will proceed as if the developers
// are asking for a relationship's value. This covers both types of values.
if (array_key_exists($key, $this->attributes) ||
- $this->hasGetMutator($key)) {
+ array_key_exists($key, $this->casts) ||
+ $this->hasGetMutator($key) ||
+ $this->isClassCastable($key)) {
return $this->getAttributeValue($key);
}
@@ -337,31 +383,7 @@ trait HasAttributes
*/
public function getAttributeValue($key)
{
- $value = $this->getAttributeFromArray($key);
-
- // If the attribute has a get mutator, we will call that then return what
- // it returns as the value, which is useful for transforming values on
- // retrieval from the model to a form that is more useful for usage.
- if ($this->hasGetMutator($key)) {
- return $this->mutateAttribute($key, $value);
- }
-
- // If the attribute exists within the cast array, we will convert it to
- // an appropriate native PHP type dependant upon the associated value
- // given with the key in the pair. Dayle made this comment line up.
- if ($this->hasCast($key)) {
- return $this->castAttribute($key, $value);
- }
-
- // If the attribute is listed as a date, we will convert it to a DateTime
- // instance on retrieval, which makes it quite convenient to work with
- // date fields without having to create a mutator for each property.
- if (in_array($key, $this->getDates()) &&
- ! is_null($value)) {
- return $this->asDateTime($value);
- }
-
- return $value;
+ return $this->transformModelValue($key, $this->getAttributeFromArray($key));
}
/**
@@ -372,7 +394,7 @@ trait HasAttributes
*/
protected function getAttributeFromArray($key)
{
- return $this->attributes[$key] ?? null;
+ return $this->getAttributes()[$key] ?? null;
}
/**
@@ -393,7 +415,8 @@ trait HasAttributes
// If the "attribute" exists as a method on the model, we will just assume
// it is a relationship and will load and return results from the query
// and hydrate the relationship's value on the "relationships" array.
- if (method_exists($this, $key)) {
+ if (method_exists($this, $key) ||
+ (static::$relationResolvers[get_class($this)][$key] ?? null)) {
return $this->getRelationshipFromMethod($key);
}
}
@@ -459,11 +482,24 @@ trait HasAttributes
*/
protected function mutateAttributeForArray($key, $value)
{
- $value = $this->mutateAttribute($key, $value);
+ $value = $this->isClassCastable($key)
+ ? $this->getClassCastableAttributeValue($key, $value)
+ : $this->mutateAttribute($key, $value);
return $value instanceof Arrayable ? $value->toArray() : $value;
}
+ /**
+ * Merge new casts with existing casts on the model.
+ *
+ * @param array $casts
+ * @return void
+ */
+ public function mergeCasts($casts)
+ {
+ $this->casts = array_merge($this->casts, $casts);
+ }
+
/**
* Cast an attribute to a native PHP type.
*
@@ -473,11 +509,13 @@ trait HasAttributes
*/
protected function castAttribute($key, $value)
{
- if (is_null($value)) {
+ $castType = $this->getCastType($key);
+
+ if (is_null($value) && in_array($castType, static::$primitiveCastTypes)) {
return $value;
}
- switch ($this->getCastType($key)) {
+ switch ($castType) {
case 'int':
case 'integer':
return (int) $value;
@@ -506,8 +544,40 @@ trait HasAttributes
return $this->asDateTime($value);
case 'timestamp':
return $this->asTimestamp($value);
- default:
- return $value;
+ }
+
+ if ($this->isClassCastable($key)) {
+ return $this->getClassCastableAttributeValue($key, $value);
+ }
+
+ return $value;
+ }
+
+ /**
+ * Cast the given attribute using a custom cast class.
+ *
+ * @param string $key
+ * @param mixed $value
+ * @return mixed
+ */
+ protected function getClassCastableAttributeValue($key, $value)
+ {
+ if (isset($this->classCastCache[$key])) {
+ return $this->classCastCache[$key];
+ } else {
+ $caster = $this->resolveCasterClass($key);
+
+ $value = $caster instanceof CastsInboundAttributes
+ ? $value
+ : $caster->get($this, $key, $value, $this->attributes);
+
+ if ($caster instanceof CastsInboundAttributes || ! is_object($value)) {
+ unset($this->classCastCache[$key]);
+ } else {
+ $this->classCastCache[$key] = $value;
+ }
+
+ return $value;
}
}
@@ -576,6 +646,12 @@ trait HasAttributes
$value = $this->fromDateTime($value);
}
+ if ($this->isClassCastable($key)) {
+ $this->setClassCastableAttribute($key, $value);
+
+ return $this;
+ }
+
if ($this->isJsonCastable($key) && ! is_null($value)) {
$value = $this->castAttributeAsJson($key, $value);
}
@@ -645,6 +721,41 @@ trait HasAttributes
return $this;
}
+ /**
+ * Set the value of a class castable attribute.
+ *
+ * @param string $key
+ * @param mixed $value
+ * @return void
+ */
+ protected function setClassCastableAttribute($key, $value)
+ {
+ $caster = $this->resolveCasterClass($key);
+
+ if (is_null($value)) {
+ $this->attributes = array_merge($this->attributes, array_map(
+ function () {
+ },
+ $this->normalizeCastClassResponse($key, $caster->set(
+ $this, $key, $this->{$key}, $this->attributes
+ ))
+ ));
+ } else {
+ $this->attributes = array_merge(
+ $this->attributes,
+ $this->normalizeCastClassResponse($key, $caster->set(
+ $this, $key, $value, $this->attributes
+ ))
+ );
+ }
+
+ if ($caster instanceof CastsInboundAttributes || ! is_object($value)) {
+ unset($this->classCastCache[$key]);
+ } else {
+ $this->classCastCache[$key] = $value;
+ }
+ }
+
/**
* Get an array attribute with the given key and value set.
*
@@ -769,7 +880,7 @@ trait HasAttributes
// If this value is already a Carbon instance, we shall just return it as is.
// This prevents us having to re-instantiate a Carbon instance when we know
// it already is one, which wouldn't be fulfilled by the DateTime check.
- if ($value instanceof Carbon || $value instanceof CarbonInterface) {
+ if ($value instanceof CarbonInterface) {
return Date::instance($value);
}
@@ -798,15 +909,14 @@ trait HasAttributes
$format = $this->getDateFormat();
- // https://bugs.php.net/bug.php?id=75577
- if (version_compare(PHP_VERSION, '7.3.0-dev', '<')) {
- $format = str_replace('.v', '.u', $format);
- }
-
// Finally, we will just assume this date is in the format used by default on
// the database connection and use that format to create the Carbon object
// that is returned back out to the developers after we convert it here.
- return Date::createFromFormat($format, $value);
+ if (Date::hasFormat($value, $format)) {
+ return Date::createFromFormat($format, $value);
+ }
+
+ return Date::parse($value);
}
/**
@@ -852,7 +962,7 @@ trait HasAttributes
*/
protected function serializeDate(DateTimeInterface $date)
{
- return $date->format($this->getDateFormat());
+ return Carbon::instance($date)->toJSON();
}
/**
@@ -862,11 +972,16 @@ trait HasAttributes
*/
public function getDates()
{
- $defaults = [static::CREATED_AT, static::UPDATED_AT];
+ if (! $this->usesTimestamps()) {
+ return $this->dates;
+ }
- return $this->usesTimestamps()
- ? array_unique(array_merge($this->dates, $defaults))
- : $this->dates;
+ $defaults = [
+ $this->getCreatedAtColumn(),
+ $this->getUpdatedAtColumn(),
+ ];
+
+ return array_unique(array_merge($this->dates, $defaults));
}
/**
@@ -944,6 +1059,93 @@ trait HasAttributes
return $this->hasCast($key, ['array', 'json', 'object', 'collection']);
}
+ /**
+ * Determine if the given key is cast using a custom class.
+ *
+ * @param string $key
+ * @return bool
+ */
+ protected function isClassCastable($key)
+ {
+ return array_key_exists($key, $this->getCasts()) &&
+ class_exists($class = $this->parseCasterClass($this->getCasts()[$key])) &&
+ ! in_array($class, static::$primitiveCastTypes);
+ }
+
+ /**
+ * Resolve the custom caster class for a given key.
+ *
+ * @param string $key
+ * @return mixed
+ */
+ protected function resolveCasterClass($key)
+ {
+ $castType = $this->getCasts()[$key];
+
+ $arguments = [];
+
+ if (is_string($castType) && strpos($castType, ':') !== false) {
+ $segments = explode(':', $castType, 2);
+
+ $castType = $segments[0];
+ $arguments = explode(',', $segments[1]);
+ }
+
+ if (is_subclass_of($castType, Castable::class)) {
+ $castType = $castType::castUsing();
+ }
+
+ if (is_object($castType)) {
+ return $castType;
+ }
+
+ return new $castType(...$arguments);
+ }
+
+ /**
+ * Parse the given caster class, removing any arguments.
+ *
+ * @param string $class
+ * @return string
+ */
+ protected function parseCasterClass($class)
+ {
+ return strpos($class, ':') === false
+ ? $class
+ : explode(':', $class, 2)[0];
+ }
+
+ /**
+ * Merge the cast class attributes back into the model.
+ *
+ * @return void
+ */
+ protected function mergeAttributesFromClassCasts()
+ {
+ foreach ($this->classCastCache as $key => $value) {
+ $caster = $this->resolveCasterClass($key);
+
+ $this->attributes = array_merge(
+ $this->attributes,
+ $caster instanceof CastsInboundAttributes
+ ? [$key => $value]
+ : $this->normalizeCastClassResponse($key, $caster->set($this, $key, $value, $this->attributes))
+ );
+ }
+ }
+
+ /**
+ * Normalize the response from a custom class caster.
+ *
+ * @param string $key
+ * @param mixed $value
+ * @return array
+ */
+ protected function normalizeCastClassResponse($key, $value)
+ {
+ return is_array($value) ? $value : [$key => $value];
+ }
+
/**
* Get all of the current attributes on the model.
*
@@ -951,6 +1153,8 @@ trait HasAttributes
*/
public function getAttributes()
{
+ $this->mergeAttributesFromClassCasts();
+
return $this->attributes;
}
@@ -969,6 +1173,8 @@ trait HasAttributes
$this->syncOriginal();
}
+ $this->classCastCache = [];
+
return $this;
}
@@ -980,6 +1186,40 @@ trait HasAttributes
* @return mixed|array
*/
public function getOriginal($key = null, $default = null)
+ {
+ return (new static)->setRawAttributes(
+ $this->original, $sync = true
+ )->getOriginalWithoutRewindingModel($key, $default);
+ }
+
+ /**
+ * Get the model's original attribute values.
+ *
+ * @param string|null $key
+ * @param mixed $default
+ * @return mixed|array
+ */
+ protected function getOriginalWithoutRewindingModel($key = null, $default = null)
+ {
+ if ($key) {
+ return $this->transformModelValue(
+ $key, Arr::get($this->original, $key, $default)
+ );
+ }
+
+ return collect($this->original)->mapWithKeys(function ($value, $key) {
+ return [$key => $this->transformModelValue($key, $value)];
+ })->all();
+ }
+
+ /**
+ * Get the model's raw original attribute values.
+ *
+ * @param string|null $key
+ * @param mixed $default
+ * @return mixed|array
+ */
+ public function getRawOriginal($key = null, $default = null)
{
return Arr::get($this->original, $key, $default);
}
@@ -1008,7 +1248,7 @@ trait HasAttributes
*/
public function syncOriginal()
{
- $this->original = $this->attributes;
+ $this->original = $this->getAttributes();
return $this;
}
@@ -1034,8 +1274,10 @@ trait HasAttributes
{
$attributes = is_array($attributes) ? $attributes : func_get_args();
+ $modelAttributes = $this->getAttributes();
+
foreach ($attributes as $attribute) {
- $this->original[$attribute] = $this->attributes[$attribute];
+ $this->original[$attribute] = $modelAttributes[$attribute];
}
return $this;
@@ -1128,7 +1370,7 @@ trait HasAttributes
$dirty = [];
foreach ($this->getAttributes() as $key => $value) {
- if (! $this->originalIsEquivalent($key, $value)) {
+ if (! $this->originalIsEquivalent($key)) {
$dirty[$key] = $value;
}
}
@@ -1149,32 +1391,75 @@ trait HasAttributes
/**
* Determine if the new and old values for a given key are equivalent.
*
- * @param string $key
- * @param mixed $current
+ * @param string $key
* @return bool
*/
- public function originalIsEquivalent($key, $current)
+ public function originalIsEquivalent($key)
{
if (! array_key_exists($key, $this->original)) {
return false;
}
- $original = $this->getOriginal($key);
+ $attribute = Arr::get($this->attributes, $key);
+ $original = Arr::get($this->original, $key);
- if ($current === $original) {
+ if ($attribute === $original) {
return true;
- } elseif (is_null($current)) {
+ } elseif (is_null($attribute)) {
return false;
} elseif ($this->isDateAttribute($key)) {
- return $this->fromDateTime($current) ===
+ return $this->fromDateTime($attribute) ===
$this->fromDateTime($original);
- } elseif ($this->hasCast($key)) {
- return $this->castAttribute($key, $current) ===
+ } elseif ($this->hasCast($key, ['object', 'collection'])) {
+ return $this->castAttribute($key, $attribute) ==
+ $this->castAttribute($key, $original);
+ } elseif ($this->hasCast($key, ['real', 'float', 'double'])) {
+ if (($attribute === null && $original !== null) || ($attribute !== null && $original === null)) {
+ return false;
+ }
+
+ return abs($this->castAttribute($key, $attribute) - $this->castAttribute($key, $original)) < PHP_FLOAT_EPSILON * 4;
+ } elseif ($this->hasCast($key, static::$primitiveCastTypes)) {
+ return $this->castAttribute($key, $attribute) ===
$this->castAttribute($key, $original);
}
- return is_numeric($current) && is_numeric($original)
- && strcmp((string) $current, (string) $original) === 0;
+ return is_numeric($attribute) && is_numeric($original)
+ && strcmp((string) $attribute, (string) $original) === 0;
+ }
+
+ /**
+ * Transform a raw model value using mutators, casts, etc.
+ *
+ * @param string $key
+ * @param mixed $value
+ * @return mixed
+ */
+ protected function transformModelValue($key, $value)
+ {
+ // If the attribute has a get mutator, we will call that then return what
+ // it returns as the value, which is useful for transforming values on
+ // retrieval from the model to a form that is more useful for usage.
+ if ($this->hasGetMutator($key)) {
+ return $this->mutateAttribute($key, $value);
+ }
+
+ // If the attribute exists within the cast array, we will convert it to
+ // an appropriate native PHP type dependent upon the associated value
+ // given with the key in the pair. Dayle made this comment line up.
+ if ($this->hasCast($key)) {
+ return $this->castAttribute($key, $value);
+ }
+
+ // If the attribute is listed as a date, we will convert it to a DateTime
+ // instance on retrieval, which makes it quite convenient to work with
+ // date fields without having to create a mutator for each property.
+ if ($value !== null
+ && \in_array($key, $this->getDates(), false)) {
+ return $this->asDateTime($value);
+ }
+
+ return $value;
}
/**
@@ -1205,6 +1490,17 @@ trait HasAttributes
return $this;
}
+ /**
+ * Return whether the accessor attribute has been appended.
+ *
+ * @param string $attribute
+ * @return bool
+ */
+ public function hasAppended($attribute)
+ {
+ return in_array($attribute, $this->appends);
+ }
+
/**
* Get the mutated attributes for a given instance.
*
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php
index 3c9d2a1d5..0dc54308f 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php
@@ -2,9 +2,10 @@
namespace Illuminate\Database\Eloquent\Concerns;
+use Illuminate\Contracts\Events\Dispatcher;
+use Illuminate\Events\NullDispatcher;
use Illuminate\Support\Arr;
use InvalidArgumentException;
-use Illuminate\Contracts\Events\Dispatcher;
trait HasEvents
{
@@ -46,7 +47,7 @@ trait HasEvents
/**
* Register a single observer with the model.
*
- * @param object|string $class
+ * @param object|string $class
* @return void
*
* @throws \RuntimeException
@@ -68,7 +69,7 @@ trait HasEvents
/**
* Resolve the observer's class name from an object or string.
*
- * @param object|string $class
+ * @param object|string $class
* @return string
*
* @throws \InvalidArgumentException
@@ -399,7 +400,9 @@ trait HasEvents
{
$dispatcher = static::getEventDispatcher();
- static::unsetEventDispatcher();
+ if ($dispatcher) {
+ static::setEventDispatcher(new NullDispatcher($dispatcher));
+ }
try {
return $callback();
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasGlobalScopes.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasGlobalScopes.php
index 97a549f6c..1742679c5 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasGlobalScopes.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasGlobalScopes.php
@@ -3,9 +3,9 @@
namespace Illuminate\Database\Eloquent\Concerns;
use Closure;
+use Illuminate\Database\Eloquent\Scope;
use Illuminate\Support\Arr;
use InvalidArgumentException;
-use Illuminate\Database\Eloquent\Scope;
trait HasGlobalScopes
{
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php
index cb202f999..3406fe51e 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php
@@ -2,22 +2,23 @@
namespace Illuminate\Database\Eloquent\Concerns;
-use Illuminate\Support\Arr;
-use Illuminate\Support\Str;
-use Illuminate\Database\Eloquent\Model;
+use Closure;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Collection;
-use Illuminate\Database\Eloquent\Relations\HasOne;
-use Illuminate\Database\Eloquent\Relations\HasMany;
-use Illuminate\Database\Eloquent\Relations\MorphTo;
-use Illuminate\Database\Eloquent\Relations\MorphOne;
-use Illuminate\Database\Eloquent\Relations\Relation;
+use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
-use Illuminate\Database\Eloquent\Relations\MorphMany;
-use Illuminate\Database\Eloquent\Relations\MorphToMany;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
-use Illuminate\Database\Eloquent\Relations\HasOneThrough;
+use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\HasManyThrough;
+use Illuminate\Database\Eloquent\Relations\HasOne;
+use Illuminate\Database\Eloquent\Relations\HasOneThrough;
+use Illuminate\Database\Eloquent\Relations\MorphMany;
+use Illuminate\Database\Eloquent\Relations\MorphOne;
+use Illuminate\Database\Eloquent\Relations\MorphTo;
+use Illuminate\Database\Eloquent\Relations\MorphToMany;
+use Illuminate\Database\Eloquent\Relations\Relation;
+use Illuminate\Support\Arr;
+use Illuminate\Support\Str;
trait HasRelationships
{
@@ -44,12 +45,34 @@ trait HasRelationships
'belongsToMany', 'morphToMany', 'morphedByMany',
];
+ /**
+ * The relation resolver callbacks.
+ *
+ * @var array
+ */
+ protected static $relationResolvers = [];
+
+ /**
+ * Define a dynamic relation resolver.
+ *
+ * @param string $name
+ * @param \Closure $callback
+ * @return void
+ */
+ public static function resolveRelationUsing($name, Closure $callback)
+ {
+ static::$relationResolvers = array_replace_recursive(
+ static::$relationResolvers,
+ [static::class => [$name => $callback]]
+ );
+ }
+
/**
* Define a one-to-one relationship.
*
* @param string $related
- * @param string $foreignKey
- * @param string $localKey
+ * @param string|null $foreignKey
+ * @param string|null $localKey
* @return \Illuminate\Database\Eloquent\Relations\HasOne
*/
public function hasOne($related, $foreignKey = null, $localKey = null)
@@ -125,9 +148,9 @@ trait HasRelationships
*
* @param string $related
* @param string $name
- * @param string $type
- * @param string $id
- * @param string $localKey
+ * @param string|null $type
+ * @param string|null $id
+ * @param string|null $localKey
* @return \Illuminate\Database\Eloquent\Relations\MorphOne
*/
public function morphOne($related, $name, $type = null, $id = null, $localKey = null)
@@ -162,9 +185,9 @@ trait HasRelationships
* Define an inverse one-to-one or many relationship.
*
* @param string $related
- * @param string $foreignKey
- * @param string $ownerKey
- * @param string $relation
+ * @param string|null $foreignKey
+ * @param string|null $ownerKey
+ * @param string|null $relation
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function belongsTo($related, $foreignKey = null, $ownerKey = null, $relation = null)
@@ -213,10 +236,10 @@ trait HasRelationships
/**
* Define a polymorphic, inverse one-to-one or many relationship.
*
- * @param string $name
- * @param string $type
- * @param string $id
- * @param string $ownerKey
+ * @param string|null $name
+ * @param string|null $type
+ * @param string|null $id
+ * @param string|null $ownerKey
* @return \Illuminate\Database\Eloquent\Relations\MorphTo
*/
public function morphTo($name = null, $type = null, $id = null, $ownerKey = null)
@@ -233,7 +256,7 @@ trait HasRelationships
// If the type value is null it is probably safe to assume we're eager loading
// the relationship. In this case we'll just pass in a dummy query where we
// need to remove any eager loads that may already be defined on a model.
- return empty($class = $this->{$type})
+ return is_null($class = $this->{$type}) || $class === ''
? $this->morphEagerTo($name, $type, $id, $ownerKey)
: $this->morphInstanceTo($class, $name, $type, $id, $ownerKey);
}
@@ -318,8 +341,8 @@ trait HasRelationships
* Define a one-to-many relationship.
*
* @param string $related
- * @param string $foreignKey
- * @param string $localKey
+ * @param string|null $foreignKey
+ * @param string|null $localKey
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function hasMany($related, $foreignKey = null, $localKey = null)
@@ -369,8 +392,12 @@ trait HasRelationships
$secondKey = $secondKey ?: $through->getForeignKey();
return $this->newHasManyThrough(
- $this->newRelatedInstance($related)->newQuery(), $this, $through,
- $firstKey, $secondKey, $localKey ?: $this->getKeyName(),
+ $this->newRelatedInstance($related)->newQuery(),
+ $this,
+ $through,
+ $firstKey,
+ $secondKey,
+ $localKey ?: $this->getKeyName(),
$secondLocalKey ?: $through->getKeyName()
);
}
@@ -397,9 +424,9 @@ trait HasRelationships
*
* @param string $related
* @param string $name
- * @param string $type
- * @param string $id
- * @param string $localKey
+ * @param string|null $type
+ * @param string|null $id
+ * @param string|null $localKey
* @return \Illuminate\Database\Eloquent\Relations\MorphMany
*/
public function morphMany($related, $name, $type = null, $id = null, $localKey = null)
@@ -437,12 +464,12 @@ trait HasRelationships
* Define a many-to-many relationship.
*
* @param string $related
- * @param string $table
- * @param string $foreignPivotKey
- * @param string $relatedPivotKey
- * @param string $parentKey
- * @param string $relatedKey
- * @param string $relation
+ * @param string|null $table
+ * @param string|null $foreignPivotKey
+ * @param string|null $relatedPivotKey
+ * @param string|null $parentKey
+ * @param string|null $relatedKey
+ * @param string|null $relation
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
*/
public function belongsToMany($related, $table = null, $foreignPivotKey = null, $relatedPivotKey = null,
@@ -488,7 +515,7 @@ trait HasRelationships
* @param string $relatedPivotKey
* @param string $parentKey
* @param string $relatedKey
- * @param string $relationName
+ * @param string|null $relationName
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
*/
protected function newBelongsToMany(Builder $query, Model $parent, $table, $foreignPivotKey, $relatedPivotKey,
@@ -502,11 +529,11 @@ trait HasRelationships
*
* @param string $related
* @param string $name
- * @param string $table
- * @param string $foreignPivotKey
- * @param string $relatedPivotKey
- * @param string $parentKey
- * @param string $relatedKey
+ * @param string|null $table
+ * @param string|null $foreignPivotKey
+ * @param string|null $relatedPivotKey
+ * @param string|null $parentKey
+ * @param string|null $relatedKey
* @param bool $inverse
* @return \Illuminate\Database\Eloquent\Relations\MorphToMany
*/
@@ -554,7 +581,7 @@ trait HasRelationships
* @param string $relatedPivotKey
* @param string $parentKey
* @param string $relatedKey
- * @param string $relationName
+ * @param string|null $relationName
* @param bool $inverse
* @return \Illuminate\Database\Eloquent\Relations\MorphToMany
*/
@@ -571,11 +598,11 @@ trait HasRelationships
*
* @param string $related
* @param string $name
- * @param string $table
- * @param string $foreignPivotKey
- * @param string $relatedPivotKey
- * @param string $parentKey
- * @param string $relatedKey
+ * @param string|null $table
+ * @param string|null $foreignPivotKey
+ * @param string|null $relatedPivotKey
+ * @param string|null $parentKey
+ * @param string|null $relatedKey
* @return \Illuminate\Database\Eloquent\Relations\MorphToMany
*/
public function morphedByMany($related, $name, $table = null, $foreignPivotKey = null,
@@ -655,7 +682,7 @@ trait HasRelationships
*/
public function touches($relation)
{
- return in_array($relation, $this->touches);
+ return in_array($relation, $this->getTouchedRelations());
}
/**
@@ -665,7 +692,7 @@ trait HasRelationships
*/
public function touchOwners()
{
- foreach ($this->touches as $relation) {
+ foreach ($this->getTouchedRelations() as $relation) {
$this->$relation()->touch();
if ($this->$relation instanceof self) {
@@ -673,9 +700,7 @@ trait HasRelationships
$this->$relation->touchOwners();
} elseif ($this->$relation instanceof Collection) {
- $this->$relation->each(function (Model $relation) {
- $relation->touchOwners();
- });
+ $this->$relation->each->touchOwners();
}
}
}
@@ -796,6 +821,30 @@ trait HasRelationships
return $this;
}
+ /**
+ * Duplicate the instance and unset all the loaded relations.
+ *
+ * @return $this
+ */
+ public function withoutRelations()
+ {
+ $model = clone $this;
+
+ return $model->unsetRelations();
+ }
+
+ /**
+ * Unset all the loaded relations for the instance.
+ *
+ * @return $this
+ */
+ public function unsetRelations()
+ {
+ $this->relations = [];
+
+ return $this;
+ }
+
/**
* Get the relationships that are touched on save.
*
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasTimestamps.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasTimestamps.php
index 6c44a73d6..b9c049b36 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasTimestamps.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasTimestamps.php
@@ -38,12 +38,15 @@ trait HasTimestamps
{
$time = $this->freshTimestamp();
- if (! is_null(static::UPDATED_AT) && ! $this->isDirty(static::UPDATED_AT)) {
+ $updatedAtColumn = $this->getUpdatedAtColumn();
+
+ if (! is_null($updatedAtColumn) && ! $this->isDirty($updatedAtColumn)) {
$this->setUpdatedAt($time);
}
- if (! $this->exists && ! is_null(static::CREATED_AT) &&
- ! $this->isDirty(static::CREATED_AT)) {
+ $createdAtColumn = $this->getCreatedAtColumn();
+
+ if (! $this->exists && ! is_null($createdAtColumn) && ! $this->isDirty($createdAtColumn)) {
$this->setCreatedAt($time);
}
}
@@ -56,7 +59,7 @@ trait HasTimestamps
*/
public function setCreatedAt($value)
{
- $this->{static::CREATED_AT} = $value;
+ $this->{$this->getCreatedAtColumn()} = $value;
return $this;
}
@@ -69,7 +72,7 @@ trait HasTimestamps
*/
public function setUpdatedAt($value)
{
- $this->{static::UPDATED_AT} = $value;
+ $this->{$this->getUpdatedAtColumn()} = $value;
return $this;
}
@@ -107,7 +110,7 @@ trait HasTimestamps
/**
* Get the name of the "created at" column.
*
- * @return string
+ * @return string|null
*/
public function getCreatedAtColumn()
{
@@ -117,10 +120,30 @@ trait HasTimestamps
/**
* Get the name of the "updated at" column.
*
- * @return string
+ * @return string|null
*/
public function getUpdatedAtColumn()
{
return static::UPDATED_AT;
}
+
+ /**
+ * Get the fully qualified "created at" column.
+ *
+ * @return string
+ */
+ public function getQualifiedCreatedAtColumn()
+ {
+ return $this->qualifyColumn($this->getCreatedAtColumn());
+ }
+
+ /**
+ * Get the fully qualified "updated at" column.
+ *
+ * @return string
+ */
+ public function getQualifiedUpdatedAtColumn()
+ {
+ return $this->qualifyColumn($this->getUpdatedAtColumn());
+ }
}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HidesAttributes.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HidesAttributes.php
index 7bd9ef934..7f6ebfdbc 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HidesAttributes.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HidesAttributes.php
@@ -2,6 +2,8 @@
namespace Illuminate\Database\Eloquent\Concerns;
+use Closure;
+
trait HidesAttributes
{
/**
@@ -41,19 +43,6 @@ trait HidesAttributes
return $this;
}
- /**
- * Add hidden attributes for the model.
- *
- * @param array|string|null $attributes
- * @return void
- */
- public function addHidden($attributes = null)
- {
- $this->hidden = array_merge(
- $this->hidden, is_array($attributes) ? $attributes : func_get_args()
- );
- }
-
/**
* Get the visible attributes for the model.
*
@@ -77,50 +66,65 @@ trait HidesAttributes
return $this;
}
- /**
- * Add visible attributes for the model.
- *
- * @param array|string|null $attributes
- * @return void
- */
- public function addVisible($attributes = null)
- {
- $this->visible = array_merge(
- $this->visible, is_array($attributes) ? $attributes : func_get_args()
- );
- }
-
/**
* Make the given, typically hidden, attributes visible.
*
- * @param array|string $attributes
+ * @param array|string|null $attributes
* @return $this
*/
public function makeVisible($attributes)
{
- $this->hidden = array_diff($this->hidden, (array) $attributes);
+ $attributes = is_array($attributes) ? $attributes : func_get_args();
+
+ $this->hidden = array_diff($this->hidden, $attributes);
if (! empty($this->visible)) {
- $this->addVisible($attributes);
+ $this->visible = array_merge($this->visible, $attributes);
}
return $this;
}
+ /**
+ * Make the given, typically hidden, attributes visible if the given truth test passes.
+ *
+ * @param bool|Closure $condition
+ * @param array|string|null $attributes
+ * @return $this
+ */
+ public function makeVisibleIf($condition, $attributes)
+ {
+ $condition = $condition instanceof Closure ? $condition($this) : $condition;
+
+ return $condition ? $this->makeVisible($attributes) : $this;
+ }
+
/**
* Make the given, typically visible, attributes hidden.
*
- * @param array|string $attributes
+ * @param array|string|null $attributes
* @return $this
*/
public function makeHidden($attributes)
{
- $attributes = (array) $attributes;
-
- $this->visible = array_diff($this->visible, $attributes);
-
- $this->hidden = array_unique(array_merge($this->hidden, $attributes));
+ $this->hidden = array_merge(
+ $this->hidden, is_array($attributes) ? $attributes : func_get_args()
+ );
return $this;
}
+
+ /**
+ * Make the given, typically visible, attributes hidden if the given truth test passes.
+ *
+ * @param bool|Closure $condition
+ * @param array|string|null $attributes
+ * @return $this
+ */
+ public function makeHiddenIf($condition, $attributes)
+ {
+ $condition = $condition instanceof Closure ? $condition($this) : $condition;
+
+ return value($condition) ? $this->makeHidden($attributes) : $this;
+ }
}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php
index c7173a858..c97c40330 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php
@@ -3,25 +3,27 @@
namespace Illuminate\Database\Eloquent\Concerns;
use Closure;
-use RuntimeException;
-use Illuminate\Support\Str;
use Illuminate\Database\Eloquent\Builder;
-use Illuminate\Database\Query\Expression;
use Illuminate\Database\Eloquent\Relations\MorphTo;
use Illuminate\Database\Eloquent\Relations\Relation;
use Illuminate\Database\Query\Builder as QueryBuilder;
+use Illuminate\Database\Query\Expression;
+use Illuminate\Support\Str;
+use RuntimeException;
trait QueriesRelationships
{
/**
* Add a relationship count / exists condition to the query.
*
- * @param string|\Illuminate\Database\Eloquent\Relations\Relation $relation
+ * @param \Illuminate\Database\Eloquent\Relations\Relation|string $relation
* @param string $operator
- * @param int $count
+ * @param int $count
* @param string $boolean
* @param \Closure|null $callback
* @return \Illuminate\Database\Eloquent\Builder|static
+ *
+ * @throws \RuntimeException
*/
public function has($relation, $operator = '>=', $count = 1, $boolean = 'and', Closure $callback = null)
{
@@ -67,7 +69,7 @@ trait QueriesRelationships
*
* @param string $relations
* @param string $operator
- * @param int $count
+ * @param int $count
* @param string $boolean
* @param \Closure|null $callback
* @return \Illuminate\Database\Eloquent\Builder|static
@@ -100,7 +102,7 @@ trait QueriesRelationships
*
* @param string $relation
* @param string $operator
- * @param int $count
+ * @param int $count
* @return \Illuminate\Database\Eloquent\Builder|static
*/
public function orHas($relation, $operator = '>=', $count = 1)
@@ -138,7 +140,7 @@ trait QueriesRelationships
* @param string $relation
* @param \Closure|null $callback
* @param string $operator
- * @param int $count
+ * @param int $count
* @return \Illuminate\Database\Eloquent\Builder|static
*/
public function whereHas($relation, Closure $callback = null, $operator = '>=', $count = 1)
@@ -149,10 +151,10 @@ trait QueriesRelationships
/**
* Add a relationship count / exists condition to the query with where clauses and an "or".
*
- * @param string $relation
- * @param \Closure $callback
- * @param string $operator
- * @param int $count
+ * @param string $relation
+ * @param \Closure|null $callback
+ * @param string $operator
+ * @param int $count
* @return \Illuminate\Database\Eloquent\Builder|static
*/
public function orWhereHas($relation, Closure $callback = null, $operator = '>=', $count = 1)
@@ -175,8 +177,8 @@ trait QueriesRelationships
/**
* Add a relationship count / exists condition to the query with where clauses and an "or".
*
- * @param string $relation
- * @param \Closure $callback
+ * @param string $relation
+ * @param \Closure|null $callback
* @return \Illuminate\Database\Eloquent\Builder|static
*/
public function orWhereDoesntHave($relation, Closure $callback = null)
@@ -202,11 +204,11 @@ trait QueriesRelationships
$types = (array) $types;
if ($types === ['*']) {
- $types = $this->model->newModelQuery()->distinct()->pluck($relation->getMorphType())->all();
+ $types = $this->model->newModelQuery()->distinct()->pluck($relation->getMorphType())->filter()->all();
+ }
- foreach ($types as &$type) {
- $type = Relation::getMorphedModel($type) ?? $type;
- }
+ foreach ($types as &$type) {
+ $type = Relation::getMorphedModel($type) ?? $type;
}
return $this->where(function ($query) use ($relation, $callback, $operator, $count, $types) {
@@ -220,8 +222,8 @@ trait QueriesRelationships
};
}
- $query->where($relation->getMorphType(), '=', (new $type)->getMorphClass())
- ->whereHas($belongsTo, $callback, $operator, $count);
+ $query->where($this->query->from.'.'.$relation->getMorphType(), '=', (new $type)->getMorphClass())
+ ->whereHas($belongsTo, $callback, $operator, $count);
});
}
}, null, null, $boolean);
@@ -309,7 +311,7 @@ trait QueriesRelationships
*
* @param string $relation
* @param string|array $types
- * @param \Closure $callback
+ * @param \Closure|null $callback
* @param string $operator
* @param int $count
* @return \Illuminate\Database\Eloquent\Builder|static
@@ -337,7 +339,7 @@ trait QueriesRelationships
*
* @param string $relation
* @param string|array $types
- * @param \Closure $callback
+ * @param \Closure|null $callback
* @return \Illuminate\Database\Eloquent\Builder|static
*/
public function orWhereDoesntHaveMorph($relation, $types, Closure $callback = null)
@@ -388,8 +390,14 @@ trait QueriesRelationships
$query = $query->mergeConstraintsFrom($relation->getQuery())->toBase();
+ $query->orders = null;
+
+ $query->setBindings([], 'order');
+
if (count($query->columns) > 1) {
$query->columns = [$query->columns[0]];
+
+ $query->bindings['select'] = [];
}
// Finally we will add the proper result column alias to the query and run the subselect
@@ -445,7 +453,7 @@ trait QueriesRelationships
/**
* Add a sub-query count clause to this query.
*
- * @param \Illuminate\Database\Query\Builder $query
+ * @param \Illuminate\Database\Query\Builder $query
* @param string $operator
* @param int $count
* @param string $boolean
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factory.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factory.php
index 4ca3d62fe..6c41bac58 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factory.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factory.php
@@ -68,30 +68,16 @@ class Factory implements ArrayAccess
return (new static($faker))->load($pathToFactories);
}
- /**
- * Define a class with a given short-name.
- *
- * @param string $class
- * @param string $name
- * @param callable $attributes
- * @return $this
- */
- public function defineAs($class, $name, callable $attributes)
- {
- return $this->define($class, $attributes, $name);
- }
-
/**
* Define a class with a given set of attributes.
*
* @param string $class
* @param callable $attributes
- * @param string $name
* @return $this
*/
- public function define($class, callable $attributes, $name = 'default')
+ public function define($class, callable $attributes)
{
- $this->definitions[$class][$name] = $attributes;
+ $this->definitions[$class] = $attributes;
return $this;
}
@@ -144,7 +130,7 @@ class Factory implements ArrayAccess
*
* @param string $class
* @param callable $callback
- * @param string $name
+ * @param string $name
* @return $this
*/
public function afterCreating($class, callable $callback, $name = 'default')
@@ -179,19 +165,6 @@ class Factory implements ArrayAccess
return $this->of($class)->create($attributes);
}
- /**
- * Create an instance of the given model and type and persist it to the database.
- *
- * @param string $class
- * @param string $name
- * @param array $attributes
- * @return mixed
- */
- public function createAs($class, $name, array $attributes = [])
- {
- return $this->of($class, $name)->create($attributes);
- }
-
/**
* Create an instance of the given model.
*
@@ -204,44 +177,17 @@ class Factory implements ArrayAccess
return $this->of($class)->make($attributes);
}
- /**
- * Create an instance of the given model and type.
- *
- * @param string $class
- * @param string $name
- * @param array $attributes
- * @return mixed
- */
- public function makeAs($class, $name, array $attributes = [])
- {
- return $this->of($class, $name)->make($attributes);
- }
-
- /**
- * Get the raw attribute array for a given named model.
- *
- * @param string $class
- * @param string $name
- * @param array $attributes
- * @return array
- */
- public function rawOf($class, $name, array $attributes = [])
- {
- return $this->raw($class, $attributes, $name);
- }
-
/**
* Get the raw attribute array for a given model.
*
* @param string $class
* @param array $attributes
- * @param string $name
* @return array
*/
- public function raw($class, array $attributes = [], $name = 'default')
+ public function raw($class, array $attributes = [])
{
return array_merge(
- call_user_func($this->definitions[$class][$name], $this->faker), $attributes
+ call_user_func($this->definitions[$class], $this->faker), $attributes
);
}
@@ -249,13 +195,12 @@ class Factory implements ArrayAccess
* Create a builder for the given model.
*
* @param string $class
- * @param string $name
* @return \Illuminate\Database\Eloquent\FactoryBuilder
*/
- public function of($class, $name = 'default')
+ public function of($class)
{
return new FactoryBuilder(
- $class, $name, $this->definitions, $this->states,
+ $class, $this->definitions, $this->states,
$this->afterMaking, $this->afterCreating, $this->faker
);
}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/FactoryBuilder.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/FactoryBuilder.php
index 87bb0d878..ccd82bf15 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/FactoryBuilder.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/FactoryBuilder.php
@@ -3,8 +3,8 @@
namespace Illuminate\Database\Eloquent;
use Faker\Generator as Faker;
-use InvalidArgumentException;
use Illuminate\Support\Traits\Macroable;
+use InvalidArgumentException;
class FactoryBuilder
{
@@ -24,13 +24,6 @@ class FactoryBuilder
*/
protected $class;
- /**
- * The name of the model being built.
- *
- * @var string
- */
- protected $name = 'default';
-
/**
* The database connection on which the model instance should be persisted.
*
@@ -84,7 +77,6 @@ class FactoryBuilder
* Create an new builder instance.
*
* @param string $class
- * @param string $name
* @param array $definitions
* @param array $states
* @param array $afterMaking
@@ -92,10 +84,9 @@ class FactoryBuilder
* @param \Faker\Generator $faker
* @return void
*/
- public function __construct($class, $name, array $definitions, array $states,
+ public function __construct($class, array $definitions, array $states,
array $afterMaking, array $afterCreating, Faker $faker)
{
- $this->name = $name;
$this->class = $class;
$this->faker = $faker;
$this->states = $states;
@@ -171,7 +162,7 @@ class FactoryBuilder
* Create a collection of models and persist them to the database.
*
* @param array $attributes
- * @return mixed
+ * @return \Illuminate\Database\Eloquent\Collection|\Illuminate\Database\Eloquent\Model|mixed
*/
public function create(array $attributes = [])
{
@@ -190,6 +181,19 @@ class FactoryBuilder
return $results;
}
+ /**
+ * Create a collection of models and persist them to the database.
+ *
+ * @param iterable $records
+ * @return \Illuminate\Database\Eloquent\Collection|mixed
+ */
+ public function createMany(iterable $records)
+ {
+ return (new $this->class)->newCollection(array_map(function ($attribute) {
+ return $this->create($attribute);
+ }, $records));
+ }
+
/**
* Set the connection name on the results and store them.
*
@@ -211,7 +215,7 @@ class FactoryBuilder
* Create a collection of models.
*
* @param array $attributes
- * @return mixed
+ * @return \Illuminate\Database\Eloquent\Collection|\Illuminate\Database\Eloquent\Model|mixed
*/
public function make(array $attributes = [])
{
@@ -265,12 +269,12 @@ class FactoryBuilder
*/
protected function getRawAttributes(array $attributes = [])
{
- if (! isset($this->definitions[$this->class][$this->name])) {
- throw new InvalidArgumentException("Unable to locate factory with name [{$this->name}] [{$this->class}].");
+ if (! isset($this->definitions[$this->class])) {
+ throw new InvalidArgumentException("Unable to locate factory for [{$this->class}].");
}
$definition = call_user_func(
- $this->definitions[$this->class][$this->name],
+ $this->definitions[$this->class],
$this->faker, $attributes
);
@@ -344,10 +348,7 @@ class FactoryBuilder
return $stateAttributes;
}
- return call_user_func(
- $stateAttributes,
- $this->faker, $attributes
- );
+ return $stateAttributes($this->faker, $attributes);
}
/**
@@ -406,7 +407,7 @@ class FactoryBuilder
*/
protected function callAfter(array $afterCallbacks, $models)
{
- $states = array_merge([$this->name], $this->activeStates);
+ $states = array_merge(['default'], $this->activeStates);
$models->each(function ($model) use ($states, $afterCallbacks) {
foreach ($states as $state) {
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/HigherOrderBuilderProxy.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/HigherOrderBuilderProxy.php
index 179d4a38e..16b49a1b4 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/HigherOrderBuilderProxy.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/HigherOrderBuilderProxy.php
@@ -24,8 +24,9 @@ class HigherOrderBuilderProxy
/**
* Create a new proxy instance.
*
- * @param Builder $builder
- * @param string $method
+ * @param \Illuminate\Database\Eloquent\Builder $builder
+ * @param string $method
+ * @return void
*/
public function __construct(Builder $builder, $method)
{
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/JsonEncodingException.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/JsonEncodingException.php
index 5878b0f7b..f62abd469 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/JsonEncodingException.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/JsonEncodingException.php
@@ -18,12 +18,26 @@ class JsonEncodingException extends RuntimeException
return new static('Error encoding model ['.get_class($model).'] with ID ['.$model->getKey().'] to JSON: '.$message);
}
+ /**
+ * Create a new JSON encoding exception for the resource.
+ *
+ * @param \Illuminate\Http\Resources\Json\JsonResource $resource
+ * @param string $message
+ * @return static
+ */
+ public static function forResource($resource, $message)
+ {
+ $model = $resource->resource;
+
+ return new static('Error encoding resource ['.get_class($resource).'] with model ['.get_class($model).'] with ID ['.$model->getKey().'] to JSON: '.$message);
+ }
+
/**
* Create a new JSON encoding exception for an attribute.
*
* @param mixed $model
* @param mixed $key
- * @param string $message
+ * @param string $message
* @return static
*/
public static function forAttribute($model, $key, $message)
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php
index a6d2fa9c4..9b9d72642 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php
@@ -2,22 +2,25 @@
namespace Illuminate\Database\Eloquent;
-use Exception;
use ArrayAccess;
-use JsonSerializable;
-use Illuminate\Support\Arr;
-use Illuminate\Support\Str;
-use Illuminate\Contracts\Support\Jsonable;
-use Illuminate\Contracts\Support\Arrayable;
-use Illuminate\Support\Traits\ForwardsCalls;
-use Illuminate\Contracts\Routing\UrlRoutable;
-use Illuminate\Contracts\Queue\QueueableEntity;
-use Illuminate\Database\Eloquent\Relations\Pivot;
+use Exception;
use Illuminate\Contracts\Queue\QueueableCollection;
-use Illuminate\Support\Collection as BaseCollection;
+use Illuminate\Contracts\Queue\QueueableEntity;
+use Illuminate\Contracts\Routing\UrlRoutable;
+use Illuminate\Contracts\Support\Arrayable;
+use Illuminate\Contracts\Support\Jsonable;
use Illuminate\Database\ConnectionResolverInterface as Resolver;
+use Illuminate\Database\Eloquent\Relations\BelongsToMany;
+use Illuminate\Database\Eloquent\Relations\Concerns\AsPivot;
+use Illuminate\Database\Eloquent\Relations\HasManyThrough;
+use Illuminate\Database\Eloquent\Relations\Pivot;
+use Illuminate\Support\Arr;
+use Illuminate\Support\Collection as BaseCollection;
+use Illuminate\Support\Str;
+use Illuminate\Support\Traits\ForwardsCalls;
+use JsonSerializable;
-abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializable, QueueableEntity, UrlRoutable
+abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializable, QueueableEntity, UrlRoutable
{
use Concerns\HasAttributes,
Concerns\HasEvents,
@@ -143,14 +146,14 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab
/**
* The name of the "created at" column.
*
- * @var string
+ * @var string|null
*/
const CREATED_AT = 'created_at';
/**
* The name of the "updated at" column.
*
- * @var string
+ * @var string|null
*/
const UPDATED_AT = 'updated_at';
@@ -183,14 +186,26 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab
$this->fireModelEvent('booting', false);
+ static::booting();
static::boot();
+ static::booted();
$this->fireModelEvent('booted', false);
}
}
/**
- * The "booting" method of the model.
+ * Perform any actions required before the model boots.
+ *
+ * @return void
+ */
+ protected static function booting()
+ {
+ //
+ }
+
+ /**
+ * Bootstrap the model and its traits.
*
* @return void
*/
@@ -243,6 +258,16 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab
}
}
+ /**
+ * Perform any actions required after the model boots.
+ *
+ * @return void
+ */
+ protected static function booted()
+ {
+ //
+ }
+
/**
* Clear the list of booted models so they will be re-booted.
*
@@ -278,7 +303,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab
static::$ignoreOnTouch = array_values(array_merge(static::$ignoreOnTouch, $models));
try {
- call_user_func($callback);
+ $callback();
} finally {
static::$ignoreOnTouch = array_values(array_diff(static::$ignoreOnTouch, $models));
}
@@ -371,10 +396,12 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab
*
* @param string $key
* @return string
+ *
+ * @deprecated This method is deprecated and will be removed in a future Laravel version.
*/
protected function removeTableFromKey($key)
{
- return Str::contains($key, '.') ? last(explode('.', $key)) : $key;
+ return $key;
}
/**
@@ -399,6 +426,8 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab
$model->setTable($this->getTable());
+ $model->mergeCasts($this->casts);
+
return $model;
}
@@ -467,7 +496,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab
* Begin querying a model with eager loading.
*
* @param array|string $relations
- * @return \Illuminate\Database\Eloquent\Builder|static
+ * @return \Illuminate\Database\Eloquent\Builder
*/
public static function with($relations)
{
@@ -493,6 +522,22 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab
return $this;
}
+ /**
+ * Eager load relationships on the polymorphic relation of a model.
+ *
+ * @param string $relation
+ * @param array $relations
+ * @return $this
+ */
+ public function loadMorph($relation, $relations)
+ {
+ $className = get_class($this->{$relation});
+
+ $this->{$relation}->load($relations[$className] ?? []);
+
+ return $this;
+ }
+
/**
* Eager load relations on the model if they are not already eager loaded.
*
@@ -523,6 +568,22 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab
return $this;
}
+ /**
+ * Eager load relationship counts on the polymorphic relation of a model.
+ *
+ * @param string $relation
+ * @param array $relations
+ * @return $this
+ */
+ public function loadMorphCount($relation, $relations)
+ {
+ $className = get_class($this->{$relation});
+
+ $this->{$relation}->loadCount($relations[$className] ?? []);
+
+ return $this;
+ }
+
/**
* Increment a column's value by a given amount.
*
@@ -643,6 +704,8 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab
*/
public function save(array $options = [])
{
+ $this->mergeAttributesFromClassCasts();
+
$query = $this->newModelQuery();
// If the "saving" event returns false we'll bail out of the save and return
@@ -844,7 +907,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab
/**
* Destroy the models for the given IDs.
*
- * @param \Illuminate\Support\Collection|array|int $ids
+ * @param \Illuminate\Support\Collection|array|int|string $ids
* @return int
*/
public static function destroy($ids)
@@ -883,6 +946,8 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab
*/
public function delete()
{
+ $this->mergeAttributesFromClassCasts();
+
if (is_null($this->getKeyName())) {
throw new Exception('No primary key defined on model.');
}
@@ -1078,6 +1143,29 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab
: Pivot::fromAttributes($parent, $attributes, $table, $exists);
}
+ /**
+ * Determine if the model has a given scope.
+ *
+ * @param string $scope
+ * @return bool
+ */
+ public function hasNamedScope($scope)
+ {
+ return method_exists($this, 'scope'.ucfirst($scope));
+ }
+
+ /**
+ * Apply the given named scope if possible.
+ *
+ * @param string $scope
+ * @param array $parameters
+ * @return mixed
+ */
+ public function callNamedScope($scope, array $parameters = [])
+ {
+ return $this->{'scope'.ucfirst($scope)}(...$parameters);
+ }
+
/**
* Convert the model instance to an array.
*
@@ -1150,7 +1238,10 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab
static::newQueryWithoutScopes()->findOrFail($this->getKey())->attributes
);
- $this->load(collect($this->relations)->except('pivot')->keys()->toArray());
+ $this->load(collect($this->relations)->reject(function ($relation) {
+ return $relation instanceof Pivot
+ || (is_object($relation) && in_array(AsPivot::class, class_uses_recursive($relation), true));
+ })->keys()->all());
$this->syncOriginal();
@@ -1172,7 +1263,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab
];
$attributes = Arr::except(
- $this->attributes, $except ? array_unique(array_merge($except, $defaults)) : $defaults
+ $this->getAttributes(), $except ? array_unique(array_merge($except, $defaults)) : $defaults
);
return tap(new static, function ($instance) use ($attributes) {
@@ -1472,11 +1563,34 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab
* Retrieve the model for a bound value.
*
* @param mixed $value
+ * @param string|null $field
* @return \Illuminate\Database\Eloquent\Model|null
*/
- public function resolveRouteBinding($value)
+ public function resolveRouteBinding($value, $field = null)
{
- return $this->where($this->getRouteKeyName(), $value)->first();
+ return $this->where($field ?? $this->getRouteKeyName(), $value)->first();
+ }
+
+ /**
+ * Retrieve the child model for a bound value.
+ *
+ * @param string $childType
+ * @param mixed $value
+ * @param string|null $field
+ * @return \Illuminate\Database\Eloquent\Model|null
+ */
+ public function resolveChildRouteBinding($childType, $value, $field)
+ {
+ $relationship = $this->{Str::plural(Str::camel($childType))}();
+
+ $field = $field ?: $relationship->getRelated()->getRouteKeyName();
+
+ if ($relationship instanceof HasManyThrough ||
+ $relationship instanceof BelongsToMany) {
+ return $relationship->where($relationship->getRelated()->getTable().'.'.$field, $value)->first();
+ } else {
+ return $relationship->where($field, $value)->first();
+ }
}
/**
@@ -1615,11 +1729,15 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab
return $this->$method(...$parameters);
}
+ if ($resolver = (static::$relationResolvers[get_class($this)][$method] ?? null)) {
+ return $resolver($this);
+ }
+
return $this->forwardCallTo($this->newQuery(), $method, $parameters);
}
/**
- * Handle dynamic static method calls into the method.
+ * Handle dynamic static method calls into the model.
*
* @param string $method
* @param array $parameters
@@ -1640,6 +1758,20 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab
return $this->toJson();
}
+ /**
+ * Prepare the object for serialization.
+ *
+ * @return array
+ */
+ public function __sleep()
+ {
+ $this->mergeAttributesFromClassCasts();
+
+ $this->classCastCache = [];
+
+ return array_keys(get_object_vars($this));
+ }
+
/**
* When a model is being unserialized, check if it needs to be booted.
*
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/ModelNotFoundException.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/ModelNotFoundException.php
index c3db8242f..2795b934b 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/ModelNotFoundException.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/ModelNotFoundException.php
@@ -2,8 +2,8 @@
namespace Illuminate\Database\Eloquent;
-use RuntimeException;
use Illuminate\Support\Arr;
+use RuntimeException;
class ModelNotFoundException extends RuntimeException
{
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/RelationNotFoundException.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/RelationNotFoundException.php
index 088429cc6..5acc0b309 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/RelationNotFoundException.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/RelationNotFoundException.php
@@ -23,7 +23,7 @@ class RelationNotFoundException extends RuntimeException
/**
* Create a new exception instance.
*
- * @param mixed $model
+ * @param object $model
* @param string $relation
* @return static
*/
@@ -33,7 +33,7 @@ class RelationNotFoundException extends RuntimeException
$instance = new static("Call to undefined relationship [{$relation}] on model [{$class}].");
- $instance->model = $model;
+ $instance->model = $class;
$instance->relation = $relation;
return $instance;
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsTo.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsTo.php
index a4989248b..5ec2c315b 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsTo.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsTo.php
@@ -2,9 +2,9 @@
namespace Illuminate\Database\Eloquent\Relations;
-use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Collection;
+use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\Concerns\SupportsDefaultModels;
class BelongsTo extends Relation
@@ -13,6 +13,8 @@ class BelongsTo extends Relation
/**
* The child model instance of the relation.
+ *
+ * @var \Illuminate\Database\Eloquent\Model
*/
protected $child;
@@ -145,7 +147,7 @@ class BelongsTo extends Relation
/**
* Initialize the relation on a set of models.
*
- * @param array $models
+ * @param array $models
* @param string $relation
* @return array
*/
@@ -161,7 +163,7 @@ class BelongsTo extends Relation
/**
* Match the eagerly loaded results to their parents.
*
- * @param array $models
+ * @param array $models
* @param \Illuminate\Database\Eloquent\Collection $results
* @param string $relation
* @return array
@@ -193,17 +195,6 @@ class BelongsTo extends Relation
return $models;
}
- /**
- * Update the parent model on the relationship.
- *
- * @param array $attributes
- * @return mixed
- */
- public function update(array $attributes)
- {
- return $this->getResults()->fill($attributes)->save();
- }
-
/**
* Associate the model instance to the given parent.
*
@@ -218,7 +209,7 @@ class BelongsTo extends Relation
if ($model instanceof Model) {
$this->child->setRelation($this->relationName, $model);
- } elseif ($this->child->isDirty($this->foreignKey)) {
+ } else {
$this->child->unsetRelation($this->relationName);
}
@@ -295,7 +286,7 @@ class BelongsTo extends Relation
protected function relationHasIncrementingId()
{
return $this->related->getIncrementing() &&
- $this->related->getKeyType() === 'int';
+ in_array($this->related->getKeyType(), ['int', 'integer']);
}
/**
@@ -368,15 +359,4 @@ class BelongsTo extends Relation
{
return $this->relationName;
}
-
- /**
- * Get the name of the relationship.
- *
- * @return string
- * @deprecated The getRelationName() method should be used instead. Will be removed in Laravel 6.0.
- */
- public function getRelation()
- {
- return $this->relationName;
- }
}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php
index 171648185..45bfbc2de 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php
@@ -2,12 +2,13 @@
namespace Illuminate\Database\Eloquent\Relations;
-use Illuminate\Support\Str;
-use InvalidArgumentException;
-use Illuminate\Database\Eloquent\Model;
+use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Collection;
+use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\ModelNotFoundException;
+use Illuminate\Support\Str;
+use InvalidArgumentException;
class BelongsToMany extends Relation
{
@@ -76,6 +77,13 @@ class BelongsToMany extends Relation
*/
protected $pivotWhereIns = [];
+ /**
+ * Any pivot table restrictions for whereNull clauses.
+ *
+ * @var array
+ */
+ protected $pivotWhereNulls = [];
+
/**
* The default values for the pivot columns.
*
@@ -135,7 +143,7 @@ class BelongsToMany extends Relation
* @param string $relatedPivotKey
* @param string $parentKey
* @param string $relatedKey
- * @param string $relationName
+ * @param string|null $relationName
* @return void
*/
public function __construct(Builder $query, Model $parent, $table, $foreignPivotKey,
@@ -245,7 +253,7 @@ class BelongsToMany extends Relation
/**
* Initialize the relation on a set of models.
*
- * @param array $models
+ * @param array $models
* @param string $relation
* @return array
*/
@@ -261,7 +269,7 @@ class BelongsToMany extends Relation
/**
* Match the eagerly loaded results to their parents.
*
- * @param array $models
+ * @param array $models
* @param \Illuminate\Database\Eloquent\Collection $results
* @param string $relation
* @return array
@@ -344,8 +352,8 @@ class BelongsToMany extends Relation
* Set a where clause for a pivot table column.
*
* @param string $column
- * @param string $operator
- * @param mixed $value
+ * @param mixed $operator
+ * @param mixed $value
* @param string $boolean
* @return $this
*/
@@ -356,13 +364,64 @@ class BelongsToMany extends Relation
return $this->where($this->table.'.'.$column, $operator, $value, $boolean);
}
+ /**
+ * Set a "where between" clause for a pivot table column.
+ *
+ * @param string $column
+ * @param array $values
+ * @param string $boolean
+ * @param bool $not
+ * @return $this
+ */
+ public function wherePivotBetween($column, array $values, $boolean = 'and', $not = false)
+ {
+ return $this->whereBetween($this->table.'.'.$column, $values, $boolean, $not);
+ }
+
+ /**
+ * Set a "or where between" clause for a pivot table column.
+ *
+ * @param string $column
+ * @param array $values
+ * @return $this
+ */
+ public function orWherePivotBetween($column, array $values)
+ {
+ return $this->wherePivotBetween($column, $values, 'or');
+ }
+
+ /**
+ * Set a "where pivot not between" clause for a pivot table column.
+ *
+ * @param string $column
+ * @param array $values
+ * @param string $boolean
+ * @return $this
+ */
+ public function wherePivotNotBetween($column, array $values, $boolean = 'and')
+ {
+ return $this->wherePivotBetween($column, $values, $boolean, true);
+ }
+
+ /**
+ * Set a "or where not between" clause for a pivot table column.
+ *
+ * @param string $column
+ * @param array $values
+ * @return $this
+ */
+ public function orWherePivotNotBetween($column, array $values)
+ {
+ return $this->wherePivotBetween($column, $values, 'or', true);
+ }
+
/**
* Set a "where in" clause for a pivot table column.
*
* @param string $column
- * @param mixed $values
+ * @param mixed $values
* @param string $boolean
- * @param bool $not
+ * @param bool $not
* @return $this
*/
public function wherePivotIn($column, $values, $boolean = 'and', $not = false)
@@ -376,8 +435,8 @@ class BelongsToMany extends Relation
* Set an "or where" clause for a pivot table column.
*
* @param string $column
- * @param string $operator
- * @param mixed $value
+ * @param mixed $operator
+ * @param mixed $value
* @return $this
*/
public function orWherePivot($column, $operator = null, $value = null)
@@ -393,6 +452,8 @@ class BelongsToMany extends Relation
* @param string|array $column
* @param mixed $value
* @return $this
+ *
+ * @throws \InvalidArgumentException
*/
public function withPivotValue($column, $value = null)
{
@@ -417,7 +478,7 @@ class BelongsToMany extends Relation
* Set an "or where in" clause for a pivot table column.
*
* @param string $column
- * @param mixed $values
+ * @param mixed $values
* @return $this
*/
public function orWherePivotIn($column, $values)
@@ -425,6 +486,81 @@ class BelongsToMany extends Relation
return $this->wherePivotIn($column, $values, 'or');
}
+ /**
+ * Set a "where not in" clause for a pivot table column.
+ *
+ * @param string $column
+ * @param mixed $values
+ * @param string $boolean
+ * @return $this
+ */
+ public function wherePivotNotIn($column, $values, $boolean = 'and')
+ {
+ return $this->wherePivotIn($column, $values, $boolean, true);
+ }
+
+ /**
+ * Set an "or where not in" clause for a pivot table column.
+ *
+ * @param string $column
+ * @param mixed $values
+ * @return $this
+ */
+ public function orWherePivotNotIn($column, $values)
+ {
+ return $this->wherePivotNotIn($column, $values, 'or');
+ }
+
+ /**
+ * Set a "where null" clause for a pivot table column.
+ *
+ * @param string $column
+ * @param string $boolean
+ * @param bool $not
+ * @return $this
+ */
+ public function wherePivotNull($column, $boolean = 'and', $not = false)
+ {
+ $this->pivotWhereNulls[] = func_get_args();
+
+ return $this->whereNull($this->table.'.'.$column, $boolean, $not);
+ }
+
+ /**
+ * Set a "where not null" clause for a pivot table column.
+ *
+ * @param string $column
+ * @param string $boolean
+ * @return $this
+ */
+ public function wherePivotNotNull($column, $boolean = 'and')
+ {
+ return $this->wherePivotNull($column, $boolean, true);
+ }
+
+ /**
+ * Set a "or where null" clause for a pivot table column.
+ *
+ * @param string $column
+ * @param bool $not
+ * @return $this
+ */
+ public function orWherePivotNull($column, $not = false)
+ {
+ return $this->wherePivotNull($column, 'or', $not);
+ }
+
+ /**
+ * Set a "or where not null" clause for a pivot table column.
+ *
+ * @param string $column
+ * @return $this
+ */
+ public function orWherePivotNotNull($column)
+ {
+ return $this->orWherePivotNull($column, true);
+ }
+
/**
* Find a related model by its primary key or return new instance of the related model.
*
@@ -461,7 +597,7 @@ class BelongsToMany extends Relation
*
* @param array $attributes
* @param array $joining
- * @param bool $touch
+ * @param bool $touch
* @return \Illuminate\Database\Eloquent\Model
*/
public function firstOrCreate(array $attributes, array $joining = [], $touch = true)
@@ -479,7 +615,7 @@ class BelongsToMany extends Relation
* @param array $attributes
* @param array $values
* @param array $joining
- * @param bool $touch
+ * @param bool $touch
* @return \Illuminate\Database\Eloquent\Model
*/
public function updateOrCreate(array $attributes, array $values = [], array $joining = [], $touch = true)
@@ -504,22 +640,32 @@ class BelongsToMany extends Relation
*/
public function find($id, $columns = ['*'])
{
- return is_array($id) ? $this->findMany($id, $columns) : $this->where(
- $this->getRelated()->getQualifiedKeyName(), '=', $id
+ if (! $id instanceof Model && (is_array($id) || $id instanceof Arrayable)) {
+ return $this->findMany($id, $columns);
+ }
+
+ return $this->where(
+ $this->getRelated()->getQualifiedKeyName(), '=', $this->parseId($id)
)->first($columns);
}
/**
* Find multiple related models by their primary keys.
*
- * @param mixed $ids
+ * @param \Illuminate\Contracts\Support\Arrayable|array $ids
* @param array $columns
* @return \Illuminate\Database\Eloquent\Collection
*/
public function findMany($ids, $columns = ['*'])
{
- return empty($ids) ? $this->getRelated()->newCollection() : $this->whereIn(
- $this->getRelated()->getQualifiedKeyName(), $ids
+ $ids = $ids instanceof Arrayable ? $ids->toArray() : $ids;
+
+ if (empty($ids)) {
+ return $this->getRelated()->newCollection();
+ }
+
+ return $this->whereIn(
+ $this->getRelated()->getQualifiedKeyName(), $this->parseIds($ids)
)->get($columns);
}
@@ -536,6 +682,8 @@ class BelongsToMany extends Relation
{
$result = $this->find($id, $columns);
+ $id = $id instanceof Arrayable ? $id->toArray() : $id;
+
if (is_array($id)) {
if (count($result) === count(array_unique($id))) {
return $result;
@@ -547,10 +695,24 @@ class BelongsToMany extends Relation
throw (new ModelNotFoundException)->setModel(get_class($this->related), $id);
}
+ /**
+ * Add a basic where clause to the query, and return the first result.
+ *
+ * @param \Closure|string|array $column
+ * @param mixed $operator
+ * @param mixed $value
+ * @param string $boolean
+ * @return \Illuminate\Database\Eloquent\Model|static
+ */
+ public function firstWhere($column, $operator = null, $value = null, $boolean = 'and')
+ {
+ return $this->where($column, $operator, $value, $boolean)->first();
+ }
+
/**
* Execute the query and get the first result.
*
- * @param array $columns
+ * @param array $columns
* @return mixed
*/
public function first($columns = ['*'])
@@ -654,7 +816,7 @@ class BelongsToMany extends Relation
/**
* Get a paginator for the "select" statement.
*
- * @param int $perPage
+ * @param int|null $perPage
* @param array $columns
* @param string $pageName
* @param int|null $page
@@ -672,7 +834,7 @@ class BelongsToMany extends Relation
/**
* Paginate the given query into a simple paginator.
*
- * @param int $perPage
+ * @param int|null $perPage
* @param array $columns
* @param string $pageName
* @param int|null $page
@@ -749,6 +911,22 @@ class BelongsToMany extends Relation
});
}
+ /**
+ * Get a lazy collection for the given query.
+ *
+ * @return \Illuminate\Support\LazyCollection
+ */
+ public function cursor()
+ {
+ $this->query->addSelect($this->shouldSelect());
+
+ return $this->query->cursor()->map(function ($model) {
+ $this->hydratePivotRelation([$model]);
+
+ return $model;
+ });
+ }
+
/**
* Hydrate the pivot table relationship on the models.
*
@@ -865,7 +1043,7 @@ class BelongsToMany extends Relation
*
* @param \Illuminate\Database\Eloquent\Model $model
* @param array $pivotAttributes
- * @param bool $touch
+ * @param bool $touch
* @return \Illuminate\Database\Eloquent\Model
*/
public function save(Model $model, array $pivotAttributes = [], $touch = true)
@@ -900,7 +1078,7 @@ class BelongsToMany extends Relation
*
* @param array $attributes
* @param array $joining
- * @param bool $touch
+ * @param bool $touch
* @return \Illuminate\Database\Eloquent\Model
*/
public function create(array $attributes = [], array $joining = [], $touch = true)
@@ -920,11 +1098,11 @@ class BelongsToMany extends Relation
/**
* Create an array of new instances of the related models.
*
- * @param array $records
+ * @param iterable $records
* @param array $joinings
* @return array
*/
- public function createMany(array $records, array $joinings = [])
+ public function createMany(iterable $records, array $joinings = [])
{
$instances = [];
@@ -1133,4 +1311,14 @@ class BelongsToMany extends Relation
{
return $this->accessor;
}
+
+ /**
+ * Get the pivot columns for this relationship.
+ *
+ * @return array
+ */
+ public function getPivotColumns()
+ {
+ return $this->pivotColumns;
+ }
}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/AsPivot.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/AsPivot.php
index 605e8cfa7..d7de34e2c 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/AsPivot.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/AsPivot.php
@@ -2,9 +2,9 @@
namespace Illuminate\Database\Eloquent\Relations\Concerns;
-use Illuminate\Support\Str;
-use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Builder;
+use Illuminate\Database\Eloquent\Model;
+use Illuminate\Support\Str;
trait AsPivot
{
@@ -33,9 +33,9 @@ trait AsPivot
* Create a new pivot model instance.
*
* @param \Illuminate\Database\Eloquent\Model $parent
- * @param array $attributes
+ * @param array $attributes
* @param string $table
- * @param bool $exists
+ * @param bool $exists
* @return static
*/
public static function fromAttributes(Model $parent, $attributes, $table, $exists = false)
@@ -66,9 +66,9 @@ trait AsPivot
* Create a new pivot model from raw values returned from a query.
*
* @param \Illuminate\Database\Eloquent\Model $parent
- * @param array $attributes
+ * @param array $attributes
* @param string $table
- * @param bool $exists
+ * @param bool $exists
* @return static
*/
public static function fromRawAttributes(Model $parent, $attributes, $table, $exists = false)
@@ -77,7 +77,7 @@ trait AsPivot
$instance->timestamps = $instance->hasTimestampAttributes($attributes);
- $instance->setRawAttributes($attributes, true);
+ $instance->setRawAttributes($attributes, $exists);
return $instance;
}
@@ -121,6 +121,8 @@ trait AsPivot
$this->touchOwners();
return tap($this->getDeleteQuery()->delete(), function () {
+ $this->exists = false;
+
$this->fireModelEvent('deleted', false);
});
}
@@ -284,6 +286,8 @@ trait AsPivot
*/
protected function newQueryForCollectionRestoration(array $ids)
{
+ $ids = array_values($ids);
+
if (! Str::contains($ids[0], ':')) {
return parent::newQueryForRestoration($ids);
}
@@ -301,4 +305,17 @@ trait AsPivot
return $query;
}
+
+ /**
+ * Unset all the loaded relations for the instance.
+ *
+ * @return $this
+ */
+ public function unsetRelations()
+ {
+ $this->pivotParent = null;
+ $this->relations = [];
+
+ return $this;
+ }
}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php
index 70cf998aa..df39c1169 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php
@@ -2,27 +2,20 @@
namespace Illuminate\Database\Eloquent\Relations\Concerns;
-use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Collection;
+use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\Pivot;
use Illuminate\Support\Collection as BaseCollection;
trait InteractsWithPivotTable
{
- /**
- * The cached copy of the currently attached pivot models.
- *
- * @var Collection
- */
- private $currentlyAttached;
-
/**
* Toggles a model (or models) from the parent.
*
* Each existing model is detached, and non existing ones are attached.
*
* @param mixed $ids
- * @param bool $touch
+ * @param bool $touch
* @return array
*/
public function toggle($ids, $touch = true)
@@ -84,7 +77,7 @@ trait InteractsWithPivotTable
* Sync the intermediate tables with a list of IDs or collection of models.
*
* @param \Illuminate\Support\Collection|\Illuminate\Database\Eloquent\Model|array $ids
- * @param bool $detaching
+ * @param bool $detaching
* @return array
*/
public function sync($ids, $detaching = true)
@@ -152,7 +145,7 @@ trait InteractsWithPivotTable
*
* @param array $records
* @param array $current
- * @param bool $touch
+ * @param bool $touch
* @return array
*/
protected function attachNew(array $records, array $current, $touch = true)
@@ -186,12 +179,15 @@ trait InteractsWithPivotTable
*
* @param mixed $id
* @param array $attributes
- * @param bool $touch
+ * @param bool $touch
* @return int
*/
public function updateExistingPivot($id, array $attributes, $touch = true)
{
- if ($this->using && empty($this->pivotWheres) && empty($this->pivotWhereIns)) {
+ if ($this->using &&
+ empty($this->pivotWheres) &&
+ empty($this->pivotWhereIns) &&
+ empty($this->pivotWhereNulls)) {
return $this->updateExistingPivotUsingCustomClass($id, $attributes, $touch);
}
@@ -215,7 +211,7 @@ trait InteractsWithPivotTable
*
* @param mixed $id
* @param array $attributes
- * @param bool $touch
+ * @param bool $touch
* @return int
*/
protected function updateExistingPivotUsingCustomClass($id, array $attributes, $touch)
@@ -227,10 +223,9 @@ trait InteractsWithPivotTable
$updated = $pivot ? $pivot->fill($attributes)->isDirty() : false;
- $this->newPivot([
- $this->foreignPivotKey => $this->parent->{$this->parentKey},
- $this->relatedPivotKey => $this->parseId($id),
- ], true)->fill($attributes)->save();
+ if ($updated) {
+ $pivot->save();
+ }
if ($touch) {
$this->touchIfTouching();
@@ -244,7 +239,7 @@ trait InteractsWithPivotTable
*
* @param mixed $id
* @param array $attributes
- * @param bool $touch
+ * @param bool $touch
* @return void
*/
public function attach($id, array $attributes = [], $touch = true)
@@ -312,10 +307,10 @@ trait InteractsWithPivotTable
/**
* Create a full attachment record payload.
*
- * @param int $key
+ * @param int $key
* @param mixed $value
* @param array $attributes
- * @param bool $hasTimestamps
+ * @param bool $hasTimestamps
* @return array
*/
protected function formatAttachRecord($key, $value, $attributes, $hasTimestamps)
@@ -345,7 +340,7 @@ trait InteractsWithPivotTable
/**
* Create a new pivot attachment record.
*
- * @param int $id
+ * @param int $id
* @param bool $timed
* @return array
*/
@@ -373,7 +368,7 @@ trait InteractsWithPivotTable
* Set the creation and update timestamps on an attach record.
*
* @param array $record
- * @param bool $exists
+ * @param bool $exists
* @return array
*/
protected function addTimestampsToAttachment(array $record, $exists = false)
@@ -417,7 +412,11 @@ trait InteractsWithPivotTable
*/
public function detach($ids = null, $touch = true)
{
- if ($this->using && ! empty($ids) && empty($this->pivotWheres) && empty($this->pivotWhereIns)) {
+ if ($this->using &&
+ ! empty($ids) &&
+ empty($this->pivotWheres) &&
+ empty($this->pivotWhereIns) &&
+ empty($this->pivotWhereNulls)) {
$results = $this->detachUsingCustomClass($ids);
} else {
$query = $this->newPivotQuery();
@@ -475,10 +474,12 @@ trait InteractsWithPivotTable
*/
protected function getCurrentlyAttachedPivots()
{
- return $this->currentlyAttached ?: $this->newPivotQuery()->get()->map(function ($record) {
+ return $this->newPivotQuery()->get()->map(function ($record) {
$class = $this->using ? $this->using : Pivot::class;
- return (new $class)->setRawAttributes((array) $record, true);
+ $pivot = $class::fromRawAttributes($this->parent, (array) $record, $this->getTable(), true);
+
+ return $pivot->setPivotKeys($this->foreignPivotKey, $this->relatedPivotKey);
});
}
@@ -486,7 +487,7 @@ trait InteractsWithPivotTable
* Create a new pivot model instance.
*
* @param array $attributes
- * @param bool $exists
+ * @param bool $exists
* @return \Illuminate\Database\Eloquent\Relations\Pivot
*/
public function newPivot(array $attributes = [], $exists = false)
@@ -535,16 +536,20 @@ trait InteractsWithPivotTable
*
* @return \Illuminate\Database\Query\Builder
*/
- protected function newPivotQuery()
+ public function newPivotQuery()
{
$query = $this->newPivotStatement();
foreach ($this->pivotWheres as $arguments) {
- call_user_func_array([$query, 'where'], $arguments);
+ $query->where(...$arguments);
}
foreach ($this->pivotWhereIns as $arguments) {
- call_user_func_array([$query, 'whereIn'], $arguments);
+ $query->whereIn(...$arguments);
+ }
+
+ foreach ($this->pivotWhereNulls as $arguments) {
+ $query->whereNull(...$arguments);
}
return $query->where($this->foreignPivotKey, $this->parent->{$this->parentKey});
@@ -629,7 +634,7 @@ trait InteractsWithPivotTable
/**
* Cast the given pivot attributes.
*
- * @param array $attributes
+ * @param array $attributes
* @return array
*/
protected function castAttributes($attributes)
@@ -642,7 +647,7 @@ trait InteractsWithPivotTable
/**
* Converts a given value to a given type value.
*
- * @param string $type
+ * @param string $type
* @param mixed $value
* @return mixed
*/
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasMany.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasMany.php
index 8971a7d2a..b005d4ff1 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasMany.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasMany.php
@@ -21,7 +21,7 @@ class HasMany extends HasOneOrMany
/**
* Initialize the relation on a set of models.
*
- * @param array $models
+ * @param array $models
* @param string $relation
* @return array
*/
@@ -37,7 +37,7 @@ class HasMany extends HasOneOrMany
/**
* Match the eagerly loaded results to their parents.
*
- * @param array $models
+ * @param array $models
* @param \Illuminate\Database\Eloquent\Collection $results
* @param string $relation
* @return array
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php
index 873ea893a..b0b568b25 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php
@@ -2,11 +2,12 @@
namespace Illuminate\Database\Eloquent\Relations;
-use Illuminate\Database\Eloquent\Model;
+use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Collection;
-use Illuminate\Database\Eloquent\SoftDeletes;
+use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\ModelNotFoundException;
+use Illuminate\Database\Eloquent\SoftDeletes;
class HasManyThrough extends Relation
{
@@ -114,7 +115,9 @@ class HasManyThrough extends Relation
$query->join($this->throughParent->getTable(), $this->getQualifiedParentKeyName(), '=', $farKey);
if ($this->throughParentSoftDeletes()) {
- $query->whereNull($this->throughParent->getQualifiedDeletedAtColumn());
+ $query->withGlobalScope('SoftDeletableHasManyThrough', function ($query) {
+ $query->whereNull($this->throughParent->getQualifiedDeletedAtColumn());
+ });
}
}
@@ -138,6 +141,18 @@ class HasManyThrough extends Relation
return in_array(SoftDeletes::class, class_uses_recursive($this->throughParent));
}
+ /**
+ * Indicate that trashed "through" parents should be included in the query.
+ *
+ * @return $this
+ */
+ public function withTrashedParents()
+ {
+ $this->query->withoutGlobalScope('SoftDeletableHasManyThrough');
+
+ return $this;
+ }
+
/**
* Set the constraints for an eager load of the relation.
*
@@ -156,7 +171,7 @@ class HasManyThrough extends Relation
/**
* Initialize the relation on a set of models.
*
- * @param array $models
+ * @param array $models
* @param string $relation
* @return array
*/
@@ -172,7 +187,7 @@ class HasManyThrough extends Relation
/**
* Match the eagerly loaded results to their parents.
*
- * @param array $models
+ * @param array $models
* @param \Illuminate\Database\Eloquent\Collection $results
* @param string $relation
* @return array
@@ -246,10 +261,24 @@ class HasManyThrough extends Relation
return $instance;
}
+ /**
+ * Add a basic where clause to the query, and return the first result.
+ *
+ * @param \Closure|string|array $column
+ * @param mixed $operator
+ * @param mixed $value
+ * @param string $boolean
+ * @return \Illuminate\Database\Eloquent\Model|static
+ */
+ public function firstWhere($column, $operator = null, $value = null, $boolean = 'and')
+ {
+ return $this->where($column, $operator, $value, $boolean)->first();
+ }
+
/**
* Execute the query and get the first related model.
*
- * @param array $columns
+ * @param array $columns
* @return mixed
*/
public function first($columns = ['*'])
@@ -285,7 +314,7 @@ class HasManyThrough extends Relation
*/
public function find($id, $columns = ['*'])
{
- if (is_array($id)) {
+ if (is_array($id) || $id instanceof Arrayable) {
return $this->findMany($id, $columns);
}
@@ -297,12 +326,14 @@ class HasManyThrough extends Relation
/**
* Find multiple related models by their primary keys.
*
- * @param mixed $ids
+ * @param \Illuminate\Contracts\Support\Arrayable|array $ids
* @param array $columns
* @return \Illuminate\Database\Eloquent\Collection
*/
public function findMany($ids, $columns = ['*'])
{
+ $ids = $ids instanceof Arrayable ? $ids->toArray() : $ids;
+
if (empty($ids)) {
return $this->getRelated()->newCollection();
}
@@ -325,6 +356,8 @@ class HasManyThrough extends Relation
{
$result = $this->find($id, $columns);
+ $id = $id instanceof Arrayable ? $id->toArray() : $id;
+
if (is_array($id)) {
if (count($result) === count(array_unique($id))) {
return $result;
@@ -373,7 +406,7 @@ class HasManyThrough extends Relation
/**
* Get a paginator for the "select" statement.
*
- * @param int $perPage
+ * @param int|null $perPage
* @param array $columns
* @param string $pageName
* @param int $page
@@ -389,7 +422,7 @@ class HasManyThrough extends Relation
/**
* Paginate the given query into a simple paginator.
*
- * @param int $perPage
+ * @param int|null $perPage
* @param array $columns
* @param string $pageName
* @param int|null $page
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOne.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOne.php
index e4763ff4d..1d9e008fd 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOne.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOne.php
@@ -2,8 +2,8 @@
namespace Illuminate\Database\Eloquent\Relations;
-use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Collection;
+use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\Concerns\SupportsDefaultModels;
class HasOne extends HasOneOrMany
@@ -27,7 +27,7 @@ class HasOne extends HasOneOrMany
/**
* Initialize the relation on a set of models.
*
- * @param array $models
+ * @param array $models
* @param string $relation
* @return array
*/
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php
index af59df96e..d015c863b 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php
@@ -2,9 +2,9 @@
namespace Illuminate\Database\Eloquent\Relations;
-use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Collection;
+use Illuminate\Database\Eloquent\Model;
abstract class HasOneOrMany extends Relation
{
@@ -59,6 +59,23 @@ abstract class HasOneOrMany extends Relation
});
}
+ /**
+ * Create and return an un-saved instances of the related models.
+ *
+ * @param iterable $records
+ * @return \Illuminate\Database\Eloquent\Collection
+ */
+ public function makeMany($records)
+ {
+ $instances = $this->related->newCollection();
+
+ foreach ($records as $record) {
+ $instances->push($this->make($record));
+ }
+
+ return $instances;
+ }
+
/**
* Set the base constraints on the relation query.
*
@@ -91,7 +108,7 @@ abstract class HasOneOrMany extends Relation
/**
* Match the eagerly loaded results to their single parents.
*
- * @param array $models
+ * @param array $models
* @param \Illuminate\Database\Eloquent\Collection $results
* @param string $relation
* @return array
@@ -104,7 +121,7 @@ abstract class HasOneOrMany extends Relation
/**
* Match the eagerly loaded results to their many parents.
*
- * @param array $models
+ * @param array $models
* @param \Illuminate\Database\Eloquent\Collection $results
* @param string $relation
* @return array
@@ -117,7 +134,7 @@ abstract class HasOneOrMany extends Relation
/**
* Match the eagerly loaded results to their many parents.
*
- * @param array $models
+ * @param array $models
* @param \Illuminate\Database\Eloquent\Collection $results
* @param string $relation
* @param string $type
@@ -144,7 +161,7 @@ abstract class HasOneOrMany extends Relation
/**
* Get the value of a relationship by one or many type.
*
- * @param array $dictionary
+ * @param array $dictionary
* @param string $key
* @param string $type
* @return mixed
@@ -285,10 +302,10 @@ abstract class HasOneOrMany extends Relation
/**
* Create a Collection of new instances of the related model.
*
- * @param array $records
+ * @param iterable $records
* @return \Illuminate\Database\Eloquent\Collection
*/
- public function createMany(array $records)
+ public function createMany(iterable $records)
{
$instances = $this->related->newCollection();
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneThrough.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneThrough.php
index 86bd35d12..a48c31862 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneThrough.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneThrough.php
@@ -2,8 +2,8 @@
namespace Illuminate\Database\Eloquent\Relations;
-use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Collection;
+use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\Concerns\SupportsDefaultModels;
class HasOneThrough extends HasManyThrough
@@ -23,7 +23,7 @@ class HasOneThrough extends HasManyThrough
/**
* Initialize the relation on a set of models.
*
- * @param array $models
+ * @param array $models
* @param string $relation
* @return array
*/
@@ -39,7 +39,7 @@ class HasOneThrough extends HasManyThrough
/**
* Match the eagerly loaded results to their parents.
*
- * @param array $models
+ * @param array $models
* @param \Illuminate\Database\Eloquent\Collection $results
* @param string $relation
* @return array
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphMany.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphMany.php
index a4c63763f..12b065026 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphMany.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphMany.php
@@ -21,7 +21,7 @@ class MorphMany extends MorphOneOrMany
/**
* Initialize the relation on a set of models.
*
- * @param array $models
+ * @param array $models
* @param string $relation
* @return array
*/
@@ -37,7 +37,7 @@ class MorphMany extends MorphOneOrMany
/**
* Match the eagerly loaded results to their parents.
*
- * @param array $models
+ * @param array $models
* @param \Illuminate\Database\Eloquent\Collection $results
* @param string $relation
* @return array
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOne.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOne.php
index 0327ffae0..5f8da14f1 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOne.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOne.php
@@ -2,8 +2,8 @@
namespace Illuminate\Database\Eloquent\Relations;
-use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Collection;
+use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\Concerns\SupportsDefaultModels;
class MorphOne extends MorphOneOrMany
@@ -27,7 +27,7 @@ class MorphOne extends MorphOneOrMany
/**
* Initialize the relation on a set of models.
*
- * @param array $models
+ * @param array $models
* @param string $relation
* @return array
*/
@@ -43,7 +43,7 @@ class MorphOne extends MorphOneOrMany
/**
* Match the eagerly loaded results to their parents.
*
- * @param array $models
+ * @param array $models
* @param \Illuminate\Database\Eloquent\Collection $results
* @param string $relation
* @return array
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOneOrMany.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOneOrMany.php
index 03a776bf0..887ebe247 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOneOrMany.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOneOrMany.php
@@ -2,8 +2,8 @@
namespace Illuminate\Database\Eloquent\Relations;
-use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Builder;
+use Illuminate\Database\Eloquent\Model;
abstract class MorphOneOrMany extends HasOneOrMany
{
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphPivot.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphPivot.php
index d649554c5..68489265f 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphPivot.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphPivot.php
@@ -2,8 +2,8 @@
namespace Illuminate\Database\Eloquent\Relations;
-use Illuminate\Support\Str;
use Illuminate\Database\Eloquent\Builder;
+use Illuminate\Support\Str;
class MorphPivot extends Pivot
{
@@ -45,11 +45,21 @@ class MorphPivot extends Pivot
*/
public function delete()
{
+ if (isset($this->attributes[$this->getKeyName()])) {
+ return (int) parent::delete();
+ }
+
+ if ($this->fireModelEvent('deleting') === false) {
+ return 0;
+ }
+
$query = $this->getDeleteQuery();
$query->where($this->morphType, $this->morphClass);
- return $query->delete();
+ return tap($query->delete(), function () {
+ $this->fireModelEvent('deleted', false);
+ });
}
/**
@@ -129,6 +139,8 @@ class MorphPivot extends Pivot
*/
protected function newQueryForCollectionRestoration(array $ids)
{
+ $ids = array_values($ids);
+
if (! Str::contains($ids[0], ':')) {
return parent::newQueryForRestoration($ids);
}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphTo.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphTo.php
index 521730b3c..22d1d4d2c 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphTo.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphTo.php
@@ -3,9 +3,9 @@
namespace Illuminate\Database\Eloquent\Relations;
use BadMethodCallException;
-use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Collection;
+use Illuminate\Database\Eloquent\Model;
class MorphTo extends BelongsTo
{
@@ -44,6 +44,13 @@ class MorphTo extends BelongsTo
*/
protected $morphableEagerLoads = [];
+ /**
+ * A map of relationship counts to load for each individual morph type.
+ *
+ * @var array
+ */
+ protected $morphableEagerLoadCounts = [];
+
/**
* Create a new morph to relationship instance.
*
@@ -121,7 +128,10 @@ class MorphTo extends BelongsTo
->with(array_merge(
$this->getQuery()->getEagerLoads(),
(array) ($this->morphableEagerLoads[get_class($instance)] ?? [])
- ));
+ ))
+ ->withCount(
+ (array) ($this->morphableEagerLoadCounts[get_class($instance)] ?? [])
+ );
$whereIn = $this->whereInMethod($instance, $ownerKey);
@@ -138,9 +148,7 @@ class MorphTo extends BelongsTo
*/
protected function gatherKeysByType($type)
{
- return collect($this->dictionary[$type])->map(function ($models) {
- return head($models)->{$this->foreignKey};
- })->values()->unique()->all();
+ return array_keys($this->dictionary[$type]);
}
/**
@@ -153,13 +161,17 @@ class MorphTo extends BelongsTo
{
$class = Model::getActualClassNameForMorph($type);
- return new $class;
+ return tap(new $class, function ($instance) {
+ if (! $instance->getConnectionName()) {
+ $instance->setConnection($this->getConnection()->getName());
+ }
+ });
}
/**
* Match the eagerly loaded results to their parents.
*
- * @param array $models
+ * @param array $models
* @param \Illuminate\Database\Eloquent\Collection $results
* @param string $relation
* @return array
@@ -280,6 +292,21 @@ class MorphTo extends BelongsTo
return $this;
}
+ /**
+ * Specify which relationship counts to load for a given morph type.
+ *
+ * @param array $withCount
+ * @return \Illuminate\Database\Eloquent\Relations\MorphTo
+ */
+ public function morphWithCount(array $withCount)
+ {
+ $this->morphableEagerLoadCounts = array_merge(
+ $this->morphableEagerLoadCounts, $withCount
+ );
+
+ return $this;
+ }
+
/**
* Replay stored macro calls on the actual related instance.
*
@@ -299,7 +326,7 @@ class MorphTo extends BelongsTo
* Handle dynamic method calls to the relationship.
*
* @param string $method
- * @param array $parameters
+ * @param array $parameters
* @return mixed
*/
public function __call($method, $parameters)
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphToMany.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphToMany.php
index e487af04a..0adf385e1 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphToMany.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphToMany.php
@@ -2,9 +2,9 @@
namespace Illuminate\Database\Eloquent\Relations;
-use Illuminate\Support\Arr;
-use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Builder;
+use Illuminate\Database\Eloquent\Model;
+use Illuminate\Support\Arr;
class MorphToMany extends BelongsToMany
{
@@ -42,7 +42,7 @@ class MorphToMany extends BelongsToMany
* @param string $relatedPivotKey
* @param string $parentKey
* @param string $relatedKey
- * @param string $relationName
+ * @param string|null $relationName
* @param bool $inverse
* @return void
*/
@@ -89,7 +89,7 @@ class MorphToMany extends BelongsToMany
/**
* Create a new pivot attachment record.
*
- * @param int $id
+ * @param int $id
* @param bool $timed
* @return array
*/
@@ -115,12 +115,27 @@ class MorphToMany extends BelongsToMany
);
}
+ /**
+ * Get the pivot models that are currently attached.
+ *
+ * @return \Illuminate\Support\Collection
+ */
+ protected function getCurrentlyAttachedPivots()
+ {
+ return parent::getCurrentlyAttachedPivots()->map(function ($record) {
+ return $record instanceof MorphPivot
+ ? $record->setMorphType($this->morphType)
+ ->setMorphClass($this->morphClass)
+ : $record;
+ });
+ }
+
/**
* Create a new query builder for the pivot table.
*
* @return \Illuminate\Database\Query\Builder
*/
- protected function newPivotQuery()
+ public function newPivotQuery()
{
return parent::newPivotQuery()->where($this->morphType, $this->morphClass);
}
@@ -129,7 +144,7 @@ class MorphToMany extends BelongsToMany
* Create a new pivot model instance.
*
* @param array $attributes
- * @param bool $exists
+ * @param bool $exists
* @return \Illuminate\Database\Eloquent\Relations\Pivot
*/
public function newPivot(array $attributes = [], $exists = false)
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php
index f4fa915a5..6bdb6f7a7 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php
@@ -3,13 +3,13 @@
namespace Illuminate\Database\Eloquent\Relations;
use Closure;
-use Illuminate\Support\Arr;
-use Illuminate\Database\Eloquent\Model;
-use Illuminate\Support\Traits\Macroable;
use Illuminate\Database\Eloquent\Builder;
-use Illuminate\Database\Query\Expression;
use Illuminate\Database\Eloquent\Collection;
+use Illuminate\Database\Eloquent\Model;
+use Illuminate\Database\Query\Expression;
+use Illuminate\Support\Arr;
use Illuminate\Support\Traits\ForwardsCalls;
+use Illuminate\Support\Traits\Macroable;
/**
* @mixin \Illuminate\Database\Eloquent\Builder
@@ -87,7 +87,7 @@ abstract class Relation
// off of the bindings, leaving only the constraints that the developers put
// as "extra" on the relationships, and not original relation constraints.
try {
- return call_user_func($callback);
+ return $callback();
} finally {
static::$constraints = $previous;
}
@@ -111,7 +111,7 @@ abstract class Relation
/**
* Initialize the relation on a set of models.
*
- * @param array $models
+ * @param array $models
* @param string $relation
* @return array
*/
@@ -120,7 +120,7 @@ abstract class Relation
/**
* Match the eagerly loaded results to their parents.
*
- * @param array $models
+ * @param array $models
* @param \Illuminate\Database\Eloquent\Collection $results
* @param string $relation
* @return array
@@ -203,7 +203,7 @@ abstract class Relation
*
* @param \Illuminate\Database\Eloquent\Builder $query
* @param \Illuminate\Database\Eloquent\Builder $parentQuery
- * @param array|mixed $columns
+ * @param array|mixed $columns
* @return \Illuminate\Database\Eloquent\Builder
*/
public function getRelationExistenceQuery(Builder $query, Builder $parentQuery, $columns = ['*'])
@@ -216,8 +216,8 @@ abstract class Relation
/**
* Get all of the primary keys for an array of models.
*
- * @param array $models
- * @param string $key
+ * @param array $models
+ * @param string|null $key
* @return array
*/
protected function getKeys(array $models, $key = null)
@@ -317,7 +317,6 @@ abstract class Relation
protected function whereInMethod(Model $model, $key)
{
return $model->getKeyName() === last(explode('.', $key))
- && $model->getIncrementing()
&& in_array($model->getKeyType(), ['int', 'integer'])
? 'whereIntegerInRaw'
: 'whereIn';
@@ -374,7 +373,7 @@ abstract class Relation
* Handle dynamic method calls to the relationship.
*
* @param string $method
- * @param array $parameters
+ * @param array $parameters
* @return mixed
*/
public function __call($method, $parameters)
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletes.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletes.php
index 65b6cb66c..f50eba85f 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletes.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletes.php
@@ -92,6 +92,8 @@ trait SoftDeletes
}
$query->update($columns);
+
+ $this->syncOriginalAttributes(array_keys($columns));
}
/**
@@ -133,7 +135,7 @@ trait SoftDeletes
}
/**
- * Register a restoring model event with the dispatcher.
+ * Register a "restoring" model event callback with the dispatcher.
*
* @param \Closure|string $callback
* @return void
@@ -144,7 +146,7 @@ trait SoftDeletes
}
/**
- * Register a restored model event with the dispatcher.
+ * Register a "restored" model event callback with the dispatcher.
*
* @param \Closure|string $callback
* @return void
@@ -154,6 +156,17 @@ trait SoftDeletes
static::registerModelEvent('restored', $callback);
}
+ /**
+ * Register a "forceDeleted" model event callback with the dispatcher.
+ *
+ * @param \Closure|string $callback
+ * @return void
+ */
+ public static function forceDeleted($callback)
+ {
+ static::registerModelEvent('forceDeleted', $callback);
+ }
+
/**
* Determine if the model is currently force deleting.
*
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Events/MigrationEvent.php b/vendor/laravel/framework/src/Illuminate/Database/Events/MigrationEvent.php
index 4abe4ef41..53b91a56b 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/Events/MigrationEvent.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Events/MigrationEvent.php
@@ -2,8 +2,8 @@
namespace Illuminate\Database\Events;
-use Illuminate\Database\Migrations\Migration;
use Illuminate\Contracts\Database\Events\MigrationEvent as MigrationEventContract;
+use Illuminate\Database\Migrations\Migration;
abstract class MigrationEvent implements MigrationEventContract
{
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Events/NoPendingMigrations.php b/vendor/laravel/framework/src/Illuminate/Database/Events/NoPendingMigrations.php
new file mode 100644
index 000000000..100f78667
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Database/Events/NoPendingMigrations.php
@@ -0,0 +1,24 @@
+method = $method;
+ }
+}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Grammar.php b/vendor/laravel/framework/src/Illuminate/Database/Grammar.php
index 385256532..cc1e0b946 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Grammar.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Grammar.php
@@ -2,8 +2,8 @@
namespace Illuminate\Database;
-use Illuminate\Support\Traits\Macroable;
use Illuminate\Database\Query\Expression;
+use Illuminate\Support\Traits\Macroable;
abstract class Grammar
{
@@ -46,7 +46,7 @@ abstract class Grammar
* Wrap a value in keyword identifiers.
*
* @param \Illuminate\Database\Query\Expression|string $value
- * @param bool $prefixAlias
+ * @param bool $prefixAlias
* @return string
*/
public function wrap($value, $prefixAlias = false)
@@ -83,9 +83,7 @@ abstract class Grammar
$segments[1] = $this->tablePrefix.$segments[1];
}
- return $this->wrap(
- $segments[0]).' as '.$this->wrapValue($segments[1]
- );
+ return $this->wrap($segments[0]).' as '.$this->wrapValue($segments[1]);
}
/**
@@ -121,7 +119,7 @@ abstract class Grammar
/**
* Convert an array of column names into a delimited string.
*
- * @param array $columns
+ * @param array $columns
* @return string
*/
public function columnize(array $columns)
@@ -132,7 +130,7 @@ abstract class Grammar
/**
* Create query parameter place-holders for an array.
*
- * @param array $values
+ * @param array $values
* @return string
*/
public function parameterize(array $values)
@@ -143,7 +141,7 @@ abstract class Grammar
/**
* Get the appropriate query parameter place-holder for a value.
*
- * @param mixed $value
+ * @param mixed $value
* @return string
*/
public function parameter($value)
diff --git a/vendor/laravel/framework/src/Illuminate/Database/MigrationServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Database/MigrationServiceProvider.php
index 212827c7d..9b1f355d1 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/MigrationServiceProvider.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/MigrationServiceProvider.php
@@ -2,14 +2,38 @@
namespace Illuminate\Database;
-use Illuminate\Support\ServiceProvider;
-use Illuminate\Database\Migrations\Migrator;
use Illuminate\Contracts\Support\DeferrableProvider;
-use Illuminate\Database\Migrations\MigrationCreator;
+use Illuminate\Database\Console\Migrations\FreshCommand;
+use Illuminate\Database\Console\Migrations\InstallCommand;
+use Illuminate\Database\Console\Migrations\MigrateCommand;
+use Illuminate\Database\Console\Migrations\MigrateMakeCommand;
+use Illuminate\Database\Console\Migrations\RefreshCommand;
+use Illuminate\Database\Console\Migrations\ResetCommand;
+use Illuminate\Database\Console\Migrations\RollbackCommand;
+use Illuminate\Database\Console\Migrations\StatusCommand;
use Illuminate\Database\Migrations\DatabaseMigrationRepository;
+use Illuminate\Database\Migrations\MigrationCreator;
+use Illuminate\Database\Migrations\Migrator;
+use Illuminate\Support\ServiceProvider;
class MigrationServiceProvider extends ServiceProvider implements DeferrableProvider
{
+ /**
+ * The commands to be registered.
+ *
+ * @var array
+ */
+ protected $commands = [
+ 'Migrate' => 'command.migrate',
+ 'MigrateFresh' => 'command.migrate.fresh',
+ 'MigrateInstall' => 'command.migrate.install',
+ 'MigrateRefresh' => 'command.migrate.refresh',
+ 'MigrateReset' => 'command.migrate.reset',
+ 'MigrateRollback' => 'command.migrate.rollback',
+ 'MigrateStatus' => 'command.migrate.status',
+ 'MigrateMake' => 'command.migrate.make',
+ ];
+
/**
* Register the service provider.
*
@@ -22,6 +46,8 @@ class MigrationServiceProvider extends ServiceProvider implements DeferrableProv
$this->registerMigrator();
$this->registerCreator();
+
+ $this->registerCommands($this->commands);
}
/**
@@ -63,7 +89,125 @@ class MigrationServiceProvider extends ServiceProvider implements DeferrableProv
protected function registerCreator()
{
$this->app->singleton('migration.creator', function ($app) {
- return new MigrationCreator($app['files']);
+ return new MigrationCreator($app['files'], $app->basePath('stubs'));
+ });
+ }
+
+ /**
+ * Register the given commands.
+ *
+ * @param array $commands
+ * @return void
+ */
+ protected function registerCommands(array $commands)
+ {
+ foreach (array_keys($commands) as $command) {
+ $this->{"register{$command}Command"}();
+ }
+
+ $this->commands(array_values($commands));
+ }
+
+ /**
+ * Register the command.
+ *
+ * @return void
+ */
+ protected function registerMigrateCommand()
+ {
+ $this->app->singleton('command.migrate', function ($app) {
+ return new MigrateCommand($app['migrator']);
+ });
+ }
+
+ /**
+ * Register the command.
+ *
+ * @return void
+ */
+ protected function registerMigrateFreshCommand()
+ {
+ $this->app->singleton('command.migrate.fresh', function () {
+ return new FreshCommand;
+ });
+ }
+
+ /**
+ * Register the command.
+ *
+ * @return void
+ */
+ protected function registerMigrateInstallCommand()
+ {
+ $this->app->singleton('command.migrate.install', function ($app) {
+ return new InstallCommand($app['migration.repository']);
+ });
+ }
+
+ /**
+ * Register the command.
+ *
+ * @return void
+ */
+ protected function registerMigrateMakeCommand()
+ {
+ $this->app->singleton('command.migrate.make', function ($app) {
+ // Once we have the migration creator registered, we will create the command
+ // and inject the creator. The creator is responsible for the actual file
+ // creation of the migrations, and may be extended by these developers.
+ $creator = $app['migration.creator'];
+
+ $composer = $app['composer'];
+
+ return new MigrateMakeCommand($creator, $composer);
+ });
+ }
+
+ /**
+ * Register the command.
+ *
+ * @return void
+ */
+ protected function registerMigrateRefreshCommand()
+ {
+ $this->app->singleton('command.migrate.refresh', function () {
+ return new RefreshCommand;
+ });
+ }
+
+ /**
+ * Register the command.
+ *
+ * @return void
+ */
+ protected function registerMigrateResetCommand()
+ {
+ $this->app->singleton('command.migrate.reset', function ($app) {
+ return new ResetCommand($app['migrator']);
+ });
+ }
+
+ /**
+ * Register the command.
+ *
+ * @return void
+ */
+ protected function registerMigrateRollbackCommand()
+ {
+ $this->app->singleton('command.migrate.rollback', function ($app) {
+ return new RollbackCommand($app['migrator']);
+ });
+ }
+
+ /**
+ * Register the command.
+ *
+ * @return void
+ */
+ protected function registerMigrateStatusCommand()
+ {
+ $this->app->singleton('command.migrate.status', function ($app) {
+ return new StatusCommand($app['migrator']);
});
}
@@ -74,8 +218,8 @@ class MigrationServiceProvider extends ServiceProvider implements DeferrableProv
*/
public function provides()
{
- return [
+ return array_merge([
'migrator', 'migration.repository', 'migration.creator',
- ];
+ ], array_values($this->commands));
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Migrations/MigrationCreator.php b/vendor/laravel/framework/src/Illuminate/Database/Migrations/MigrationCreator.php
index 015a0ddef..fca9ed81b 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Migrations/MigrationCreator.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Migrations/MigrationCreator.php
@@ -3,9 +3,9 @@
namespace Illuminate\Database\Migrations;
use Closure;
+use Illuminate\Filesystem\Filesystem;
use Illuminate\Support\Str;
use InvalidArgumentException;
-use Illuminate\Filesystem\Filesystem;
class MigrationCreator
{
@@ -16,6 +16,13 @@ class MigrationCreator
*/
protected $files;
+ /**
+ * The custom app stubs directory.
+ *
+ * @var string
+ */
+ protected $customStubPath;
+
/**
* The registered post create hooks.
*
@@ -27,11 +34,13 @@ class MigrationCreator
* Create a new migration creator instance.
*
* @param \Illuminate\Filesystem\Filesystem $files
+ * @param string $customStubPath
* @return void
*/
- public function __construct(Filesystem $files)
+ public function __construct(Filesystem $files, $customStubPath)
{
$this->files = $files;
+ $this->customStubPath = $customStubPath;
}
/**
@@ -40,14 +49,14 @@ class MigrationCreator
* @param string $name
* @param string $path
* @param string|null $table
- * @param bool $create
+ * @param bool $create
* @return string
*
* @throws \Exception
*/
public function create($name, $path, $table = null, $create = false)
{
- $this->ensureMigrationDoesntAlreadyExist($name);
+ $this->ensureMigrationDoesntAlreadyExist($name, $path);
// First we will get the stub file for the migration, which serves as a type
// of template for the migration. Once we have those we will populate the
@@ -71,12 +80,21 @@ class MigrationCreator
* Ensure that a migration with the given name doesn't already exist.
*
* @param string $name
+ * @param string $migrationPath
* @return void
*
* @throws \InvalidArgumentException
*/
- protected function ensureMigrationDoesntAlreadyExist($name)
+ protected function ensureMigrationDoesntAlreadyExist($name, $migrationPath = null)
{
+ if (! empty($migrationPath)) {
+ $migrationFiles = $this->files->glob($migrationPath.'/*.php');
+
+ foreach ($migrationFiles as $migrationFile) {
+ $this->files->requireOnce($migrationFile);
+ }
+ }
+
if (class_exists($className = $this->getClassName($name))) {
throw new InvalidArgumentException("A {$className} class already exists.");
}
@@ -86,21 +104,26 @@ class MigrationCreator
* Get the migration stub file.
*
* @param string|null $table
- * @param bool $create
+ * @param bool $create
* @return string
*/
protected function getStub($table, $create)
{
if (is_null($table)) {
- return $this->files->get($this->stubPath().'/blank.stub');
+ $stub = $this->files->exists($customPath = $this->customStubPath.'/migration.stub')
+ ? $customPath
+ : $this->stubPath().'/migration.stub';
+ } elseif ($create) {
+ $stub = $this->files->exists($customPath = $this->customStubPath.'/migration.create.stub')
+ ? $customPath
+ : $this->stubPath().'/migration.create.stub';
+ } else {
+ $stub = $this->files->exists($customPath = $this->customStubPath.'/migration.update.stub')
+ ? $customPath
+ : $this->stubPath().'/migration.update.stub';
}
- // We also have stubs for creating new tables and modifying existing tables
- // to save the developer some typing when they are creating a new tables
- // or modifying existing tables. We'll grab the appropriate stub here.
- $stub = $create ? 'create.stub' : 'update.stub';
-
- return $this->files->get($this->stubPath()."/{$stub}");
+ return $this->files->get($stub);
}
/**
@@ -113,13 +136,19 @@ class MigrationCreator
*/
protected function populateStub($name, $stub, $table)
{
- $stub = str_replace('DummyClass', $this->getClassName($name), $stub);
+ $stub = str_replace(
+ ['DummyClass', '{{ class }}', '{{class}}'],
+ $this->getClassName($name), $stub
+ );
// Here we will replace the table place-holders with the table specified by
// the developer, which is useful for quickly creating a tables creation
// or update migration from the console instead of typing it manually.
if (! is_null($table)) {
- $stub = str_replace('DummyTable', $table, $stub);
+ $stub = str_replace(
+ ['DummyTable', '{{ table }}', '{{table}}'],
+ $table, $stub
+ );
}
return $stub;
@@ -157,7 +186,7 @@ class MigrationCreator
protected function firePostCreateHooks($table)
{
foreach ($this->postCreate as $callback) {
- call_user_func($callback, $table);
+ $callback($table);
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php b/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php
index 2bf3a15d1..d334e0b56 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php
@@ -2,17 +2,18 @@
namespace Illuminate\Database\Migrations;
-use Illuminate\Support\Arr;
-use Illuminate\Support\Str;
-use Illuminate\Support\Collection;
-use Illuminate\Console\OutputStyle;
-use Illuminate\Filesystem\Filesystem;
use Illuminate\Contracts\Events\Dispatcher;
+use Illuminate\Database\ConnectionResolverInterface as Resolver;
use Illuminate\Database\Events\MigrationEnded;
use Illuminate\Database\Events\MigrationsEnded;
-use Illuminate\Database\Events\MigrationStarted;
use Illuminate\Database\Events\MigrationsStarted;
-use Illuminate\Database\ConnectionResolverInterface as Resolver;
+use Illuminate\Database\Events\MigrationStarted;
+use Illuminate\Database\Events\NoPendingMigrations;
+use Illuminate\Filesystem\Filesystem;
+use Illuminate\Support\Arr;
+use Illuminate\Support\Collection;
+use Illuminate\Support\Str;
+use Symfony\Component\Console\Output\OutputInterface;
class Migrator
{
@@ -61,7 +62,7 @@ class Migrator
/**
* The output interface implementation.
*
- * @var \Illuminate\Console\OutputStyle
+ * @var \Symfony\Component\Console\Output\OutputInterface
*/
protected $output;
@@ -139,6 +140,8 @@ class Migrator
// aren't, we will just make a note of it to the developer so they're aware
// that all of the migrations have been run against this database system.
if (count($migrations) === 0) {
+ $this->fireMigrationEvent(new NoPendingMigrations('up'));
+
$this->note('Nothing to migrate.');
return;
@@ -173,8 +176,8 @@ class Migrator
* Run "up" a migration instance.
*
* @param string $file
- * @param int $batch
- * @param bool $pretend
+ * @param int $batch
+ * @param bool $pretend
* @return void
*/
protected function runUp($file, $batch, $pretend)
@@ -209,7 +212,7 @@ class Migrator
/**
* Rollback the last migration operation.
*
- * @param array|string $paths
+ * @param array|string $paths
* @param array $options
* @return array
*/
@@ -221,6 +224,8 @@ class Migrator
$migrations = $this->getMigrationsForRollback($options);
if (count($migrations) === 0) {
+ $this->fireMigrationEvent(new NoPendingMigrations('down'));
+
$this->note('Nothing to rollback.');
return [];
@@ -288,7 +293,7 @@ class Migrator
/**
* Rolls all of the currently applied migrations back.
*
- * @param array|string $paths
+ * @param array|string $paths
* @param bool $pretend
* @return array
*/
@@ -335,7 +340,7 @@ class Migrator
*
* @param string $file
* @param object $migration
- * @param bool $pretend
+ * @param bool $pretend
* @return void
*/
protected function runDown($file, $migration, $pretend)
@@ -458,17 +463,17 @@ class Migrator
{
return Collection::make($paths)->flatMap(function ($path) {
return Str::endsWith($path, '.php') ? [$path] : $this->files->glob($path.'/*_*.php');
- })->filter()->sortBy(function ($file) {
- return $this->getMigrationName($file);
- })->values()->keyBy(function ($file) {
+ })->filter()->values()->keyBy(function ($file) {
return $this->getMigrationName($file);
+ })->sortBy(function ($file, $key) {
+ return $key;
})->all();
}
/**
* Require in all the migration files in a given path.
*
- * @param array $files
+ * @param array $files
* @return void
*/
public function requireFiles(array $files)
@@ -520,6 +525,24 @@ class Migrator
return $this->connection;
}
+ /**
+ * Execute the given callback using the given connection as the default connection.
+ *
+ * @param string $name
+ * @param callable $callback
+ * @return mixed
+ */
+ public function usingConnection($name, callable $callback)
+ {
+ $previousConnection = $this->resolver->getDefaultConnection();
+
+ $this->setConnection($name);
+
+ return tap($callback(), function () use ($previousConnection) {
+ $this->setConnection($previousConnection);
+ });
+ }
+
/**
* Set the default connection name.
*
@@ -598,10 +621,10 @@ class Migrator
/**
* Set the output implementation that should be used by the console.
*
- * @param \Illuminate\Console\OutputStyle $output
+ * @param \Symfony\Component\Console\Output\OutputInterface $output
* @return $this
*/
- public function setOutput(OutputStyle $output)
+ public function setOutput(OutputInterface $output)
{
$this->output = $output;
@@ -624,7 +647,7 @@ class Migrator
/**
* Fire the given event for the migration.
*
- * @param \Illuminate\Contracts\Database\Events\MigrationEvent $event
+ * @param \Illuminate\Contracts\Database\Events\MigrationEvent $event
* @return void
*/
public function fireMigrationEvent($event)
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Migrations/stubs/blank.stub b/vendor/laravel/framework/src/Illuminate/Database/Migrations/stubs/blank.stub
deleted file mode 100755
index da4ce827a..000000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Migrations/stubs/blank.stub
+++ /dev/null
@@ -1,28 +0,0 @@
-bigIncrements('id');
- $table->timestamps();
- });
- }
-
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('DummyTable');
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Migrations/stubs/migration.create.stub b/vendor/laravel/framework/src/Illuminate/Database/Migrations/stubs/migration.create.stub
new file mode 100755
index 000000000..f4a56a077
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Database/Migrations/stubs/migration.create.stub
@@ -0,0 +1,31 @@
+id();
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('{{ table }}');
+ }
+}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Migrations/stubs/migration.stub b/vendor/laravel/framework/src/Illuminate/Database/Migrations/stubs/migration.stub
new file mode 100755
index 000000000..fd0e43785
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Database/Migrations/stubs/migration.stub
@@ -0,0 +1,28 @@
+ $value) {
- $statement->bindValue(
- is_string($key) ? $key : $key + 1, $value,
- is_int($value) || is_float($value) ? PDO::PARAM_INT : PDO::PARAM_STR
- );
- }
- }
}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/PostgresConnection.php b/vendor/laravel/framework/src/Illuminate/Database/PostgresConnection.php
index 01804a7b8..fe65376ca 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/PostgresConnection.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/PostgresConnection.php
@@ -2,14 +2,41 @@
namespace Illuminate\Database;
-use Illuminate\Database\Schema\PostgresBuilder;
use Doctrine\DBAL\Driver\PDOPgSql\Driver as DoctrineDriver;
-use Illuminate\Database\Query\Processors\PostgresProcessor;
use Illuminate\Database\Query\Grammars\PostgresGrammar as QueryGrammar;
+use Illuminate\Database\Query\Processors\PostgresProcessor;
use Illuminate\Database\Schema\Grammars\PostgresGrammar as SchemaGrammar;
+use Illuminate\Database\Schema\PostgresBuilder;
+use PDO;
class PostgresConnection extends Connection
{
+ /**
+ * Bind values to their parameters in the given statement.
+ *
+ * @param \PDOStatement $statement
+ * @param array $bindings
+ * @return void
+ */
+ public function bindValues($statement, $bindings)
+ {
+ foreach ($bindings as $key => $value) {
+ if (is_int($value)) {
+ $pdoParam = PDO::PARAM_INT;
+ } elseif (is_resource($value)) {
+ $pdoParam = PDO::PARAM_LOB;
+ } else {
+ $pdoParam = PDO::PARAM_STR;
+ }
+
+ $statement->bindValue(
+ is_string($key) ? $key : $key + 1,
+ $value,
+ $pdoParam
+ );
+ }
+ }
+
/**
* Get the default query grammar instance.
*
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php
index 9d2cea5a3..b9034c27e 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php
@@ -3,21 +3,23 @@
namespace Illuminate\Database\Query;
use Closure;
-use RuntimeException;
use DateTimeInterface;
-use Illuminate\Support\Arr;
-use Illuminate\Support\Str;
-use InvalidArgumentException;
-use Illuminate\Support\Collection;
-use Illuminate\Pagination\Paginator;
-use Illuminate\Support\Traits\Macroable;
use Illuminate\Contracts\Support\Arrayable;
-use Illuminate\Database\ConnectionInterface;
-use Illuminate\Support\Traits\ForwardsCalls;
use Illuminate\Database\Concerns\BuildsQueries;
+use Illuminate\Database\ConnectionInterface;
+use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
+use Illuminate\Database\Eloquent\Relations\Relation;
use Illuminate\Database\Query\Grammars\Grammar;
use Illuminate\Database\Query\Processors\Processor;
-use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
+use Illuminate\Pagination\Paginator;
+use Illuminate\Support\Arr;
+use Illuminate\Support\Collection;
+use Illuminate\Support\LazyCollection;
+use Illuminate\Support\Str;
+use Illuminate\Support\Traits\ForwardsCalls;
+use Illuminate\Support\Traits\Macroable;
+use InvalidArgumentException;
+use RuntimeException;
class Builder
{
@@ -53,12 +55,14 @@ class Builder
*/
public $bindings = [
'select' => [],
- 'from' => [],
- 'join' => [],
- 'where' => [],
+ 'from' => [],
+ 'join' => [],
+ 'where' => [],
+ 'groupBy' => [],
'having' => [],
- 'order' => [],
- 'union' => [],
+ 'order' => [],
+ 'union' => [],
+ 'unionOrder' => [],
];
/**
@@ -78,7 +82,9 @@ class Builder
/**
* Indicates if the query returns distinct results.
*
- * @var bool
+ * Occasionally contains the columns that should be distinct.
+ *
+ * @var bool|array
*/
public $distinct = false;
@@ -219,7 +225,17 @@ class Builder
*/
public function select($columns = ['*'])
{
- $this->columns = is_array($columns) ? $columns : func_get_args();
+ $this->columns = [];
+ $this->bindings['select'] = [];
+ $columns = is_array($columns) ? $columns : func_get_args();
+
+ foreach ($columns as $as => $column) {
+ if (is_string($as) && $this->isQueryable($column)) {
+ $this->selectSub($column, $as);
+ } else {
+ $this->columns[] = $column;
+ }
+ }
return $this;
}
@@ -227,9 +243,9 @@ class Builder
/**
* Add a subselect expression to the query.
*
- * @param \Closure|\Illuminate\Database\Query\Builder|string $query
+ * @param \Closure|$this|string $query
* @param string $as
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*
* @throws \InvalidArgumentException
*/
@@ -246,8 +262,8 @@ class Builder
* Add a new "raw" select expression to the query.
*
* @param string $expression
- * @param array $bindings
- * @return \Illuminate\Database\Query\Builder|static
+ * @param array $bindings
+ * @return $this
*/
public function selectRaw($expression, array $bindings = [])
{
@@ -263,9 +279,9 @@ class Builder
/**
* Makes "from" fetch from a subquery.
*
- * @param \Closure|\Illuminate\Database\Query\Builder|string $query
+ * @param \Closure|\Illuminate\Database\Query\Builder|string $query
* @param string $as
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*
* @throws \InvalidArgumentException
*/
@@ -280,8 +296,8 @@ class Builder
* Add a raw from clause to the query.
*
* @param string $expression
- * @param mixed $bindings
- * @return \Illuminate\Database\Query\Builder|static
+ * @param mixed $bindings
+ * @return $this
*/
public function fromRaw($expression, $bindings = [])
{
@@ -295,7 +311,7 @@ class Builder
/**
* Creates a subquery and parse it.
*
- * @param \Closure|\Illuminate\Database\Query\Builder|string $query
+ * @param \Closure|\Illuminate\Database\Query\Builder|string $query
* @return array
*/
protected function createSub($query)
@@ -317,15 +333,19 @@ class Builder
*
* @param mixed $query
* @return array
+ *
+ * @throws \InvalidArgumentException
*/
protected function parseSub($query)
{
- if ($query instanceof self || $query instanceof EloquentBuilder) {
+ if ($query instanceof self || $query instanceof EloquentBuilder || $query instanceof Relation) {
return [$query->toSql(), $query->getBindings()];
} elseif (is_string($query)) {
return [$query, []];
} else {
- throw new InvalidArgumentException;
+ throw new InvalidArgumentException(
+ 'A subquery must be a query builder instance, a Closure, or a string.'
+ );
}
}
@@ -337,9 +357,19 @@ class Builder
*/
public function addSelect($column)
{
- $column = is_array($column) ? $column : func_get_args();
+ $columns = is_array($column) ? $column : func_get_args();
- $this->columns = array_merge((array) $this->columns, $column);
+ foreach ($columns as $as => $column) {
+ if (is_string($as) && $this->isQueryable($column)) {
+ if (is_null($this->columns)) {
+ $this->select($this->from.'.*');
+ }
+
+ $this->selectSub($column, $as);
+ } else {
+ $this->columns[] = $column;
+ }
+ }
return $this;
}
@@ -351,7 +381,13 @@ class Builder
*/
public function distinct()
{
- $this->distinct = true;
+ $columns = func_get_args();
+
+ if (count($columns) > 0) {
+ $this->distinct = is_array($columns[0]) || is_bool($columns[0]) ? $columns[0] : $columns;
+ } else {
+ $this->distinct = true;
+ }
return $this;
}
@@ -359,12 +395,17 @@ class Builder
/**
* Set the table which the query is targeting.
*
- * @param string $table
+ * @param \Closure|\Illuminate\Database\Query\Builder|string $table
+ * @param string|null $as
* @return $this
*/
- public function from($table)
+ public function from($table, $as = null)
{
- $this->from = $table;
+ if ($this->isQueryable($table)) {
+ return $this->fromSub($table, $as);
+ }
+
+ $this->from = $as ? "{$table} as {$as}" : $table;
return $this;
}
@@ -377,7 +418,7 @@ class Builder
* @param string|null $operator
* @param string|null $second
* @param string $type
- * @param bool $where
+ * @param bool $where
* @return $this
*/
public function join($table, $first, $operator = null, $second = null, $type = 'inner', $where = false)
@@ -388,7 +429,7 @@ class Builder
// is trying to build a join with a complex "on" clause containing more than
// one condition, so we'll add the join and call a Closure with the query.
if ($first instanceof Closure) {
- call_user_func($first, $join);
+ $first($join);
$this->joins[] = $join;
@@ -417,7 +458,7 @@ class Builder
* @param string $operator
* @param string $second
* @param string $type
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*/
public function joinWhere($table, $first, $operator, $second, $type = 'inner')
{
@@ -427,14 +468,14 @@ class Builder
/**
* Add a subquery join clause to the query.
*
- * @param \Closure|\Illuminate\Database\Query\Builder|string $query
+ * @param \Closure|\Illuminate\Database\Query\Builder|string $query
* @param string $as
* @param \Closure|string $first
* @param string|null $operator
* @param string|null $second
* @param string $type
- * @param bool $where
- * @return \Illuminate\Database\Query\Builder|static
+ * @param bool $where
+ * @return $this
*
* @throws \InvalidArgumentException
*/
@@ -456,7 +497,7 @@ class Builder
* @param \Closure|string $first
* @param string|null $operator
* @param string|null $second
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*/
public function leftJoin($table, $first, $operator = null, $second = null)
{
@@ -470,7 +511,7 @@ class Builder
* @param \Closure|string $first
* @param string $operator
* @param string $second
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*/
public function leftJoinWhere($table, $first, $operator, $second)
{
@@ -480,12 +521,12 @@ class Builder
/**
* Add a subquery left join to the query.
*
- * @param \Closure|\Illuminate\Database\Query\Builder|string $query
+ * @param \Closure|\Illuminate\Database\Query\Builder|string $query
* @param string $as
* @param \Closure|string $first
* @param string|null $operator
* @param string|null $second
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*/
public function leftJoinSub($query, $as, $first, $operator = null, $second = null)
{
@@ -499,7 +540,7 @@ class Builder
* @param \Closure|string $first
* @param string|null $operator
* @param string|null $second
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*/
public function rightJoin($table, $first, $operator = null, $second = null)
{
@@ -513,7 +554,7 @@ class Builder
* @param \Closure|string $first
* @param string $operator
* @param string $second
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*/
public function rightJoinWhere($table, $first, $operator, $second)
{
@@ -523,12 +564,12 @@ class Builder
/**
* Add a subquery right join to the query.
*
- * @param \Closure|\Illuminate\Database\Query\Builder|string $query
+ * @param \Closure|\Illuminate\Database\Query\Builder|string $query
* @param string $as
* @param \Closure|string $first
* @param string|null $operator
* @param string|null $second
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*/
public function rightJoinSub($query, $as, $first, $operator = null, $second = null)
{
@@ -542,7 +583,7 @@ class Builder
* @param \Closure|string|null $first
* @param string|null $operator
* @param string|null $second
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*/
public function crossJoin($table, $first = null, $operator = null, $second = null)
{
@@ -558,7 +599,7 @@ class Builder
/**
* Get a new join clause.
*
- * @param \Illuminate\Database\Query\Builder $parentQuery
+ * @param \Illuminate\Database\Query\Builder $parentQuery
* @param string $type
* @param string $table
* @return \Illuminate\Database\Query\JoinClause
@@ -587,9 +628,9 @@ class Builder
/**
* Add a basic where clause to the query.
*
- * @param string|array|\Closure $column
- * @param mixed $operator
- * @param mixed $value
+ * @param \Closure|string|array $column
+ * @param mixed $operator
+ * @param mixed $value
* @param string $boolean
* @return $this
*/
@@ -612,10 +653,20 @@ class Builder
// If the columns is actually a Closure instance, we will assume the developer
// wants to begin a nested where statement which is wrapped in parenthesis.
// We'll add that Closure to the query then return back out immediately.
- if ($column instanceof Closure) {
+ if ($column instanceof Closure && is_null($operator)) {
return $this->whereNested($column, $boolean);
}
+ // If the column is a Closure instance and there is an operator value, we will
+ // assume the developer wants to run a subquery and then compare the result
+ // of that subquery with the given value that was provided to the method.
+ if ($this->isQueryable($column) && ! is_null($operator)) {
+ [$sub, $bindings] = $this->createSub($column);
+
+ return $this->addBinding($bindings, 'where')
+ ->where(new Expression('('.$sub.')'), $operator, $value, $boolean);
+ }
+
// If the given operator is not found in the list of valid operators we will
// assume that the developer is just short-cutting the '=' operators and
// we will set the operators to '=' and set the values appropriately.
@@ -736,10 +787,10 @@ class Builder
/**
* Add an "or where" clause to the query.
*
- * @param string|array|\Closure $column
+ * @param \Closure|string|array $column
* @param mixed $operator
* @param mixed $value
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*/
public function orWhere($column, $operator = null, $value = null)
{
@@ -757,7 +808,7 @@ class Builder
* @param string|null $operator
* @param string|null $second
* @param string|null $boolean
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*/
public function whereColumn($first, $operator = null, $second = null, $boolean = 'and')
{
@@ -793,7 +844,7 @@ class Builder
* @param string|array $first
* @param string|null $operator
* @param string|null $second
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*/
public function orWhereColumn($first, $operator = null, $second = null)
{
@@ -804,7 +855,7 @@ class Builder
* Add a raw where clause to the query.
*
* @param string $sql
- * @param mixed $bindings
+ * @param mixed $bindings
* @param string $boolean
* @return $this
*/
@@ -821,8 +872,8 @@ class Builder
* Add a raw or where clause to the query.
*
* @param string $sql
- * @param mixed $bindings
- * @return \Illuminate\Database\Query\Builder|static
+ * @param mixed $bindings
+ * @return $this
*/
public function orWhereRaw($sql, $bindings = [])
{
@@ -833,9 +884,9 @@ class Builder
* Add a "where in" clause to the query.
*
* @param string $column
- * @param mixed $values
+ * @param mixed $values
* @param string $boolean
- * @param bool $not
+ * @param bool $not
* @return $this
*/
public function whereIn($column, $values, $boolean = 'and', $not = false)
@@ -845,9 +896,7 @@ class Builder
// If the value is a query builder instance we will assume the developer wants to
// look for any values that exists within this given query. So we will add the
// query accordingly so that this query is properly executed when it is run.
- if ($values instanceof self ||
- $values instanceof EloquentBuilder ||
- $values instanceof Closure) {
+ if ($this->isQueryable($values)) {
[$query, $bindings] = $this->createSub($values);
$values = [new Expression($query)];
@@ -876,8 +925,8 @@ class Builder
* Add an "or where in" clause to the query.
*
* @param string $column
- * @param mixed $values
- * @return \Illuminate\Database\Query\Builder|static
+ * @param mixed $values
+ * @return $this
*/
public function orWhereIn($column, $values)
{
@@ -888,9 +937,9 @@ class Builder
* Add a "where not in" clause to the query.
*
* @param string $column
- * @param mixed $values
+ * @param mixed $values
* @param string $boolean
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*/
public function whereNotIn($column, $values, $boolean = 'and')
{
@@ -901,59 +950,14 @@ class Builder
* Add an "or where not in" clause to the query.
*
* @param string $column
- * @param mixed $values
- * @return \Illuminate\Database\Query\Builder|static
+ * @param mixed $values
+ * @return $this
*/
public function orWhereNotIn($column, $values)
{
return $this->whereNotIn($column, $values, 'or');
}
- /**
- * Add a where in with a sub-select to the query.
- *
- * @param string $column
- * @param \Closure $callback
- * @param string $boolean
- * @param bool $not
- * @return $this
- */
- protected function whereInSub($column, Closure $callback, $boolean, $not)
- {
- $type = $not ? 'NotInSub' : 'InSub';
-
- // To create the exists sub-select, we will actually create a query and call the
- // provided callback with the query so the developer may set any of the query
- // conditions they want for the in clause, then we'll put it in this array.
- call_user_func($callback, $query = $this->forSubQuery());
-
- $this->wheres[] = compact('type', 'column', 'query', 'boolean');
-
- $this->addBinding($query->getBindings(), 'where');
-
- return $this;
- }
-
- /**
- * Add an external sub-select to the query.
- *
- * @param string $column
- * @param \Illuminate\Database\Query\Builder|static $query
- * @param string $boolean
- * @param bool $not
- * @return $this
- */
- protected function whereInExistingQuery($column, $query, $boolean, $not)
- {
- $type = $not ? 'NotInSub' : 'InSub';
-
- $this->wheres[] = compact('type', 'column', 'query', 'boolean');
-
- $this->addBinding($query->getBindings(), 'where');
-
- return $this;
- }
-
/**
* Add a "where in raw" clause for integer values to the query.
*
@@ -980,6 +984,18 @@ class Builder
return $this;
}
+ /**
+ * Add an "or where in raw" clause for integer values to the query.
+ *
+ * @param string $column
+ * @param \Illuminate\Contracts\Support\Arrayable|array $values
+ * @return $this
+ */
+ public function orWhereIntegerInRaw($column, $values)
+ {
+ return $this->whereIntegerInRaw($column, $values, 'or');
+ }
+
/**
* Add a "where not in raw" clause for integer values to the query.
*
@@ -993,12 +1009,24 @@ class Builder
return $this->whereIntegerInRaw($column, $values, $boolean, true);
}
+ /**
+ * Add an "or where not in raw" clause for integer values to the query.
+ *
+ * @param string $column
+ * @param \Illuminate\Contracts\Support\Arrayable|array $values
+ * @return $this
+ */
+ public function orWhereIntegerNotInRaw($column, $values)
+ {
+ return $this->whereIntegerNotInRaw($column, $values, 'or');
+ }
+
/**
* Add a "where null" clause to the query.
*
* @param string|array $columns
* @param string $boolean
- * @param bool $not
+ * @param bool $not
* @return $this
*/
public function whereNull($columns, $boolean = 'and', $not = false)
@@ -1016,7 +1044,7 @@ class Builder
* Add an "or where null" clause to the query.
*
* @param string $column
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*/
public function orWhereNull($column)
{
@@ -1026,20 +1054,20 @@ class Builder
/**
* Add a "where not null" clause to the query.
*
- * @param string $column
+ * @param string|array $columns
* @param string $boolean
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*/
- public function whereNotNull($column, $boolean = 'and')
+ public function whereNotNull($columns, $boolean = 'and')
{
- return $this->whereNull($column, $boolean, true);
+ return $this->whereNull($columns, $boolean, true);
}
/**
* Add a where between statement to the query.
*
* @param string $column
- * @param array $values
+ * @param array $values
* @param string $boolean
* @param bool $not
* @return $this
@@ -1055,48 +1083,103 @@ class Builder
return $this;
}
+ /**
+ * Add a where between statement using columns to the query.
+ *
+ * @param string $column
+ * @param array $values
+ * @param string $boolean
+ * @param bool $not
+ * @return $this
+ */
+ public function whereBetweenColumns($column, array $values, $boolean = 'and', $not = false)
+ {
+ $type = 'betweenColumns';
+
+ $this->wheres[] = compact('type', 'column', 'values', 'boolean', 'not');
+
+ return $this;
+ }
+
/**
* Add an or where between statement to the query.
*
* @param string $column
- * @param array $values
- * @return \Illuminate\Database\Query\Builder|static
+ * @param array $values
+ * @return $this
*/
public function orWhereBetween($column, array $values)
{
return $this->whereBetween($column, $values, 'or');
}
+ /**
+ * Add an or where between statement using columns to the query.
+ *
+ * @param string $column
+ * @param array $values
+ * @return $this
+ */
+ public function orWhereBetweenColumns($column, array $values)
+ {
+ return $this->whereBetweenColumns($column, $values, 'or');
+ }
+
/**
* Add a where not between statement to the query.
*
* @param string $column
- * @param array $values
+ * @param array $values
* @param string $boolean
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*/
public function whereNotBetween($column, array $values, $boolean = 'and')
{
return $this->whereBetween($column, $values, $boolean, true);
}
+ /**
+ * Add a where not between statement using columns to the query.
+ *
+ * @param string $column
+ * @param array $values
+ * @param string $boolean
+ * @return $this
+ */
+ public function whereNotBetweenColumns($column, array $values, $boolean = 'and')
+ {
+ return $this->whereBetweenColumns($column, $values, $boolean, true);
+ }
+
/**
* Add an or where not between statement to the query.
*
* @param string $column
- * @param array $values
- * @return \Illuminate\Database\Query\Builder|static
+ * @param array $values
+ * @return $this
*/
public function orWhereNotBetween($column, array $values)
{
return $this->whereNotBetween($column, $values, 'or');
}
+ /**
+ * Add an or where not between statement using columns to the query.
+ *
+ * @param string $column
+ * @param array $values
+ * @return $this
+ */
+ public function orWhereNotBetweenColumns($column, array $values)
+ {
+ return $this->whereNotBetweenColumns($column, $values, 'or');
+ }
+
/**
* Add an "or where not null" clause to the query.
*
* @param string $column
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*/
public function orWhereNotNull($column)
{
@@ -1110,7 +1193,7 @@ class Builder
* @param string $operator
* @param \DateTimeInterface|string|null $value
* @param string $boolean
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*/
public function whereDate($column, $operator, $value = null, $boolean = 'and')
{
@@ -1131,7 +1214,7 @@ class Builder
* @param string $column
* @param string $operator
* @param \DateTimeInterface|string|null $value
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*/
public function orWhereDate($column, $operator, $value = null)
{
@@ -1146,10 +1229,10 @@ class Builder
* Add a "where time" statement to the query.
*
* @param string $column
- * @param string $operator
+ * @param string $operator
* @param \DateTimeInterface|string|null $value
- * @param string $boolean
- * @return \Illuminate\Database\Query\Builder|static
+ * @param string $boolean
+ * @return $this
*/
public function whereTime($column, $operator, $value = null, $boolean = 'and')
{
@@ -1168,9 +1251,9 @@ class Builder
* Add an "or where time" statement to the query.
*
* @param string $column
- * @param string $operator
+ * @param string $operator
* @param \DateTimeInterface|string|null $value
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*/
public function orWhereTime($column, $operator, $value = null)
{
@@ -1188,7 +1271,7 @@ class Builder
* @param string $operator
* @param \DateTimeInterface|string|null $value
* @param string $boolean
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*/
public function whereDay($column, $operator, $value = null, $boolean = 'and')
{
@@ -1213,7 +1296,7 @@ class Builder
* @param string $column
* @param string $operator
* @param \DateTimeInterface|string|null $value
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*/
public function orWhereDay($column, $operator, $value = null)
{
@@ -1231,7 +1314,7 @@ class Builder
* @param string $operator
* @param \DateTimeInterface|string|null $value
* @param string $boolean
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*/
public function whereMonth($column, $operator, $value = null, $boolean = 'and')
{
@@ -1256,7 +1339,7 @@ class Builder
* @param string $column
* @param string $operator
* @param \DateTimeInterface|string|null $value
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*/
public function orWhereMonth($column, $operator, $value = null)
{
@@ -1274,7 +1357,7 @@ class Builder
* @param string $operator
* @param \DateTimeInterface|string|int|null $value
* @param string $boolean
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*/
public function whereYear($column, $operator, $value = null, $boolean = 'and')
{
@@ -1295,7 +1378,7 @@ class Builder
* @param string $column
* @param string $operator
* @param \DateTimeInterface|string|int|null $value
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*/
public function orWhereYear($column, $operator, $value = null)
{
@@ -1330,9 +1413,9 @@ class Builder
/**
* Add a nested where statement to the query.
*
- * @param \Closure $callback
- * @param string $boolean
- * @return \Illuminate\Database\Query\Builder|static
+ * @param \Closure $callback
+ * @param string $boolean
+ * @return $this
*/
public function whereNested(Closure $callback, $boolean = 'and')
{
@@ -1354,7 +1437,7 @@ class Builder
/**
* Add another query builder as a nested where to the query builder.
*
- * @param \Illuminate\Database\Query\Builder|static $query
+ * @param \Illuminate\Database\Query\Builder $query
* @param string $boolean
* @return $this
*/
@@ -1374,10 +1457,10 @@ class Builder
/**
* Add a full sub-select to the query.
*
- * @param string $column
- * @param string $operator
- * @param \Closure $callback
- * @param string $boolean
+ * @param string $column
+ * @param string $operator
+ * @param \Closure $callback
+ * @param string $boolean
* @return $this
*/
protected function whereSub($column, $operator, Closure $callback, $boolean)
@@ -1401,9 +1484,9 @@ class Builder
/**
* Add an exists clause to the query.
*
- * @param \Closure $callback
- * @param string $boolean
- * @param bool $not
+ * @param \Closure $callback
+ * @param string $boolean
+ * @param bool $not
* @return $this
*/
public function whereExists(Closure $callback, $boolean = 'and', $not = false)
@@ -1421,9 +1504,9 @@ class Builder
/**
* Add an or exists clause to the query.
*
- * @param \Closure $callback
- * @param bool $not
- * @return \Illuminate\Database\Query\Builder|static
+ * @param \Closure $callback
+ * @param bool $not
+ * @return $this
*/
public function orWhereExists(Closure $callback, $not = false)
{
@@ -1433,9 +1516,9 @@ class Builder
/**
* Add a where not exists clause to the query.
*
- * @param \Closure $callback
- * @param string $boolean
- * @return \Illuminate\Database\Query\Builder|static
+ * @param \Closure $callback
+ * @param string $boolean
+ * @return $this
*/
public function whereNotExists(Closure $callback, $boolean = 'and')
{
@@ -1446,7 +1529,7 @@ class Builder
* Add a where not exists clause to the query.
*
* @param \Closure $callback
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*/
public function orWhereNotExists(Closure $callback)
{
@@ -1456,7 +1539,7 @@ class Builder
/**
* Add an exists clause to the query.
*
- * @param \Illuminate\Database\Query\Builder $query
+ * @param \Illuminate\Database\Query\Builder $query
* @param string $boolean
* @param bool $not
* @return $this
@@ -1475,11 +1558,13 @@ class Builder
/**
* Adds a where condition using row values.
*
- * @param array $columns
+ * @param array $columns
* @param string $operator
- * @param array $values
+ * @param array $values
* @param string $boolean
* @return $this
+ *
+ * @throws \InvalidArgumentException
*/
public function whereRowValues($columns, $operator, $values, $boolean = 'and')
{
@@ -1497,11 +1582,11 @@ class Builder
}
/**
- * Adds a or where condition using row values.
+ * Adds an or where condition using row values.
*
- * @param array $columns
+ * @param array $columns
* @param string $operator
- * @param array $values
+ * @param array $values
* @return $this
*/
public function orWhereRowValues($columns, $operator, $values)
@@ -1532,7 +1617,7 @@ class Builder
}
/**
- * Add a "or where JSON contains" clause to the query.
+ * Add an "or where JSON contains" clause to the query.
*
* @param string $column
* @param mixed $value
@@ -1557,7 +1642,7 @@ class Builder
}
/**
- * Add a "or where JSON not contains" clause to the query.
+ * Add an "or where JSON not contains" clause to the query.
*
* @param string $column
* @param mixed $value
@@ -1595,7 +1680,7 @@ class Builder
}
/**
- * Add a "or where JSON length" clause to the query.
+ * Add an "or where JSON length" clause to the query.
*
* @param string $column
* @param mixed $operator
@@ -1659,8 +1744,8 @@ class Builder
*
* @param string $segment
* @param string $connector
- * @param array $parameters
- * @param int $index
+ * @param array $parameters
+ * @param int $index
* @return void
*/
protected function addDynamic($segment, $connector, $parameters, $index)
@@ -1676,7 +1761,7 @@ class Builder
/**
* Add a "group by" clause to the query.
*
- * @param array ...$groups
+ * @param array|string ...$groups
* @return $this
*/
public function groupBy(...$groups)
@@ -1691,6 +1776,22 @@ class Builder
return $this;
}
+ /**
+ * Add a raw groupBy clause to the query.
+ *
+ * @param string $sql
+ * @param array $bindings
+ * @return $this
+ */
+ public function groupByRaw($sql, array $bindings = [])
+ {
+ $this->groups[] = new Expression($sql);
+
+ $this->addBinding($bindings, 'groupBy');
+
+ return $this;
+ }
+
/**
* Add a "having" clause to the query.
*
@@ -1728,12 +1829,12 @@ class Builder
}
/**
- * Add a "or having" clause to the query.
+ * Add an "or having" clause to the query.
*
* @param string $column
* @param string|null $operator
* @param string|null $value
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*/
public function orHaving($column, $operator = null, $value = null)
{
@@ -1751,7 +1852,7 @@ class Builder
* @param array $values
* @param string $boolean
* @param bool $not
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*/
public function havingBetween($column, array $values, $boolean = 'and', $not = false)
{
@@ -1768,7 +1869,7 @@ class Builder
* Add a raw having clause to the query.
*
* @param string $sql
- * @param array $bindings
+ * @param array $bindings
* @param string $boolean
* @return $this
*/
@@ -1787,8 +1888,8 @@ class Builder
* Add a raw or having clause to the query.
*
* @param string $sql
- * @param array $bindings
- * @return \Illuminate\Database\Query\Builder|static
+ * @param array $bindings
+ * @return $this
*/
public function orHavingRaw($sql, array $bindings = [])
{
@@ -1798,7 +1899,7 @@ class Builder
/**
* Add an "order by" clause to the query.
*
- * @param string $column
+ * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Query\Expression|string $column
* @param string $direction
* @return $this
*
@@ -1806,6 +1907,14 @@ class Builder
*/
public function orderBy($column, $direction = 'asc')
{
+ if ($this->isQueryable($column)) {
+ [$query, $bindings] = $this->createSub($column);
+
+ $column = new Expression('('.$query.')');
+
+ $this->addBinding($bindings, $this->unions ? 'unionOrder' : 'order');
+ }
+
$direction = strtolower($direction);
if (! in_array($direction, ['asc', 'desc'], true)) {
@@ -1835,7 +1944,7 @@ class Builder
* Add an "order by" clause for a timestamp to the query.
*
* @param string $column
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*/
public function latest($column = 'created_at')
{
@@ -1846,7 +1955,7 @@ class Builder
* Add an "order by" clause for a timestamp to the query.
*
* @param string $column
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*/
public function oldest($column = 'created_at')
{
@@ -1877,7 +1986,7 @@ class Builder
$this->{$this->unions ? 'unionOrders' : 'orders'}[] = compact('type', 'sql');
- $this->addBinding($bindings, 'order');
+ $this->addBinding($bindings, $this->unions ? 'unionOrder' : 'order');
return $this;
}
@@ -1886,7 +1995,7 @@ class Builder
* Alias to set the "offset" value of the query.
*
* @param int $value
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*/
public function skip($value)
{
@@ -1912,7 +2021,7 @@ class Builder
* Alias to set the "limit" value of the query.
*
* @param int $value
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*/
public function take($value)
{
@@ -1941,11 +2050,11 @@ class Builder
*
* @param int $page
* @param int $perPage
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*/
public function forPage($page, $perPage = 15)
{
- return $this->skip(($page - 1) * $perPage)->take($perPage);
+ return $this->offset(($page - 1) * $perPage)->limit($perPage);
}
/**
@@ -1954,7 +2063,7 @@ class Builder
* @param int $perPage
* @param int|null $lastId
* @param string $column
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*/
public function forPageBeforeId($perPage = 15, $lastId = 0, $column = 'id')
{
@@ -1965,7 +2074,7 @@ class Builder
}
return $this->orderBy($column, 'desc')
- ->take($perPage);
+ ->limit($perPage);
}
/**
@@ -1974,7 +2083,7 @@ class Builder
* @param int $perPage
* @param int|null $lastId
* @param string $column
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*/
public function forPageAfterId($perPage = 15, $lastId = 0, $column = 'id')
{
@@ -1985,7 +2094,28 @@ class Builder
}
return $this->orderBy($column, 'asc')
- ->take($perPage);
+ ->limit($perPage);
+ }
+
+ /**
+ * Remove all existing orders and optionally add a new order.
+ *
+ * @param string|null $column
+ * @param string $direction
+ * @return $this
+ */
+ public function reorder($column = null, $direction = 'asc')
+ {
+ $this->orders = null;
+ $this->unionOrders = null;
+ $this->bindings['order'] = [];
+ $this->bindings['unionOrder'] = [];
+
+ if ($column) {
+ return $this->orderBy($column, $direction);
+ }
+
+ return $this;
}
/**
@@ -2008,7 +2138,7 @@ class Builder
*
* @param \Illuminate\Database\Query\Builder|\Closure $query
* @param bool $all
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*/
public function union($query, $all = false)
{
@@ -2027,7 +2157,7 @@ class Builder
* Add a union all statement to the query.
*
* @param \Illuminate\Database\Query\Builder|\Closure $query
- * @return \Illuminate\Database\Query\Builder|static
+ * @return $this
*/
public function unionAll($query)
{
@@ -2169,7 +2299,7 @@ class Builder
{
$page = $page ?: Paginator::resolveCurrentPage($pageName);
- $this->skip(($page - 1) * $perPage)->take($perPage + 1);
+ $this->offset(($page - 1) * $perPage)->limit($perPage + 1);
return $this->simplePaginator($this->get($columns), $perPage, $page, [
'path' => Paginator::resolveCurrentPath(),
@@ -2190,9 +2320,7 @@ class Builder
// Once we have run the pagination count query, we will get the resulting count and
// take into account what type of query it was. When there is a group by we will
// just return the count of the entire results set since that will be correct.
- if (isset($this->groups)) {
- return count($results);
- } elseif (! isset($results[0])) {
+ if (! isset($results[0])) {
return 0;
} elseif (is_object($results[0])) {
return (int) $results[0]->aggregate;
@@ -2209,6 +2337,20 @@ class Builder
*/
protected function runPaginationCountQuery($columns = ['*'])
{
+ if ($this->groups || $this->havings) {
+ $clone = $this->cloneForPaginationCount();
+
+ if (is_null($clone->columns) && ! empty($this->joins)) {
+ $clone->select($this->from.'.*');
+ }
+
+ return $this->newQuery()
+ ->from(new Expression('('.$clone->toSql().') as '.$this->grammar->wrap('aggregate_table')))
+ ->mergeBindings($clone)
+ ->setAggregate('count', $this->withoutSelectAliases($columns))
+ ->get()->all();
+ }
+
$without = $this->unions ? ['orders', 'limit', 'offset'] : ['columns', 'orders', 'limit', 'offset'];
return $this->cloneWithout($without)
@@ -2217,6 +2359,17 @@ class Builder
->get()->all();
}
+ /**
+ * Clone the existing query instance for usage in a pagination subquery.
+ *
+ * @return self
+ */
+ protected function cloneForPaginationCount()
+ {
+ return $this->cloneWithout(['orders', 'limit', 'offset'])
+ ->cloneWithoutBindings(['order']);
+ }
+
/**
* Remove the column aliases since they will break count queries.
*
@@ -2232,9 +2385,9 @@ class Builder
}
/**
- * Get a generator for the given query.
+ * Get a lazy collection for the given query.
*
- * @return \Generator
+ * @return \Illuminate\Support\LazyCollection
*/
public function cursor()
{
@@ -2242,53 +2395,11 @@ class Builder
$this->columns = ['*'];
}
- return $this->connection->cursor(
- $this->toSql(), $this->getBindings(), ! $this->useWritePdo
- );
- }
-
- /**
- * Chunk the results of a query by comparing numeric IDs.
- *
- * @param int $count
- * @param callable $callback
- * @param string $column
- * @param string|null $alias
- * @return bool
- */
- public function chunkById($count, callable $callback, $column = 'id', $alias = null)
- {
- $alias = $alias ?: $column;
-
- $lastId = null;
-
- do {
- $clone = clone $this;
-
- // We'll execute the query for the given page and get the results. If there are
- // no results we can just break and return from here. When there are results
- // we will call the callback with the current chunk of these results here.
- $results = $clone->forPageAfterId($count, $lastId, $column)->get();
-
- $countResults = $results->count();
-
- if ($countResults == 0) {
- break;
- }
-
- // On each chunk result set, we will pass them to the callback and then let the
- // developer take care of everything within the callback, which allows us to
- // keep the memory low for spinning through large result sets for working.
- if ($callback($results) === false) {
- return false;
- }
-
- $lastId = $results->last()->{$alias};
-
- unset($results);
- } while ($countResults == $count);
-
- return true;
+ return new LazyCollection(function () {
+ yield from $this->connection->cursor(
+ $this->toSql(), $this->getBindings(), ! $this->useWritePdo
+ );
+ });
}
/**
@@ -2350,15 +2461,21 @@ class Builder
*/
protected function stripTableForPluck($column)
{
- return is_null($column) ? $column : last(preg_split('~\.| ~', $column));
+ if (is_null($column)) {
+ return $column;
+ }
+
+ $separator = strpos(strtolower($column), ' as ') !== false ? ' as ' : '\.';
+
+ return last(preg_split('~'.$separator.'~i', $column));
}
/**
* Retrieve column values from rows represented as objects.
*
* @param array $queryResult
- * @param string $column
- * @param string $key
+ * @param string $column
+ * @param string $key
* @return \Illuminate\Support\Collection
*/
protected function pluckFromObjectColumn($queryResult, $column, $key)
@@ -2382,8 +2499,8 @@ class Builder
* Retrieve column values from rows represented as arrays.
*
* @param array $queryResult
- * @param string $column
- * @param string $key
+ * @param string $column
+ * @param string $key
* @return \Illuminate\Support\Collection
*/
protected function pluckFromArrayColumn($queryResult, $column, $key)
@@ -2448,6 +2565,28 @@ class Builder
return ! $this->exists();
}
+ /**
+ * Execute the given callback if no rows exist for the current query.
+ *
+ * @param \Closure $callback
+ * @return mixed
+ */
+ public function existsOr(Closure $callback)
+ {
+ return $this->exists() ? true : $callback();
+ }
+
+ /**
+ * Execute the given callback if rows exist for the current query.
+ *
+ * @param \Closure $callback
+ * @return mixed
+ */
+ public function doesntExistOr(Closure $callback)
+ {
+ return $this->doesntExist() ? true : $callback();
+ }
+
/**
* Retrieve the "count" result of the query.
*
@@ -2520,7 +2659,7 @@ class Builder
* Execute an aggregate function on the database.
*
* @param string $function
- * @param array $columns
+ * @param array $columns
* @return mixed
*/
public function aggregate($function, $columns = ['*'])
@@ -2539,7 +2678,7 @@ class Builder
* Execute a numeric aggregate function on the database.
*
* @param string $function
- * @param array $columns
+ * @param array $columns
* @return float|int
*/
public function numericAggregate($function, $columns = ['*'])
@@ -2695,13 +2834,13 @@ class Builder
*
* @param array $columns
* @param \Closure|\Illuminate\Database\Query\Builder|string $query
- * @return bool
+ * @return int
*/
public function insertUsing(array $columns, $query)
{
[$sql, $bindings] = $this->createSub($query);
- return $this->connection->insert(
+ return $this->connection->affectingStatement(
$this->grammar->compileInsertUsing($this, $columns, $sql),
$this->cleanBindings($bindings)
);
@@ -2739,7 +2878,7 @@ class Builder
return true;
}
- return (bool) $this->take(1)->update($values);
+ return (bool) $this->limit(1)->update($values);
}
/**
@@ -2749,6 +2888,8 @@ class Builder
* @param float|int $amount
* @param array $extra
* @return int
+ *
+ * @throws \InvalidArgumentException
*/
public function increment($column, $amount = 1, array $extra = [])
{
@@ -2770,6 +2911,8 @@ class Builder
* @param float|int $amount
* @param array $extra
* @return int
+ *
+ * @throws \InvalidArgumentException
*/
public function decrement($column, $amount = 1, array $extra = [])
{
@@ -2872,7 +3015,7 @@ class Builder
/**
* Set the bindings on the query builder.
*
- * @param array $bindings
+ * @param array $bindings
* @param string $type
* @return $this
*
@@ -2892,7 +3035,7 @@ class Builder
/**
* Add a binding to the query.
*
- * @param mixed $value
+ * @param mixed $value
* @param string $type
* @return $this
*
@@ -2939,6 +3082,16 @@ class Builder
}));
}
+ /**
+ * Get the default key name of the table.
+ *
+ * @return string
+ */
+ protected function defaultKeyName()
+ {
+ return 'id';
+ }
+
/**
* Get the database connection instance.
*
@@ -2981,6 +3134,20 @@ class Builder
return $this;
}
+ /**
+ * Determine if the value is a query builder instance or a Closure.
+ *
+ * @param mixed $value
+ * @return bool
+ */
+ protected function isQueryable($value)
+ {
+ return $value instanceof self ||
+ $value instanceof EloquentBuilder ||
+ $value instanceof Relation ||
+ $value instanceof Closure;
+ }
+
/**
* Clone the query without the given properties.
*
@@ -3037,7 +3204,7 @@ class Builder
* Handle dynamic method calls into the method.
*
* @param string $method
- * @param array $parameters
+ * @param array $parameters
* @return mixed
*
* @throws \BadMethodCallException
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/Grammar.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/Grammar.php
index 0d8241fc3..fa9e962d1 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/Grammar.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/Grammar.php
@@ -2,12 +2,12 @@
namespace Illuminate\Database\Query\Grammars;
-use RuntimeException;
-use Illuminate\Support\Arr;
-use Illuminate\Support\Str;
+use Illuminate\Database\Grammar as BaseGrammar;
use Illuminate\Database\Query\Builder;
use Illuminate\Database\Query\JoinClause;
-use Illuminate\Database\Grammar as BaseGrammar;
+use Illuminate\Support\Arr;
+use Illuminate\Support\Str;
+use RuntimeException;
class Grammar extends BaseGrammar
{
@@ -34,7 +34,6 @@ class Grammar extends BaseGrammar
'orders',
'limit',
'offset',
- 'unions',
'lock',
];
@@ -66,6 +65,10 @@ class Grammar extends BaseGrammar
$this->compileComponents($query))
);
+ if ($query->unions) {
+ $sql = $this->wrapUnion($sql).' '.$this->compileUnions($query);
+ }
+
$query->columns = $original;
return $sql;
@@ -82,10 +85,7 @@ class Grammar extends BaseGrammar
$sql = [];
foreach ($this->selectComponents as $component) {
- // To compile the query, we'll spin through each component of the query and
- // see if that component exists. If it does we'll just call the compiler
- // function for the component which is responsible for making the SQL.
- if (isset($query->$component) && ! is_null($query->$component)) {
+ if (isset($query->$component)) {
$method = 'compile'.ucfirst($component);
$sql[$component] = $this->$method($query, $query->$component);
@@ -109,7 +109,9 @@ class Grammar extends BaseGrammar
// If the query has a "distinct" constraint and we're not asking for all columns
// we need to prepend "distinct" onto the column name so that the query takes
// it into account when it performs the aggregating operations on the data.
- if ($query->distinct && $column !== '*') {
+ if (is_array($query->distinct)) {
+ $column = 'distinct '.$this->columnize($query->distinct);
+ } elseif ($query->distinct && $column !== '*') {
$column = 'distinct '.$column;
}
@@ -132,7 +134,11 @@ class Grammar extends BaseGrammar
return;
}
- $select = $query->distinct ? 'select distinct ' : 'select ';
+ if ($query->distinct) {
+ $select = 'select distinct ';
+ } else {
+ $select = 'select ';
+ }
return $select.$this->columnize($columns);
}
@@ -297,30 +303,6 @@ class Grammar extends BaseGrammar
return '1 = 1';
}
- /**
- * Compile a where in sub-select clause.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function whereInSub(Builder $query, $where)
- {
- return $this->wrap($where['column']).' in ('.$this->compileSelect($where['query']).')';
- }
-
- /**
- * Compile a where not in sub-select clause.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function whereNotInSub(Builder $query, $where)
- {
- return $this->wrap($where['column']).' not in ('.$this->compileSelect($where['query']).')';
- }
-
/**
* Compile a "where in raw" clause.
*
@@ -381,6 +363,24 @@ class Grammar extends BaseGrammar
return $this->wrap($where['column']).' '.$between.' '.$min.' and '.$max;
}
+ /**
+ * Compile a "between" where clause.
+ *
+ * @param \Illuminate\Database\Query\Builder $query
+ * @param array $where
+ * @return string
+ */
+ protected function whereBetweenColumns(Builder $query, $where)
+ {
+ $between = $where['not'] ? 'not between' : 'between';
+
+ $min = $this->wrap(reset($where['values']));
+
+ $max = $this->wrap(end($where['values']));
+
+ return $this->wrap($where['column']).' '.$between.' '.$min.' and '.$max;
+ }
+
/**
* Compile a "where date" clause.
*
@@ -488,8 +488,8 @@ class Grammar extends BaseGrammar
/**
* Compile a where condition with a sub-select.
*
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
+ * @param \Illuminate\Database\Query\Builder $query
+ * @param array $where
* @return string
*/
protected function whereSub(Builder $query, $where)
@@ -656,7 +656,7 @@ class Grammar extends BaseGrammar
/**
* Compile a single having clause.
*
- * @param array $having
+ * @param array $having
* @return string
*/
protected function compileHaving(array $having)
@@ -676,7 +676,7 @@ class Grammar extends BaseGrammar
/**
* Compile a basic having clause.
*
- * @param array $having
+ * @param array $having
* @return string
*/
protected function compileBasicHaving($having)
@@ -811,7 +811,18 @@ class Grammar extends BaseGrammar
{
$conjunction = $union['all'] ? ' union all ' : ' union ';
- return $conjunction.$union['query']->toSql();
+ return $conjunction.$this->wrapUnion($union['query']->toSql());
+ }
+
+ /**
+ * Wrap a union subquery in parentheses.
+ *
+ * @param string $sql
+ * @return string
+ */
+ protected function wrapUnion($sql)
+ {
+ return '('.$sql.')';
}
/**
@@ -856,6 +867,10 @@ class Grammar extends BaseGrammar
// basic routine regardless of an amount of records given to us to insert.
$table = $this->wrapTable($query->from);
+ if (empty($values)) {
+ return "insert into {$table} default values";
+ }
+
if (! is_array(reset($values))) {
$values = [$values];
}
@@ -878,6 +893,8 @@ class Grammar extends BaseGrammar
* @param \Illuminate\Database\Query\Builder $query
* @param array $values
* @return string
+ *
+ * @throws \RuntimeException
*/
public function compileInsertOrIgnore(Builder $query, array $values)
{
@@ -888,7 +905,7 @@ class Grammar extends BaseGrammar
* Compile an insert and get ID statement into SQL.
*
* @param \Illuminate\Database\Query\Builder $query
- * @param array $values
+ * @param array $values
* @param string $sequence
* @return string
*/
@@ -917,32 +934,63 @@ class Grammar extends BaseGrammar
* @param array $values
* @return string
*/
- public function compileUpdate(Builder $query, $values)
+ public function compileUpdate(Builder $query, array $values)
{
$table = $this->wrapTable($query->from);
- // Each one of the columns in the update statements needs to be wrapped in the
- // keyword identifiers, also a place-holder needs to be created for each of
- // the values in the list of bindings so we can make the sets statements.
- $columns = collect($values)->map(function ($value, $key) {
+ $columns = $this->compileUpdateColumns($query, $values);
+
+ $where = $this->compileWheres($query);
+
+ return trim(
+ isset($query->joins)
+ ? $this->compileUpdateWithJoins($query, $table, $columns, $where)
+ : $this->compileUpdateWithoutJoins($query, $table, $columns, $where)
+ );
+ }
+
+ /**
+ * Compile the columns for an update statement.
+ *
+ * @param \Illuminate\Database\Query\Builder $query
+ * @param array $values
+ * @return string
+ */
+ protected function compileUpdateColumns(Builder $query, array $values)
+ {
+ return collect($values)->map(function ($value, $key) {
return $this->wrap($key).' = '.$this->parameter($value);
})->implode(', ');
+ }
- // If the query has any "join" clauses, we will setup the joins on the builder
- // and compile them so we can attach them to this update, as update queries
- // can get join statements to attach to other tables when they're needed.
- $joins = '';
+ /**
+ * Compile an update statement without joins into SQL.
+ *
+ * @param \Illuminate\Database\Query\Builder $query
+ * @param string $table
+ * @param string $columns
+ * @param string $where
+ * @return string
+ */
+ protected function compileUpdateWithoutJoins(Builder $query, $table, $columns, $where)
+ {
+ return "update {$table} set {$columns} {$where}";
+ }
- if (isset($query->joins)) {
- $joins = ' '.$this->compileJoins($query, $query->joins);
- }
+ /**
+ * Compile an update statement with joins into SQL.
+ *
+ * @param \Illuminate\Database\Query\Builder $query
+ * @param string $table
+ * @param string $columns
+ * @param string $where
+ * @return string
+ */
+ protected function compileUpdateWithJoins(Builder $query, $table, $columns, $where)
+ {
+ $joins = $this->compileJoins($query, $query->joins);
- // Of course, update queries may also be constrained by where clauses so we'll
- // need to compile the where clauses and attach it to the query so only the
- // intended records are updated by the SQL statements we generate to run.
- $wheres = $this->compileWheres($query);
-
- return trim("update {$table}{$joins} set $columns $wheres");
+ return "update {$table} {$joins} set {$columns} {$where}";
}
/**
@@ -969,9 +1017,45 @@ class Grammar extends BaseGrammar
*/
public function compileDelete(Builder $query)
{
- $wheres = is_array($query->wheres) ? $this->compileWheres($query) : '';
+ $table = $this->wrapTable($query->from);
- return trim("delete from {$this->wrapTable($query->from)} $wheres");
+ $where = $this->compileWheres($query);
+
+ return trim(
+ isset($query->joins)
+ ? $this->compileDeleteWithJoins($query, $table, $where)
+ : $this->compileDeleteWithoutJoins($query, $table, $where)
+ );
+ }
+
+ /**
+ * Compile a delete statement without joins into SQL.
+ *
+ * @param \Illuminate\Database\Query\Builder $query
+ * @param string $table
+ * @param string $where
+ * @return string
+ */
+ protected function compileDeleteWithoutJoins(Builder $query, $table, $where)
+ {
+ return "delete from {$table} {$where}";
+ }
+
+ /**
+ * Compile a delete statement with joins into SQL.
+ *
+ * @param \Illuminate\Database\Query\Builder $query
+ * @param string $table
+ * @param string $where
+ * @return string
+ */
+ protected function compileDeleteWithJoins(Builder $query, $table, $where)
+ {
+ $alias = last(explode(' as ', $table));
+
+ $joins = $this->compileJoins($query, $query->joins);
+
+ return "delete {$alias} from {$table} {$joins} {$where}";
}
/**
@@ -995,7 +1079,7 @@ class Grammar extends BaseGrammar
*/
public function compileTruncate(Builder $query)
{
- return ['truncate '.$this->wrapTable($query->from) => []];
+ return ['truncate table '.$this->wrapTable($query->from) => []];
}
/**
@@ -1046,7 +1130,7 @@ class Grammar extends BaseGrammar
* Wrap a value in keyword identifiers.
*
* @param \Illuminate\Database\Query\Expression|string $value
- * @param bool $prefixAlias
+ * @param bool $prefixAlias
* @return string
*/
public function wrap($value, $prefixAlias = false)
@@ -1077,6 +1161,8 @@ class Grammar extends BaseGrammar
*
* @param string $value
* @return string
+ *
+ * @throws \RuntimeException
*/
protected function wrapJsonSelector($value)
{
@@ -1131,7 +1217,7 @@ class Grammar extends BaseGrammar
*/
protected function wrapJsonPath($value, $delimiter = '->')
{
- $value = preg_replace("/([\\\\]+)?\\'/", "\\'", $value);
+ $value = preg_replace("/([\\\\]+)?\\'/", "''", $value);
return '\'$."'.str_replace($delimiter, '"."', $value).'"\'';
}
@@ -1150,7 +1236,7 @@ class Grammar extends BaseGrammar
/**
* Concatenate an array of segments, removing empties.
*
- * @param array $segments
+ * @param array $segments
* @return string
*/
protected function concatenate($segments)
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/MySqlGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/MySqlGrammar.php
index 3b6462a61..494018803 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/MySqlGrammar.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/MySqlGrammar.php
@@ -2,9 +2,8 @@
namespace Illuminate\Database\Query\Grammars;
-use Illuminate\Support\Str;
use Illuminate\Database\Query\Builder;
-use Illuminate\Database\Query\JsonExpression;
+use Illuminate\Support\Str;
class MySqlGrammar extends Grammar
{
@@ -16,43 +15,40 @@ class MySqlGrammar extends Grammar
protected $operators = ['sounds like'];
/**
- * The components that make up a select clause.
+ * Add a "where null" clause to the query.
*
- * @var array
+ * @param string|array $columns
+ * @param string $boolean
+ * @param bool $not
+ * @return $this
*/
- protected $selectComponents = [
- 'aggregate',
- 'columns',
- 'from',
- 'joins',
- 'wheres',
- 'groups',
- 'havings',
- 'orders',
- 'limit',
- 'offset',
- 'lock',
- ];
+ protected function whereNull(Builder $query, $where)
+ {
+ if ($this->isJsonSelector($where['column'])) {
+ [$field, $path] = $this->wrapJsonFieldAndPath($where['column']);
+
+ return '(json_extract('.$field.$path.') is null OR json_type(json_extract('.$field.$path.')) = \'NULL\')';
+ }
+
+ return parent::whereNull($query, $where);
+ }
/**
- * Compile a select query into SQL.
+ * Add a "where not null" clause to the query.
*
- * @param \Illuminate\Database\Query\Builder $query
- * @return string
+ * @param string|array $columns
+ * @param string $boolean
+ * @return $this
*/
- public function compileSelect(Builder $query)
+ protected function whereNotNull(Builder $query, $where)
{
- if ($query->unions && $query->aggregate) {
- return $this->compileUnionAggregate($query);
+ if ($this->isJsonSelector($where['column'])) {
+ [$field, $path] = $this->wrapJsonFieldAndPath($where['column']);
+
+ return '(json_extract('.$field.$path.') is not null AND json_type(json_extract('.$field.$path.')) != \'NULL\')';
}
- $sql = parent::compileSelect($query);
-
- if ($query->unions) {
- $sql = '('.$sql.') '.$this->compileUnions($query);
- }
-
- return $sql;
+ return parent::whereNotNull($query, $where);
}
/**
@@ -96,19 +92,6 @@ class MySqlGrammar extends Grammar
return 'json_length('.$field.$path.') '.$operator.' '.$value;
}
- /**
- * Compile a single union statement.
- *
- * @param array $union
- * @return string
- */
- protected function compileUnion(array $union)
- {
- $conjunction = $union['all'] ? ' union all ' : ' union ';
-
- return $conjunction.'('.$union['query']->toSql().')';
- }
-
/**
* Compile the random statement into SQL.
*
@@ -137,65 +120,33 @@ class MySqlGrammar extends Grammar
}
/**
- * Compile an update statement into SQL.
+ * Compile an insert statement into SQL.
*
* @param \Illuminate\Database\Query\Builder $query
* @param array $values
* @return string
*/
- public function compileUpdate(Builder $query, $values)
+ public function compileInsert(Builder $query, array $values)
{
- $table = $this->wrapTable($query->from);
-
- // Each one of the columns in the update statements needs to be wrapped in the
- // keyword identifiers, also a place-holder needs to be created for each of
- // the values in the list of bindings so we can make the sets statements.
- $columns = $this->compileUpdateColumns($values);
-
- // If the query has any "join" clauses, we will setup the joins on the builder
- // and compile them so we can attach them to this update, as update queries
- // can get join statements to attach to other tables when they're needed.
- $joins = '';
-
- if (isset($query->joins)) {
- $joins = ' '.$this->compileJoins($query, $query->joins);
+ if (empty($values)) {
+ $values = [[]];
}
- // Of course, update queries may also be constrained by where clauses so we'll
- // need to compile the where clauses and attach it to the query so only the
- // intended records are updated by the SQL statements we generate to run.
- $where = $this->compileWheres($query);
-
- $sql = rtrim("update {$table}{$joins} set $columns $where");
-
- // If the query has an order by clause we will compile it since MySQL supports
- // order bys on update statements. We'll compile them using the typical way
- // of compiling order bys. Then they will be appended to the SQL queries.
- if (! empty($query->orders)) {
- $sql .= ' '.$this->compileOrders($query, $query->orders);
- }
-
- // Updates on MySQL also supports "limits", which allow you to easily update a
- // single record very easily. This is not supported by all database engines
- // so we have customized this update compiler here in order to add it in.
- if (isset($query->limit)) {
- $sql .= ' '.$this->compileLimit($query, $query->limit);
- }
-
- return rtrim($sql);
+ return parent::compileInsert($query, $values);
}
/**
- * Compile all of the columns for an update statement.
+ * Compile the columns for an update statement.
*
+ * @param \Illuminate\Database\Query\Builder $query
* @param array $values
* @return string
*/
- protected function compileUpdateColumns($values)
+ protected function compileUpdateColumns(Builder $query, array $values)
{
return collect($values)->map(function ($value, $key) {
if ($this->isJsonSelector($key)) {
- return $this->compileJsonUpdateColumn($key, new JsonExpression($value));
+ return $this->compileJsonUpdateColumn($key, $value);
}
return $this->wrap($key).' = '.$this->parameter($value);
@@ -203,17 +154,49 @@ class MySqlGrammar extends Grammar
}
/**
- * Prepares a JSON column being updated using the JSON_SET function.
+ * Prepare a JSON column being updated using the JSON_SET function.
*
* @param string $key
- * @param \Illuminate\Database\Query\JsonExpression $value
+ * @param mixed $value
* @return string
*/
- protected function compileJsonUpdateColumn($key, JsonExpression $value)
+ protected function compileJsonUpdateColumn($key, $value)
{
+ if (is_bool($value)) {
+ $value = $value ? 'true' : 'false';
+ } elseif (is_array($value)) {
+ $value = 'cast(? as json)';
+ } else {
+ $value = $this->parameter($value);
+ }
+
[$field, $path] = $this->wrapJsonFieldAndPath($key);
- return "{$field} = json_set({$field}{$path}, {$value->getValue()})";
+ return "{$field} = json_set({$field}{$path}, {$value})";
+ }
+
+ /**
+ * Compile an update statement without joins into SQL.
+ *
+ * @param \Illuminate\Database\Query\Builder $query
+ * @param string $table
+ * @param string $columns
+ * @param string $where
+ * @return string
+ */
+ protected function compileUpdateWithoutJoins(Builder $query, $table, $columns, $where)
+ {
+ $sql = parent::compileUpdateWithoutJoins($query, $table, $columns, $where);
+
+ if (! empty($query->orders)) {
+ $sql .= ' '.$this->compileOrders($query, $query->orders);
+ }
+
+ if (isset($query->limit)) {
+ $sql .= ' '.$this->compileLimit($query, $query->limit);
+ }
+
+ return $sql;
}
/**
@@ -229,28 +212,13 @@ class MySqlGrammar extends Grammar
{
$values = collect($values)->reject(function ($value, $column) {
return $this->isJsonSelector($column) && is_bool($value);
+ })->map(function ($value) {
+ return is_array($value) ? json_encode($value) : $value;
})->all();
return parent::prepareBindingsForUpdate($bindings, $values);
}
- /**
- * Compile a delete statement into SQL.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @return string
- */
- public function compileDelete(Builder $query)
- {
- $table = $this->wrapTable($query->from);
-
- $where = is_array($query->wheres) ? $this->compileWheres($query) : '';
-
- return isset($query->joins)
- ? $this->compileDeleteWithJoins($query, $table, $where)
- : $this->compileDeleteWithoutJoins($query, $table, $where);
- }
-
/**
* Compile a delete query that does not use joins.
*
@@ -259,9 +227,9 @@ class MySqlGrammar extends Grammar
* @param string $where
* @return string
*/
- protected function compileDeleteWithoutJoins($query, $table, $where)
+ protected function compileDeleteWithoutJoins(Builder $query, $table, $where)
{
- $sql = trim("delete from {$table} {$where}");
+ $sql = parent::compileDeleteWithoutJoins($query, $table, $where);
// When using MySQL, delete statements may contain order by statements and limits
// so we will compile both of those here. Once we have finished compiling this
@@ -277,24 +245,6 @@ class MySqlGrammar extends Grammar
return $sql;
}
- /**
- * Compile a delete query that uses joins.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param string $table
- * @param string $where
- * @return string
- */
- protected function compileDeleteWithJoins($query, $table, $where)
- {
- $joins = ' '.$this->compileJoins($query, $query->joins);
-
- $alias = stripos($table, ' as ') !== false
- ? explode(' as ', $table)[1] : $table;
-
- return trim("delete {$alias} from {$table}{$joins} {$where}");
- }
-
/**
* Wrap a single string in keyword identifiers.
*
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/PostgresGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/PostgresGrammar.php
index 839d6e5b1..46420bb6a 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/PostgresGrammar.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/PostgresGrammar.php
@@ -2,31 +2,12 @@
namespace Illuminate\Database\Query\Grammars;
+use Illuminate\Database\Query\Builder;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
-use Illuminate\Database\Query\Builder;
class PostgresGrammar extends Grammar
{
- /**
- * The components that make up a select clause.
- *
- * @var array
- */
- protected $selectComponents = [
- 'aggregate',
- 'columns',
- 'from',
- 'joins',
- 'wheres',
- 'groups',
- 'havings',
- 'orders',
- 'limit',
- 'offset',
- 'lock',
- ];
-
/**
* All of the available clause operators.
*
@@ -105,37 +86,30 @@ class PostgresGrammar extends Grammar
}
/**
- * Compile a select query into SQL.
+ * Compile the "select *" portion of the query.
*
* @param \Illuminate\Database\Query\Builder $query
- * @return string
+ * @param array $columns
+ * @return string|null
*/
- public function compileSelect(Builder $query)
+ protected function compileColumns(Builder $query, $columns)
{
- if ($query->unions && $query->aggregate) {
- return $this->compileUnionAggregate($query);
+ // If the query is actually performing an aggregating select, we will let that
+ // compiler handle the building of the select clauses, as it will need some
+ // more syntax that is best handled by that function to keep things neat.
+ if (! is_null($query->aggregate)) {
+ return;
}
- $sql = parent::compileSelect($query);
-
- if ($query->unions) {
- $sql = '('.$sql.') '.$this->compileUnions($query);
+ if (is_array($query->distinct)) {
+ $select = 'select distinct on ('.$this->columnize($query->distinct).') ';
+ } elseif ($query->distinct) {
+ $select = 'select distinct ';
+ } else {
+ $select = 'select ';
}
- return $sql;
- }
-
- /**
- * Compile a single union statement.
- *
- * @param array $union
- * @return string
- */
- protected function compileUnion(array $union)
- {
- $conjunction = $union['all'] ? ' union all ' : ' union ';
-
- return $conjunction.'('.$union['query']->toSql().')';
+ return $select.$this->columnize($columns);
}
/**
@@ -183,18 +157,6 @@ class PostgresGrammar extends Grammar
return $value;
}
- /**
- * {@inheritdoc}
- */
- public function compileInsert(Builder $query, array $values)
- {
- $table = $this->wrapTable($query->from);
-
- return empty($values)
- ? "insert into {$table} DEFAULT VALUES"
- : parent::compileInsert($query, $values);
- }
-
/**
* Compile an insert ignore statement into SQL.
*
@@ -211,7 +173,7 @@ class PostgresGrammar extends Grammar
* Compile an insert and get ID statement into SQL.
*
* @param \Illuminate\Database\Query\Builder $query
- * @param array $values
+ * @param array $values
* @param string $sequence
* @return string
*/
@@ -227,34 +189,24 @@ class PostgresGrammar extends Grammar
* @param array $values
* @return string
*/
- public function compileUpdate(Builder $query, $values)
+ public function compileUpdate(Builder $query, array $values)
{
- $table = $this->wrapTable($query->from);
+ if (isset($query->joins) || isset($query->limit)) {
+ return $this->compileUpdateWithJoinsOrLimit($query, $values);
+ }
- // Each one of the columns in the update statements needs to be wrapped in the
- // keyword identifiers, also a place-holder needs to be created for each of
- // the values in the list of bindings so we can make the sets statements.
- $columns = $this->compileUpdateColumns($query, $values);
-
- $from = $this->compileUpdateFrom($query);
-
- $where = $this->compileUpdateWheres($query);
-
- return trim("update {$table} set {$columns}{$from} {$where}");
+ return parent::compileUpdate($query, $values);
}
/**
- * Compile the columns for the update statement.
+ * Compile the columns for an update statement.
*
* @param \Illuminate\Database\Query\Builder $query
- * @param array $values
+ * @param array $values
* @return string
*/
- protected function compileUpdateColumns($query, $values)
+ protected function compileUpdateColumns(Builder $query, array $values)
{
- // When gathering the columns for an update statement, we'll wrap each of the
- // columns and convert it to a parameter value. Then we will concatenate a
- // list of the columns that can be added into this update query clauses.
return collect($values)->map(function ($value, $key) {
$column = last(explode('.', $key));
@@ -275,87 +227,33 @@ class PostgresGrammar extends Grammar
*/
protected function compileJsonUpdateColumn($key, $value)
{
- $parts = explode('->', $key);
+ $segments = explode('->', $key);
- $field = $this->wrap(array_shift($parts));
+ $field = $this->wrap(array_shift($segments));
- $path = '\'{"'.implode('","', $parts).'"}\'';
+ $path = '\'{"'.implode('","', $segments).'"}\'';
return "{$field} = jsonb_set({$field}::jsonb, {$path}, {$this->parameter($value)})";
}
/**
- * Compile the "from" clause for an update with a join.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @return string|null
- */
- protected function compileUpdateFrom(Builder $query)
- {
- if (! isset($query->joins)) {
- return '';
- }
-
- // When using Postgres, updates with joins list the joined tables in the from
- // clause, which is different than other systems like MySQL. Here, we will
- // compile out the tables that are joined and add them to a from clause.
- $froms = collect($query->joins)->map(function ($join) {
- return $this->wrapTable($join->table);
- })->all();
-
- if (count($froms) > 0) {
- return ' from '.implode(', ', $froms);
- }
- }
-
- /**
- * Compile the additional where clauses for updates with joins.
+ * Compile an update statement with joins or limit into SQL.
*
* @param \Illuminate\Database\Query\Builder $query
+ * @param array $values
* @return string
*/
- protected function compileUpdateWheres(Builder $query)
+ protected function compileUpdateWithJoinsOrLimit(Builder $query, array $values)
{
- $baseWheres = $this->compileWheres($query);
+ $table = $this->wrapTable($query->from);
- if (! isset($query->joins)) {
- return $baseWheres;
- }
+ $columns = $this->compileUpdateColumns($query, $values);
- // Once we compile the join constraints, we will either use them as the where
- // clause or append them to the existing base where clauses. If we need to
- // strip the leading boolean we will do so when using as the only where.
- $joinWheres = $this->compileUpdateJoinWheres($query);
+ $alias = last(preg_split('/\s+as\s+/i', $query->from));
- if (trim($baseWheres) == '') {
- return 'where '.$this->removeLeadingBoolean($joinWheres);
- }
+ $selectSql = $this->compileSelect($query->select($alias.'.ctid'));
- return $baseWheres.' '.$joinWheres;
- }
-
- /**
- * Compile the "join" clause where clauses for an update.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @return string
- */
- protected function compileUpdateJoinWheres(Builder $query)
- {
- $joinWheres = [];
-
- // Here we will just loop through all of the join constraints and compile them
- // all out then implode them. This should give us "where" like syntax after
- // everything has been built and then we will join it to the real wheres.
- foreach ($query->joins as $join) {
- foreach ($join->wheres as $where) {
- $method = "where{$where['type']}";
-
- $joinWheres[] = $where['boolean'].' '.$this->$method($query, $where);
- }
- }
-
- return implode(' ', $joinWheres);
+ return "update {$table} set {$columns} where {$this->wrap('ctid')} in ({$selectSql})";
}
/**
@@ -368,15 +266,15 @@ class PostgresGrammar extends Grammar
public function prepareBindingsForUpdate(array $bindings, array $values)
{
$values = collect($values)->map(function ($value, $column) {
- return $this->isJsonSelector($column) && ! $this->isExpression($value)
+ return is_array($value) || ($this->isJsonSelector($column) && ! $this->isExpression($value))
? json_encode($value)
: $value;
})->all();
- $bindingsWithoutWhere = Arr::except($bindings, ['select', 'where']);
+ $cleanBindings = Arr::except($bindings, 'select');
return array_values(
- array_merge($values, $bindings['where'], Arr::flatten($bindingsWithoutWhere))
+ array_merge($values, Arr::flatten($cleanBindings))
);
}
@@ -388,44 +286,28 @@ class PostgresGrammar extends Grammar
*/
public function compileDelete(Builder $query)
{
- $table = $this->wrapTable($query->from);
+ if (isset($query->joins) || isset($query->limit)) {
+ return $this->compileDeleteWithJoinsOrLimit($query);
+ }
- return isset($query->joins)
- ? $this->compileDeleteWithJoins($query, $table)
- : parent::compileDelete($query);
+ return parent::compileDelete($query);
}
/**
- * Compile a delete query that uses joins.
+ * Compile a delete statement with joins or limit into SQL.
*
* @param \Illuminate\Database\Query\Builder $query
- * @param string $table
* @return string
*/
- protected function compileDeleteWithJoins($query, $table)
+ protected function compileDeleteWithJoinsOrLimit(Builder $query)
{
- $using = ' USING '.collect($query->joins)->map(function ($join) {
- return $this->wrapTable($join->table);
- })->implode(', ');
+ $table = $this->wrapTable($query->from);
- $where = $this->compileUpdateWheres($query);
+ $alias = last(preg_split('/\s+as\s+/i', $query->from));
- return trim("delete from {$table}{$using} {$where}");
- }
+ $selectSql = $this->compileSelect($query->select($alias.'.ctid'));
- /**
- * Prepare the bindings for a delete statement.
- *
- * @param array $bindings
- * @return array
- */
- public function prepareBindingsForDelete(array $bindings)
- {
- $bindingsWithoutWhere = Arr::except($bindings, ['select', 'where']);
-
- return array_values(
- array_merge($bindings['where'], Arr::flatten($bindingsWithoutWhere))
- );
+ return "delete from {$table} where {$this->wrap('ctid')} in ({$selectSql})";
}
/**
@@ -498,7 +380,9 @@ class PostgresGrammar extends Grammar
protected function wrapJsonPathAttributes($path)
{
return array_map(function ($attribute) {
- return "'$attribute'";
+ return filter_var($attribute, FILTER_VALIDATE_INT) !== false
+ ? $attribute
+ : "'$attribute'";
}, $path);
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php
index a6782138e..2c27ddf3c 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php
@@ -2,31 +2,12 @@
namespace Illuminate\Database\Query\Grammars;
+use Illuminate\Database\Query\Builder;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
-use Illuminate\Database\Query\Builder;
class SQLiteGrammar extends Grammar
{
- /**
- * The components that make up a select clause.
- *
- * @var array
- */
- protected $selectComponents = [
- 'aggregate',
- 'columns',
- 'from',
- 'joins',
- 'wheres',
- 'groups',
- 'havings',
- 'orders',
- 'limit',
- 'offset',
- 'lock',
- ];
-
/**
* All of the available clause operators.
*
@@ -39,37 +20,26 @@ class SQLiteGrammar extends Grammar
];
/**
- * Compile a select query into SQL.
+ * Compile the lock into SQL.
*
* @param \Illuminate\Database\Query\Builder $query
+ * @param bool|string $value
* @return string
*/
- public function compileSelect(Builder $query)
+ protected function compileLock(Builder $query, $value)
{
- if ($query->unions && $query->aggregate) {
- return $this->compileUnionAggregate($query);
- }
-
- $sql = parent::compileSelect($query);
-
- if ($query->unions) {
- $sql = 'select * from ('.$sql.') '.$this->compileUnions($query);
- }
-
- return $sql;
+ return '';
}
/**
- * Compile a single union statement.
+ * Wrap a union subquery in parentheses.
*
- * @param array $union
+ * @param string $sql
* @return string
*/
- protected function compileUnion(array $union)
+ protected function wrapUnion($sql)
{
- $conjunction = $union['all'] ? ' union all ' : ' union ';
-
- return $conjunction.'select * from ('.$union['query']->toSql().')';
+ return 'select * from ('.$sql.')';
}
/**
@@ -163,19 +133,19 @@ class SQLiteGrammar extends Grammar
}
/**
- * Compile an insert statement into SQL.
+ * Compile an update statement into SQL.
*
* @param \Illuminate\Database\Query\Builder $query
* @param array $values
* @return string
*/
- public function compileInsert(Builder $query, array $values)
+ public function compileUpdate(Builder $query, array $values)
{
- $table = $this->wrapTable($query->from);
+ if (isset($query->joins) || isset($query->limit)) {
+ return $this->compileUpdateWithJoinsOrLimit($query, $values);
+ }
- return empty($values)
- ? "insert into {$table} DEFAULT VALUES"
- : parent::compileInsert($query, $values);
+ return parent::compileUpdate($query, $values);
}
/**
@@ -191,43 +161,76 @@ class SQLiteGrammar extends Grammar
}
/**
- * Compile an update statement into SQL.
+ * Compile the columns for an update statement.
*
* @param \Illuminate\Database\Query\Builder $query
* @param array $values
* @return string
*/
- public function compileUpdate(Builder $query, $values)
+ protected function compileUpdateColumns(Builder $query, array $values)
{
- $table = $this->wrapTable($query->from);
+ $jsonGroups = $this->groupJsonColumnsForUpdate($values);
- $columns = collect($values)->map(function ($value, $key) {
- return $this->wrap(Str::after($key, '.')).' = '.$this->parameter($value);
+ return collect($values)->reject(function ($value, $key) {
+ return $this->isJsonSelector($key);
+ })->merge($jsonGroups)->map(function ($value, $key) use ($jsonGroups) {
+ $column = last(explode('.', $key));
+
+ $value = isset($jsonGroups[$key]) ? $this->compileJsonPatch($column, $value) : $this->parameter($value);
+
+ return $this->wrap($column).' = '.$value;
})->implode(', ');
+ }
- if (isset($query->joins) || isset($query->limit)) {
- return $this->compileUpdateWithJoinsOrLimit($query, $columns);
+ /**
+ * Group the nested JSON columns.
+ *
+ * @param array $values
+ * @return array
+ */
+ protected function groupJsonColumnsForUpdate(array $values)
+ {
+ $groups = [];
+
+ foreach ($values as $key => $value) {
+ if ($this->isJsonSelector($key)) {
+ Arr::set($groups, str_replace('->', '.', Str::after($key, '.')), $value);
+ }
}
- return trim("update {$table} set {$columns} {$this->compileWheres($query)}");
+ return $groups;
+ }
+
+ /**
+ * Compile a "JSON" patch statement into SQL.
+ *
+ * @param string $column
+ * @param mixed $value
+ * @return string
+ */
+ protected function compileJsonPatch($column, $value)
+ {
+ return "json_patch(ifnull({$this->wrap($column)}, json('{}')), json({$this->parameter($value)}))";
}
/**
* Compile an update statement with joins or limit into SQL.
*
* @param \Illuminate\Database\Query\Builder $query
- * @param string $columns
+ * @param array $values
* @return string
*/
- protected function compileUpdateWithJoinsOrLimit(Builder $query, $columns)
+ protected function compileUpdateWithJoinsOrLimit(Builder $query, array $values)
{
- $segments = preg_split('/\s+as\s+/i', $query->from);
+ $table = $this->wrapTable($query->from);
- $alias = $segments[1] ?? $segments[0];
+ $columns = $this->compileUpdateColumns($query, $values);
- $selectSql = parent::compileSelect($query->select($alias.'.rowid'));
+ $alias = last(preg_split('/\s+as\s+/i', $query->from));
- return "update {$this->wrapTable($query->from)} set {$columns} where {$this->wrap('rowid')} in ({$selectSql})";
+ $selectSql = $this->compileSelect($query->select($alias.'.rowid'));
+
+ return "update {$table} set {$columns} where {$this->wrap('rowid')} in ({$selectSql})";
}
/**
@@ -239,6 +242,14 @@ class SQLiteGrammar extends Grammar
*/
public function prepareBindingsForUpdate(array $bindings, array $values)
{
+ $groups = $this->groupJsonColumnsForUpdate($values);
+
+ $values = collect($values)->reject(function ($value, $key) {
+ return $this->isJsonSelector($key);
+ })->merge($groups)->map(function ($value) {
+ return is_array($value) ? json_encode($value) : $value;
+ })->all();
+
$cleanBindings = Arr::except($bindings, 'select');
return array_values(
@@ -258,9 +269,7 @@ class SQLiteGrammar extends Grammar
return $this->compileDeleteWithJoinsOrLimit($query);
}
- $wheres = is_array($query->wheres) ? $this->compileWheres($query) : '';
-
- return trim("delete from {$this->wrapTable($query->from)} $wheres");
+ return parent::compileDelete($query);
}
/**
@@ -271,13 +280,13 @@ class SQLiteGrammar extends Grammar
*/
protected function compileDeleteWithJoinsOrLimit(Builder $query)
{
- $segments = preg_split('/\s+as\s+/i', $query->from);
+ $table = $this->wrapTable($query->from);
- $alias = $segments[1] ?? $segments[0];
+ $alias = last(preg_split('/\s+as\s+/i', $query->from));
- $selectSql = parent::compileSelect($query->select($alias.'.rowid'));
+ $selectSql = $this->compileSelect($query->select($alias.'.rowid'));
- return "delete from {$this->wrapTable($query->from)} where {$this->wrap('rowid')} in ({$selectSql})";
+ return "delete from {$table} where {$this->wrap('rowid')} in ({$selectSql})";
}
/**
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php
index 56f917a9d..9dfc22939 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php
@@ -2,8 +2,9 @@
namespace Illuminate\Database\Query\Grammars;
-use Illuminate\Support\Arr;
use Illuminate\Database\Query\Builder;
+use Illuminate\Support\Arr;
+use Illuminate\Support\Str;
class SqlServerGrammar extends Grammar
{
@@ -232,6 +233,23 @@ class SqlServerGrammar extends Grammar
return ">= {$start}";
}
+ /**
+ * Compile a delete statement without joins into SQL.
+ *
+ * @param \Illuminate\Database\Query\Builder $query
+ * @param string $table
+ * @param string $where
+ * @return string
+ */
+ protected function compileDeleteWithoutJoins(Builder $query, $table, $where)
+ {
+ $sql = parent::compileDeleteWithoutJoins($query, $table, $where);
+
+ return ! is_null($query->limit) && $query->limit > 0 && $query->offset <= 0
+ ? Str::replaceFirst('delete', 'delete top ('.$query->limit.')', $sql)
+ : $sql;
+ }
+
/**
* Compile the random statement into SQL.
*
@@ -279,6 +297,17 @@ class SqlServerGrammar extends Grammar
return '';
}
+ /**
+ * Wrap a union subquery in parentheses.
+ *
+ * @param string $sql
+ * @return string
+ */
+ protected function wrapUnion($sql)
+ {
+ return 'select * from ('.$sql.') as '.$this->wrapTable('temp_table');
+ }
+
/**
* Compile an exists statement into SQL.
*
@@ -295,105 +324,21 @@ class SqlServerGrammar extends Grammar
}
/**
- * Compile a delete statement into SQL.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @return string
- */
- public function compileDelete(Builder $query)
- {
- $table = $this->wrapTable($query->from);
-
- $where = is_array($query->wheres) ? $this->compileWheres($query) : '';
-
- return isset($query->joins)
- ? $this->compileDeleteWithJoins($query, $table, $where)
- : trim("delete from {$table} {$where}");
- }
-
- /**
- * Compile a delete statement with joins into SQL.
+ * Compile an update statement with joins into SQL.
*
* @param \Illuminate\Database\Query\Builder $query
* @param string $table
+ * @param string $columns
* @param string $where
* @return string
*/
- protected function compileDeleteWithJoins(Builder $query, $table, $where)
+ protected function compileUpdateWithJoins(Builder $query, $table, $columns, $where)
{
- $joins = ' '.$this->compileJoins($query, $query->joins);
+ $alias = last(explode(' as ', $table));
- $alias = stripos($table, ' as ') !== false
- ? explode(' as ', $table)[1] : $table;
+ $joins = $this->compileJoins($query, $query->joins);
- return trim("delete {$alias} from {$table}{$joins} {$where}");
- }
-
- /**
- * Compile a truncate table statement into SQL.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @return array
- */
- public function compileTruncate(Builder $query)
- {
- return ['truncate table '.$this->wrapTable($query->from) => []];
- }
-
- /**
- * Compile an update statement into SQL.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $values
- * @return string
- */
- public function compileUpdate(Builder $query, $values)
- {
- [$table, $alias] = $this->parseUpdateTable($query->from);
-
- // Each one of the columns in the update statements needs to be wrapped in the
- // keyword identifiers, also a place-holder needs to be created for each of
- // the values in the list of bindings so we can make the sets statements.
- $columns = collect($values)->map(function ($value, $key) {
- return $this->wrap($key).' = '.$this->parameter($value);
- })->implode(', ');
-
- // If the query has any "join" clauses, we will setup the joins on the builder
- // and compile them so we can attach them to this update, as update queries
- // can get join statements to attach to other tables when they're needed.
- $joins = '';
-
- if (isset($query->joins)) {
- $joins = ' '.$this->compileJoins($query, $query->joins);
- }
-
- // Of course, update queries may also be constrained by where clauses so we'll
- // need to compile the where clauses and attach it to the query so only the
- // intended records are updated by the SQL statements we generate to run.
- $where = $this->compileWheres($query);
-
- if (! empty($joins)) {
- return trim("update {$alias} set {$columns} from {$table}{$joins} {$where}");
- }
-
- return trim("update {$table}{$joins} set $columns $where");
- }
-
- /**
- * Get the table and alias for the given table.
- *
- * @param string $table
- * @return array
- */
- protected function parseUpdateTable($table)
- {
- $table = $alias = $this->wrapTable($table);
-
- if (stripos($table, '] as [') !== false) {
- $alias = '['.explode('] as [', $table)[1];
- }
-
- return [$table, $alias];
+ return "update {$alias} set {$columns} from {$table} {$joins} {$where}";
}
/**
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/JoinClause.php b/vendor/laravel/framework/src/Illuminate/Database/Query/JoinClause.php
index 4e17842b5..800da42ef 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Query/JoinClause.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Query/JoinClause.php
@@ -51,7 +51,7 @@ class JoinClause extends Builder
/**
* Create a new join clause instance.
*
- * @param \Illuminate\Database\Query\Builder $parentQuery
+ * @param \Illuminate\Database\Query\Builder $parentQuery
* @param string $type
* @param string $table
* @return void
@@ -84,7 +84,7 @@ class JoinClause extends Builder
*
* @param \Closure|string $first
* @param string|null $operator
- * @param string|null $second
+ * @param \Illuminate\Database\Query\Expression|string|null $second
* @param string $boolean
* @return $this
*
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/JsonExpression.php b/vendor/laravel/framework/src/Illuminate/Database/Query/JsonExpression.php
deleted file mode 100644
index 3d68ee612..000000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Query/JsonExpression.php
+++ /dev/null
@@ -1,51 +0,0 @@
-getJsonBindingParameter($value)
- );
- }
-
- /**
- * Translate the given value into the appropriate JSON binding parameter.
- *
- * @param mixed $value
- * @return string
- *
- * @throws \InvalidArgumentException
- */
- protected function getJsonBindingParameter($value)
- {
- if ($value instanceof Expression) {
- return $value->getValue();
- }
-
- switch ($type = gettype($value)) {
- case 'boolean':
- return $value ? 'true' : 'false';
- case 'NULL':
- case 'integer':
- case 'double':
- case 'string':
- return '?';
- case 'object':
- case 'array':
- return '?';
- }
-
- throw new InvalidArgumentException("JSON value is of illegal type: {$type}");
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/PostgresProcessor.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/PostgresProcessor.php
index 356f0ca03..5956a8fb3 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/PostgresProcessor.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/PostgresProcessor.php
@@ -11,13 +11,17 @@ class PostgresProcessor extends Processor
*
* @param \Illuminate\Database\Query\Builder $query
* @param string $sql
- * @param array $values
+ * @param array $values
* @param string|null $sequence
* @return int
*/
public function processInsertGetId(Builder $query, $sql, $values, $sequence = null)
{
- $result = $query->getConnection()->selectFromWriteConnection($sql, $values)[0];
+ $connection = $query->getConnection();
+
+ $connection->recordsHaveBeenModified();
+
+ $result = $connection->selectFromWriteConnection($sql, $values)[0];
$sequence = $sequence ?: 'id';
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php
index 5e318d307..0069b436d 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php
@@ -23,7 +23,7 @@ class Processor
*
* @param \Illuminate\Database\Query\Builder $query
* @param string $sql
- * @param array $values
+ * @param array $values
* @param string|null $sequence
* @return int
*/
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/SqlServerProcessor.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/SqlServerProcessor.php
index fab071d9b..49476f095 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/SqlServerProcessor.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/SqlServerProcessor.php
@@ -13,7 +13,7 @@ class SqlServerProcessor extends Processor
*
* @param \Illuminate\Database\Query\Builder $query
* @param string $sql
- * @param array $values
+ * @param array $values
* @param string|null $sequence
* @return int
*/
diff --git a/vendor/laravel/framework/src/Illuminate/Database/QueryException.php b/vendor/laravel/framework/src/Illuminate/Database/QueryException.php
index 9a3687d65..74e5a31aa 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/QueryException.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/QueryException.php
@@ -2,8 +2,9 @@
namespace Illuminate\Database;
-use PDOException;
use Illuminate\Support\Str;
+use PDOException;
+use Throwable;
class QueryException extends PDOException
{
@@ -26,10 +27,10 @@ class QueryException extends PDOException
*
* @param string $sql
* @param array $bindings
- * @param \Exception $previous
+ * @param \Throwable $previous
* @return void
*/
- public function __construct($sql, array $bindings, $previous)
+ public function __construct($sql, array $bindings, Throwable $previous)
{
parent::__construct('', 0, $previous);
@@ -48,10 +49,10 @@ class QueryException extends PDOException
*
* @param string $sql
* @param array $bindings
- * @param \Exception $previous
+ * @param \Throwable $previous
* @return string
*/
- protected function formatMessage($sql, $bindings, $previous)
+ protected function formatMessage($sql, $bindings, Throwable $previous)
{
return $previous->getMessage().' (SQL: '.Str::replaceArray('?', $bindings, $sql).')';
}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/SQLiteConnection.php b/vendor/laravel/framework/src/Illuminate/Database/SQLiteConnection.php
index 21f890db3..4990fdd29 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/SQLiteConnection.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/SQLiteConnection.php
@@ -2,21 +2,21 @@
namespace Illuminate\Database;
-use Illuminate\Database\Schema\SQLiteBuilder;
-use Illuminate\Database\Query\Processors\SQLiteProcessor;
use Doctrine\DBAL\Driver\PDOSqlite\Driver as DoctrineDriver;
use Illuminate\Database\Query\Grammars\SQLiteGrammar as QueryGrammar;
+use Illuminate\Database\Query\Processors\SQLiteProcessor;
use Illuminate\Database\Schema\Grammars\SQLiteGrammar as SchemaGrammar;
+use Illuminate\Database\Schema\SQLiteBuilder;
class SQLiteConnection extends Connection
{
/**
* Create a new database connection instance.
*
- * @param \PDO|\Closure $pdo
- * @param string $database
- * @param string $tablePrefix
- * @param array $config
+ * @param \PDO|\Closure $pdo
+ * @param string $database
+ * @param string $tablePrefix
+ * @param array $config
* @return void
*/
public function __construct($pdo, $database = '', $tablePrefix = '', array $config = [])
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php
index f555c44b7..f01603f76 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php
@@ -2,13 +2,14 @@
namespace Illuminate\Database\Schema;
-use Closure;
use BadMethodCallException;
-use Illuminate\Support\Fluent;
+use Closure;
use Illuminate\Database\Connection;
-use Illuminate\Support\Traits\Macroable;
-use Illuminate\Database\SQLiteConnection;
+use Illuminate\Database\Query\Expression;
use Illuminate\Database\Schema\Grammars\Grammar;
+use Illuminate\Database\SQLiteConnection;
+use Illuminate\Support\Fluent;
+use Illuminate\Support\Traits\Macroable;
class Blueprint
{
@@ -51,11 +52,15 @@ class Blueprint
/**
* The default character set that should be used for the table.
+ *
+ * @var string
*/
public $charset;
/**
* The collation that should be used for the table.
+ *
+ * @var string
*/
public $collation;
@@ -119,7 +124,7 @@ class Blueprint
foreach ($this->commands as $command) {
$method = 'compile'.ucfirst($command->name);
- if (method_exists($grammar, $method)) {
+ if (method_exists($grammar, $method) || $grammar::hasMacro($method)) {
if (! is_null($sql = $grammar->$method($this, $command, $connection))) {
$statements = array_merge($statements, (array) $sql);
}
@@ -202,6 +207,7 @@ class Blueprint
// index method can be called without a name and it will generate one.
if ($column->{$index} === true) {
$this->{$index}($column->name);
+ $column->{$index} = false;
continue 2;
}
@@ -211,6 +217,7 @@ class Blueprint
// the index since the developer specified the explicit name for this.
elseif (isset($column->{$index})) {
$this->{$index}($column->name, $column->{$index});
+ $column->{$index} = false;
continue 2;
}
@@ -515,16 +522,45 @@ class Blueprint
return $this->indexCommand('spatialIndex', $columns, $name);
}
+ /**
+ * Specify a raw index for the table.
+ *
+ * @param string $expression
+ * @param string $name
+ * @return \Illuminate\Support\Fluent
+ */
+ public function rawIndex($expression, $name)
+ {
+ return $this->index([new Expression($expression)], $name);
+ }
+
/**
* Specify a foreign key for the table.
*
* @param string|array $columns
* @param string|null $name
- * @return \Illuminate\Support\Fluent|\Illuminate\Database\Schema\ForeignKeyDefinition
+ * @return \Illuminate\Database\Schema\ForeignKeyDefinition
*/
public function foreign($columns, $name = null)
{
- return $this->indexCommand('foreign', $columns, $name);
+ $command = new ForeignKeyDefinition(
+ $this->indexCommand('foreign', $columns, $name)->getAttributes()
+ );
+
+ $this->commands[count($this->commands) - 1] = $command;
+
+ return $command;
+ }
+
+ /**
+ * Create a new auto-incrementing big integer (8-byte) column on the table.
+ *
+ * @param string $column
+ * @return \Illuminate\Database\Schema\ColumnDefinition
+ */
+ public function id($column = 'id')
+ {
+ return $this->bigIncrements($column);
}
/**
@@ -779,17 +815,36 @@ class Blueprint
return $this->bigInteger($column, $autoIncrement, true);
}
+ /**
+ * Create a new unsigned big integer (8-byte) column on the table.
+ *
+ * @param string $column
+ * @return \Illuminate\Database\Schema\ForeignIdColumnDefinition
+ */
+ public function foreignId($column)
+ {
+ $this->columns[] = $column = new ForeignIdColumnDefinition($this, [
+ 'type' => 'bigInteger',
+ 'name' => $column,
+ 'autoIncrement' => false,
+ 'unsigned' => true,
+ ]);
+
+ return $column;
+ }
+
/**
* Create a new float column on the table.
*
* @param string $column
* @param int $total
* @param int $places
+ * @param bool $unsigned
* @return \Illuminate\Database\Schema\ColumnDefinition
*/
- public function float($column, $total = 8, $places = 2)
+ public function float($column, $total = 8, $places = 2, $unsigned = false)
{
- return $this->addColumn('float', $column, compact('total', 'places'));
+ return $this->addColumn('float', $column, compact('total', 'places', 'unsigned'));
}
/**
@@ -798,11 +853,12 @@ class Blueprint
* @param string $column
* @param int|null $total
* @param int|null $places
+ * @param bool $unsigned
* @return \Illuminate\Database\Schema\ColumnDefinition
*/
- public function double($column, $total = null, $places = null)
+ public function double($column, $total = null, $places = null, $unsigned = false)
{
- return $this->addColumn('double', $column, compact('total', 'places'));
+ return $this->addColumn('double', $column, compact('total', 'places', 'unsigned'));
}
/**
@@ -811,11 +867,38 @@ class Blueprint
* @param string $column
* @param int $total
* @param int $places
+ * @param bool $unsigned
* @return \Illuminate\Database\Schema\ColumnDefinition
*/
- public function decimal($column, $total = 8, $places = 2)
+ public function decimal($column, $total = 8, $places = 2, $unsigned = false)
{
- return $this->addColumn('decimal', $column, compact('total', 'places'));
+ return $this->addColumn('decimal', $column, compact('total', 'places', 'unsigned'));
+ }
+
+ /**
+ * Create a new unsigned float column on the table.
+ *
+ * @param string $column
+ * @param int $total
+ * @param int $places
+ * @return \Illuminate\Database\Schema\ColumnDefinition
+ */
+ public function unsignedFloat($column, $total = 8, $places = 2)
+ {
+ return $this->float($column, $total, $places, true);
+ }
+
+ /**
+ * Create a new unsigned double column on the table.
+ *
+ * @param string $column
+ * @param int $total
+ * @param int $places
+ * @return \Illuminate\Database\Schema\ColumnDefinition
+ */
+ public function unsignedDouble($column, $total = null, $places = null)
+ {
+ return $this->double($column, $total, $places, true);
}
/**
@@ -828,9 +911,7 @@ class Blueprint
*/
public function unsignedDecimal($column, $total = 8, $places = 2)
{
- return $this->addColumn('decimal', $column, [
- 'total' => $total, 'places' => $places, 'unsigned' => true,
- ]);
+ return $this->decimal($column, $total, $places, true);
}
/**
@@ -1069,6 +1150,20 @@ class Blueprint
return $this->addColumn('uuid', $column);
}
+ /**
+ * Create a new UUID column on the table with a foreign key constraint.
+ *
+ * @param string $column
+ * @return \Illuminate\Database\Schema\ForeignIdColumnDefinition
+ */
+ public function foreignUuid($column)
+ {
+ return $this->columns[] = new ForeignIdColumnDefinition($this, [
+ 'type' => 'uuid',
+ 'name' => $column,
+ ]);
+ }
+
/**
* Create a new IP address column on the table.
*
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php
index 8cdf0cfd5..93571b2c4 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php
@@ -3,10 +3,10 @@
namespace Illuminate\Database\Schema;
use Closure;
-use LogicException;
-use RuntimeException;
use Doctrine\DBAL\Types\Type;
use Illuminate\Database\Connection;
+use LogicException;
+use RuntimeException;
class Builder
{
@@ -94,7 +94,7 @@ class Builder
* Determine if the given table has given columns.
*
* @param string $table
- * @param array $columns
+ * @param array $columns
* @return bool
*/
public function hasColumns($table, array $columns)
@@ -142,7 +142,7 @@ class Builder
/**
* Modify a table on the schema.
*
- * @param string $table
+ * @param string $table
* @param \Closure $callback
* @return void
*/
@@ -154,7 +154,7 @@ class Builder
/**
* Create a new table on the schema.
*
- * @param string $table
+ * @param string $table
* @param \Closure $callback
* @return void
*/
@@ -229,6 +229,18 @@ class Builder
throw new LogicException('This database driver does not support dropping all types.');
}
+ /**
+ * Get all of the table names for the database.
+ *
+ * @return void
+ *
+ * @throws \LogicException
+ */
+ public function getAllTables()
+ {
+ throw new LogicException('This database driver does not support getting all tables.');
+ }
+
/**
* Rename a table on the schema.
*
@@ -307,6 +319,7 @@ class Builder
* @return void
*
* @throws \Doctrine\DBAL\DBALException
+ * @throws \RuntimeException
*/
public function registerCustomDoctrineType($class, $name, $type)
{
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/ColumnDefinition.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/ColumnDefinition.php
index 00e1dadf6..c13e69ea9 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/Schema/ColumnDefinition.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/ColumnDefinition.php
@@ -2,30 +2,31 @@
namespace Illuminate\Database\Schema;
-use Illuminate\Support\Fluent;
use Illuminate\Database\Query\Expression;
+use Illuminate\Support\Fluent;
/**
- * @method ColumnDefinition after(string $column) Place the column "after" another column (MySQL)
- * @method ColumnDefinition always() Used as a modifier for generatedAs() (PostgreSQL)
- * @method ColumnDefinition autoIncrement() Set INTEGER columns as auto-increment (primary key)
- * @method ColumnDefinition change() Change the column
- * @method ColumnDefinition charset(string $charset) Specify a character set for the column (MySQL)
- * @method ColumnDefinition collation(string $collation) Specify a collation for the column (MySQL/PostgreSQL/SQL Server)
- * @method ColumnDefinition comment(string $comment) Add a comment to the column (MySQL)
- * @method ColumnDefinition default(mixed $value) Specify a "default" value for the column
- * @method ColumnDefinition first() Place the column "first" in the table (MySQL)
- * @method ColumnDefinition generatedAs(string|Expression $expression = null) Create a SQL compliant identity column (PostgreSQL)
- * @method ColumnDefinition index(string $indexName = null) Add an index
- * @method ColumnDefinition nullable(bool $value = true) Allow NULL values to be inserted into the column
- * @method ColumnDefinition primary() Add a primary index
- * @method ColumnDefinition spatialIndex() Add a spatial index
- * @method ColumnDefinition storedAs(string $expression) Create a stored generated column (MySQL)
- * @method ColumnDefinition unique() Add a unique index
- * @method ColumnDefinition unsigned() Set the INTEGER column as UNSIGNED (MySQL)
- * @method ColumnDefinition useCurrent() Set the TIMESTAMP column to use CURRENT_TIMESTAMP as default value
- * @method ColumnDefinition virtualAs(string $expression) Create a virtual generated column (MySQL)
- * @method ColumnDefinition persisted() Mark the computed generated column as persistent (SQL Server)
+ * @method $this after(string $column) Place the column "after" another column (MySQL)
+ * @method $this always() Used as a modifier for generatedAs() (PostgreSQL)
+ * @method $this autoIncrement() Set INTEGER columns as auto-increment (primary key)
+ * @method $this change() Change the column
+ * @method $this charset(string $charset) Specify a character set for the column (MySQL)
+ * @method $this collation(string $collation) Specify a collation for the column (MySQL/PostgreSQL/SQL Server)
+ * @method $this comment(string $comment) Add a comment to the column (MySQL)
+ * @method $this default(mixed $value) Specify a "default" value for the column
+ * @method $this first() Place the column "first" in the table (MySQL)
+ * @method $this generatedAs(string|Expression $expression = null) Create a SQL compliant identity column (PostgreSQL)
+ * @method $this index(string $indexName = null) Add an index
+ * @method $this nullable(bool $value = true) Allow NULL values to be inserted into the column
+ * @method $this persisted() Mark the computed generated column as persistent (SQL Server)
+ * @method $this primary() Add a primary index
+ * @method $this spatialIndex() Add a spatial index
+ * @method $this storedAs(string $expression) Create a stored generated column (MySQL)
+ * @method $this type(string $type) Specify a type for the column
+ * @method $this unique(string $indexName = null) Add a unique index
+ * @method $this unsigned() Set the INTEGER column as UNSIGNED (MySQL)
+ * @method $this useCurrent() Set the TIMESTAMP column to use CURRENT_TIMESTAMP as default value
+ * @method $this virtualAs(string $expression) Create a virtual generated column (MySQL)
*/
class ColumnDefinition extends Fluent
{
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/ForeignIdColumnDefinition.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/ForeignIdColumnDefinition.php
new file mode 100644
index 000000000..1508ee0de
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/ForeignIdColumnDefinition.php
@@ -0,0 +1,52 @@
+blueprint = $blueprint;
+ }
+
+ /**
+ * Create a foreign key constraint on this column referencing the "id" column of the conventionally related table.
+ *
+ * @param string|null $table
+ * @param string $column
+ * @return \Illuminate\Support\Fluent|\Illuminate\Database\Schema\ForeignKeyDefinition
+ */
+ public function constrained($table = null, $column = 'id')
+ {
+ return $this->references($column)->on($table ?? Str::plural(Str::beforeLast($this->name, '_'.$column)));
+ }
+
+ /**
+ * Specify which column this foreign ID references on another table.
+ *
+ * @param string $column
+ * @return \Illuminate\Support\Fluent|\Illuminate\Database\Schema\ForeignKeyDefinition
+ */
+ public function references($column)
+ {
+ return $this->blueprint->foreign($this->name)->references($column);
+ }
+}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/ForeignKeyDefinition.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/ForeignKeyDefinition.php
index 79cc3d473..6fe970608 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/Schema/ForeignKeyDefinition.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/ForeignKeyDefinition.php
@@ -5,14 +5,42 @@ namespace Illuminate\Database\Schema;
use Illuminate\Support\Fluent;
/**
- * @method ForeignKeyDefinition references(string|array $columns) Specify the referenced column(s)
+ * @method ForeignKeyDefinition deferrable(bool $value = true) Set the foreign key as deferrable (PostgreSQL)
+ * @method ForeignKeyDefinition initiallyImmediate(bool $value = true) Set the default time to check the constraint (PostgreSQL)
* @method ForeignKeyDefinition on(string $table) Specify the referenced table
* @method ForeignKeyDefinition onDelete(string $action) Add an ON DELETE action
* @method ForeignKeyDefinition onUpdate(string $action) Add an ON UPDATE action
- * @method ForeignKeyDefinition deferrable(bool $value = true) Set the foreign key as deferrable (PostgreSQL)
- * @method ForeignKeyDefinition initiallyImmediate(bool $value = true) Set the default time to check the constraint (PostgreSQL)
+ * @method ForeignKeyDefinition references(string|array $columns) Specify the referenced column(s)
*/
class ForeignKeyDefinition extends Fluent
{
- //
+ /**
+ * Indicate that updates should cascade.
+ *
+ * @return $this
+ */
+ public function cascadeOnUpdate()
+ {
+ return $this->onUpdate('cascade');
+ }
+
+ /**
+ * Indicate that deletes should cascade.
+ *
+ * @return $this
+ */
+ public function cascadeOnDelete()
+ {
+ return $this->onDelete('cascade');
+ }
+
+ /**
+ * Indicate that deletes should set the foreign key value to null.
+ *
+ * @return $this
+ */
+ public function nullOnDelete()
+ {
+ return $this->onDelete('set null');
+ }
}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/ChangeColumn.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/ChangeColumn.php
index 8fc3b8c8a..6167b21e2 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/ChangeColumn.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/ChangeColumn.php
@@ -2,14 +2,14 @@
namespace Illuminate\Database\Schema\Grammars;
-use RuntimeException;
-use Doctrine\DBAL\Types\Type;
-use Illuminate\Support\Fluent;
-use Doctrine\DBAL\Schema\Table;
-use Illuminate\Database\Connection;
-use Doctrine\DBAL\Schema\Comparator;
-use Illuminate\Database\Schema\Blueprint;
use Doctrine\DBAL\Schema\AbstractSchemaManager as SchemaManager;
+use Doctrine\DBAL\Schema\Comparator;
+use Doctrine\DBAL\Schema\Table;
+use Doctrine\DBAL\Types\Type;
+use Illuminate\Database\Connection;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Fluent;
+use RuntimeException;
class ChangeColumn
{
@@ -19,7 +19,7 @@ class ChangeColumn
* @param \Illuminate\Database\Schema\Grammars\Grammar $grammar
* @param \Illuminate\Database\Schema\Blueprint $blueprint
* @param \Illuminate\Support\Fluent $command
- * @param \Illuminate\Database\Connection $connection
+ * @param \Illuminate\Database\Connection $connection
* @return array
*
* @throws \RuntimeException
@@ -28,17 +28,21 @@ class ChangeColumn
{
if (! $connection->isDoctrineAvailable()) {
throw new RuntimeException(sprintf(
- 'Changing columns for table "%s" requires Doctrine DBAL; install "doctrine/dbal".',
+ 'Changing columns for table "%s" requires Doctrine DBAL. Please install the doctrine/dbal package.',
$blueprint->getTable()
));
}
+ $schema = $connection->getDoctrineSchemaManager();
+ $databasePlatform = $schema->getDatabasePlatform();
+ $databasePlatform->registerDoctrineTypeMapping('enum', 'string');
+
$tableDiff = static::getChangedDiff(
- $grammar, $blueprint, $schema = $connection->getDoctrineSchemaManager()
+ $grammar, $blueprint, $schema
);
if ($tableDiff !== false) {
- return (array) $schema->getDatabasePlatform()->getAlterTableSQL($tableDiff);
+ return (array) $databasePlatform->getAlterTableSQL($tableDiff);
}
return [];
@@ -121,9 +125,10 @@ class ChangeColumn
$options['length'] = static::calculateDoctrineTextLength($fluent['type']);
}
- if (in_array($fluent['type'], ['json', 'binary'])) {
+ if (static::doesntNeedCharacterOptions($fluent['type'])) {
$options['customSchemaOptions'] = [
'collation' => '',
+ 'charset' => '',
];
}
@@ -154,6 +159,9 @@ class ChangeColumn
case 'binary':
$type = 'blob';
break;
+ case 'uuid':
+ $type = 'guid';
+ break;
}
return Type::getType($type);
@@ -177,6 +185,31 @@ class ChangeColumn
}
}
+ /**
+ * Determine if the given type does not need character / collation options.
+ *
+ * @param string $type
+ * @return bool
+ */
+ protected static function doesntNeedCharacterOptions($type)
+ {
+ return in_array($type, [
+ 'bigInteger',
+ 'binary',
+ 'boolean',
+ 'date',
+ 'decimal',
+ 'double',
+ 'float',
+ 'integer',
+ 'json',
+ 'mediumInteger',
+ 'smallInteger',
+ 'time',
+ 'tinyInteger',
+ ]);
+ }
+
/**
* Get the matching Doctrine option for a given Fluent attribute name.
*
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/Grammar.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/Grammar.php
index 0f81731b3..b60dfe817 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/Grammar.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/Grammar.php
@@ -2,14 +2,14 @@
namespace Illuminate\Database\Schema\Grammars;
-use RuntimeException;
-use Illuminate\Support\Fluent;
+use Doctrine\DBAL\Schema\AbstractSchemaManager as SchemaManager;
use Doctrine\DBAL\Schema\TableDiff;
use Illuminate\Database\Connection;
+use Illuminate\Database\Grammar as BaseGrammar;
use Illuminate\Database\Query\Expression;
use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Grammar as BaseGrammar;
-use Doctrine\DBAL\Schema\AbstractSchemaManager as SchemaManager;
+use Illuminate\Support\Fluent;
+use RuntimeException;
abstract class Grammar extends BaseGrammar
{
@@ -45,7 +45,7 @@ abstract class Grammar extends BaseGrammar
*
* @param \Illuminate\Database\Schema\Blueprint $blueprint
* @param \Illuminate\Support\Fluent $command
- * @param \Illuminate\Database\Connection $connection
+ * @param \Illuminate\Database\Connection $connection
* @return array
*
* @throws \RuntimeException
@@ -98,7 +98,7 @@ abstract class Grammar extends BaseGrammar
/**
* Compile the blueprint's column definitions.
*
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
+ * @param \Illuminate\Database\Schema\Blueprint $blueprint
* @return array
*/
protected function getColumns(Blueprint $blueprint)
@@ -194,7 +194,7 @@ abstract class Grammar extends BaseGrammar
* Add a prefix to an array of values.
*
* @param string $prefix
- * @param array $values
+ * @param array $values
* @return array
*/
public function prefixArray($prefix, array $values)
@@ -207,7 +207,7 @@ abstract class Grammar extends BaseGrammar
/**
* Wrap a table in keyword identifiers.
*
- * @param mixed $table
+ * @param mixed $table
* @return string
*/
public function wrapTable($table)
@@ -221,7 +221,7 @@ abstract class Grammar extends BaseGrammar
* Wrap a value in keyword identifiers.
*
* @param \Illuminate\Database\Query\Expression|string $value
- * @param bool $prefixAlias
+ * @param bool $prefixAlias
* @return string
*/
public function wrap($value, $prefixAlias = false)
@@ -234,7 +234,7 @@ abstract class Grammar extends BaseGrammar
/**
* Format a value so that it can be used in "default" clauses.
*
- * @param mixed $value
+ * @param mixed $value
* @return string
*/
protected function getDefaultValue($value)
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php
index dc933c961..30afde966 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php
@@ -2,10 +2,10 @@
namespace Illuminate\Database\Schema\Grammars;
-use RuntimeException;
-use Illuminate\Support\Fluent;
use Illuminate\Database\Connection;
use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Fluent;
+use RuntimeException;
class MySqlGrammar extends Grammar
{
@@ -16,7 +16,7 @@ class MySqlGrammar extends Grammar
*/
protected $modifiers = [
'Unsigned', 'Charset', 'Collate', 'VirtualAs', 'StoredAs', 'Nullable',
- 'Default', 'Increment', 'Comment', 'After', 'First', 'Srid',
+ 'Srid', 'Default', 'Increment', 'Comment', 'After', 'First',
];
/**
@@ -346,8 +346,8 @@ class MySqlGrammar extends Grammar
/**
* Compile a rename index command.
*
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
+ * @param \Illuminate\Database\Schema\Blueprint $blueprint
+ * @param \Illuminate\Support\Fluent $command
* @return string
*/
public function compileRenameIndex(Blueprint $blueprint, Fluent $command)
@@ -690,7 +690,9 @@ class MySqlGrammar extends Grammar
{
$columnType = $column->precision ? "timestamp($column->precision)" : 'timestamp';
- return $column->useCurrent ? "$columnType default CURRENT_TIMESTAMP" : $columnType;
+ $defaultCurrent = $column->precision ? "CURRENT_TIMESTAMP($column->precision)" : 'CURRENT_TIMESTAMP';
+
+ return $column->useCurrent ? "$columnType default $defaultCurrent" : $columnType;
}
/**
@@ -942,6 +944,10 @@ class MySqlGrammar extends Grammar
if (is_null($column->virtualAs) && is_null($column->storedAs)) {
return $column->nullable ? ' null' : ' not null';
}
+
+ if ($column->nullable === false) {
+ return ' not null';
+ }
}
/**
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php
index 0f85bc96b..0c1dd2e59 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php
@@ -2,8 +2,8 @@
namespace Illuminate\Database\Schema\Grammars;
-use Illuminate\Support\Fluent;
use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Fluent;
class PostgresGrammar extends Grammar
{
@@ -19,7 +19,7 @@ class PostgresGrammar extends Grammar
*
* @var array
*/
- protected $modifiers = ['Collate', 'Increment', 'Nullable', 'Default'];
+ protected $modifiers = ['Collate', 'Increment', 'Nullable', 'Default', 'VirtualAs', 'StoredAs'];
/**
* The columns available as serials.
@@ -222,7 +222,7 @@ class PostgresGrammar extends Grammar
/**
* Compile the SQL needed to drop all types.
*
- * @param array $types
+ * @param array $types
* @return string
*/
public function compileDropAllTypes($types)
@@ -233,23 +233,23 @@ class PostgresGrammar extends Grammar
/**
* Compile the SQL needed to retrieve all table names.
*
- * @param string $schema
+ * @param string|array $schema
* @return string
*/
public function compileGetAllTables($schema)
{
- return "select tablename from pg_catalog.pg_tables where schemaname = '{$schema}'";
+ return "select tablename from pg_catalog.pg_tables where schemaname in ('".implode("','", (array) $schema)."')";
}
/**
* Compile the SQL needed to retrieve all view names.
*
- * @param string $schema
+ * @param string|array $schema
* @return string
*/
public function compileGetAllViews($schema)
{
- return "select viewname from pg_catalog.pg_views where schemaname = '{$schema}'";
+ return "select viewname from pg_catalog.pg_views where schemaname in ('".implode("','", (array) $schema)."')";
}
/**
@@ -359,8 +359,8 @@ class PostgresGrammar extends Grammar
/**
* Compile a rename index command.
*
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
+ * @param \Illuminate\Database\Schema\Blueprint $blueprint
+ * @param \Illuminate\Support\Fluent $command
* @return string
*/
public function compileRenameIndex(Blueprint $blueprint, Fluent $command)
@@ -685,7 +685,7 @@ class PostgresGrammar extends Grammar
*/
protected function typeTime(Fluent $column)
{
- return "time($column->precision) without time zone";
+ return 'time'.(is_null($column->precision) ? '' : "($column->precision)").' without time zone';
}
/**
@@ -696,7 +696,7 @@ class PostgresGrammar extends Grammar
*/
protected function typeTimeTz(Fluent $column)
{
- return "time($column->precision) with time zone";
+ return 'time'.(is_null($column->precision) ? '' : "($column->precision)").' with time zone';
}
/**
@@ -707,7 +707,7 @@ class PostgresGrammar extends Grammar
*/
protected function typeTimestamp(Fluent $column)
{
- $columnType = "timestamp($column->precision) without time zone";
+ $columnType = 'timestamp'.(is_null($column->precision) ? '' : "($column->precision)").' without time zone';
return $column->useCurrent ? "$columnType default CURRENT_TIMESTAMP" : $columnType;
}
@@ -720,7 +720,7 @@ class PostgresGrammar extends Grammar
*/
protected function typeTimestampTz(Fluent $column)
{
- $columnType = "timestamp($column->precision) with time zone";
+ $columnType = 'timestamp'.(is_null($column->precision) ? '' : "($column->precision)").' with time zone';
return $column->useCurrent ? "$columnType default CURRENT_TIMESTAMP" : $columnType;
}
@@ -788,7 +788,7 @@ class PostgresGrammar extends Grammar
*/
protected function typeGeometry(Fluent $column)
{
- return $this->formatPostGisType('geometry');
+ return $this->formatPostGisType('geometry', $column);
}
/**
@@ -799,7 +799,7 @@ class PostgresGrammar extends Grammar
*/
protected function typePoint(Fluent $column)
{
- return $this->formatPostGisType('point');
+ return $this->formatPostGisType('point', $column);
}
/**
@@ -810,7 +810,7 @@ class PostgresGrammar extends Grammar
*/
protected function typeLineString(Fluent $column)
{
- return $this->formatPostGisType('linestring');
+ return $this->formatPostGisType('linestring', $column);
}
/**
@@ -821,7 +821,7 @@ class PostgresGrammar extends Grammar
*/
protected function typePolygon(Fluent $column)
{
- return $this->formatPostGisType('polygon');
+ return $this->formatPostGisType('polygon', $column);
}
/**
@@ -832,7 +832,7 @@ class PostgresGrammar extends Grammar
*/
protected function typeGeometryCollection(Fluent $column)
{
- return $this->formatPostGisType('geometrycollection');
+ return $this->formatPostGisType('geometrycollection', $column);
}
/**
@@ -843,7 +843,7 @@ class PostgresGrammar extends Grammar
*/
protected function typeMultiPoint(Fluent $column)
{
- return $this->formatPostGisType('multipoint');
+ return $this->formatPostGisType('multipoint', $column);
}
/**
@@ -854,7 +854,7 @@ class PostgresGrammar extends Grammar
*/
public function typeMultiLineString(Fluent $column)
{
- return $this->formatPostGisType('multilinestring');
+ return $this->formatPostGisType('multilinestring', $column);
}
/**
@@ -865,7 +865,7 @@ class PostgresGrammar extends Grammar
*/
protected function typeMultiPolygon(Fluent $column)
{
- return $this->formatPostGisType('multipolygon');
+ return $this->formatPostGisType('multipolygon', $column);
}
/**
@@ -876,18 +876,27 @@ class PostgresGrammar extends Grammar
*/
protected function typeMultiPolygonZ(Fluent $column)
{
- return $this->formatPostGisType('multipolygonz');
+ return $this->formatPostGisType('multipolygonz', $column);
}
/**
* Format the column definition for a PostGIS spatial type.
*
* @param string $type
+ * @param \Illuminate\Support\Fluent $column
* @return string
*/
- private function formatPostGisType(string $type)
+ private function formatPostGisType($type, Fluent $column)
{
- return "geography($type, 4326)";
+ if ($column->isGeometry === null) {
+ return sprintf('geography(%s, %s)', $type, $column->projection ?? '4326');
+ }
+
+ if ($column->projection !== null) {
+ return sprintf('geometry(%s, %s)', $type, $column->projection);
+ }
+
+ return "geometry({$type})";
}
/**
@@ -943,4 +952,32 @@ class PostgresGrammar extends Grammar
return ' primary key';
}
}
+
+ /**
+ * Get the SQL for a generated virtual column modifier.
+ *
+ * @param \Illuminate\Database\Schema\Blueprint $blueprint
+ * @param \Illuminate\Support\Fluent $column
+ * @return string|null
+ */
+ protected function modifyVirtualAs(Blueprint $blueprint, Fluent $column)
+ {
+ if ($column->virtualAs !== null) {
+ return " generated always as ({$column->virtualAs})";
+ }
+ }
+
+ /**
+ * Get the SQL for a generated stored column modifier.
+ *
+ * @param \Illuminate\Database\Schema\Blueprint $blueprint
+ * @param \Illuminate\Support\Fluent $column
+ * @return string|null
+ */
+ protected function modifyStoredAs(Blueprint $blueprint, Fluent $column)
+ {
+ if ($column->storedAs !== null) {
+ return " generated always as ({$column->storedAs}) stored";
+ }
+ }
}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/RenameColumn.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/RenameColumn.php
index a07c4febb..0db0c507e 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/RenameColumn.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/RenameColumn.php
@@ -2,12 +2,12 @@
namespace Illuminate\Database\Schema\Grammars;
-use Illuminate\Support\Fluent;
+use Doctrine\DBAL\Schema\AbstractSchemaManager as SchemaManager;
use Doctrine\DBAL\Schema\Column;
use Doctrine\DBAL\Schema\TableDiff;
use Illuminate\Database\Connection;
use Illuminate\Database\Schema\Blueprint;
-use Doctrine\DBAL\Schema\AbstractSchemaManager as SchemaManager;
+use Illuminate\Support\Fluent;
class RenameColumn
{
@@ -22,13 +22,15 @@ class RenameColumn
*/
public static function compile(Grammar $grammar, Blueprint $blueprint, Fluent $command, Connection $connection)
{
+ $schema = $connection->getDoctrineSchemaManager();
+ $databasePlatform = $schema->getDatabasePlatform();
+ $databasePlatform->registerDoctrineTypeMapping('enum', 'string');
+
$column = $connection->getDoctrineColumn(
$grammar->getTablePrefix().$blueprint->getTable(), $command->from
);
- $schema = $connection->getDoctrineSchemaManager();
-
- return (array) $schema->getDatabasePlatform()->getAlterTableSQL(static::getRenamedDiff(
+ return (array) $databasePlatform->getAlterTableSQL(static::getRenamedDiff(
$grammar, $blueprint, $command, $column, $schema
));
}
@@ -61,9 +63,22 @@ class RenameColumn
protected static function setRenamedColumns(TableDiff $tableDiff, Fluent $command, Column $column)
{
$tableDiff->renamedColumns = [
- $command->from => new Column($command->to, $column->getType(), $column->toArray()),
+ $command->from => new Column($command->to, $column->getType(), self::getWritableColumnOptions($column)),
];
return $tableDiff;
}
+
+ /**
+ * Get the writable column options.
+ *
+ * @param \Doctrine\DBAL\Schema\Column $column
+ * @return array
+ */
+ private static function getWritableColumnOptions(Column $column)
+ {
+ return array_filter($column->toArray(), function (string $name) use ($column) {
+ return method_exists($column, 'set'.$name);
+ }, ARRAY_FILTER_USE_KEY);
+ }
}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php
index ac825e734..edb075485 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php
@@ -2,12 +2,12 @@
namespace Illuminate\Database\Schema\Grammars;
-use RuntimeException;
-use Illuminate\Support\Arr;
-use Illuminate\Support\Fluent;
use Doctrine\DBAL\Schema\Index;
use Illuminate\Database\Connection;
use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Arr;
+use Illuminate\Support\Fluent;
+use RuntimeException;
class SQLiteGrammar extends Grammar
{
@@ -179,6 +179,7 @@ class SQLiteGrammar extends Grammar
*
* @param \Illuminate\Database\Schema\Blueprint $blueprint
* @param \Illuminate\Support\Fluent $command
+ * @return void
*
* @throws \RuntimeException
*/
@@ -309,6 +310,7 @@ class SQLiteGrammar extends Grammar
*
* @param \Illuminate\Database\Schema\Blueprint $blueprint
* @param \Illuminate\Support\Fluent $command
+ * @return void
*
* @throws \RuntimeException
*/
@@ -334,10 +336,12 @@ class SQLiteGrammar extends Grammar
/**
* Compile a rename index command.
*
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @param \Illuminate\Database\Connection $connection
+ * @param \Illuminate\Database\Schema\Blueprint $blueprint
+ * @param \Illuminate\Support\Fluent $command
+ * @param \Illuminate\Database\Connection $connection
* @return array
+ *
+ * @throws \RuntimeException
*/
public function compileRenameIndex(Blueprint $blueprint, Fluent $command, Connection $connection)
{
@@ -460,7 +464,7 @@ class SQLiteGrammar extends Grammar
}
/**
- * Create the column definition for a integer type.
+ * Create the column definition for an integer type.
*
* @param \Illuminate\Support\Fluent $column
* @return string
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php
index 0f1d0c47d..43d3b7d05 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php
@@ -2,8 +2,8 @@
namespace Illuminate\Database\Schema\Grammars;
-use Illuminate\Support\Fluent;
use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Fluent;
class SqlServerGrammar extends Grammar
{
@@ -48,7 +48,7 @@ class SqlServerGrammar extends Grammar
{
return "select col.name from sys.columns as col
join sys.objects as obj on col.object_id = obj.object_id
- where obj.type = 'U' and obj.name = '$table'";
+ where obj.type = 'U' and obj.object_id = object_id('$table')";
}
/**
@@ -192,7 +192,31 @@ class SqlServerGrammar extends Grammar
{
$columns = $this->wrapArray($command->columns);
- return 'alter table '.$this->wrapTable($blueprint).' drop column '.implode(', ', $columns);
+ $dropExistingConstraintsSql = $this->compileDropDefaultConstraint($blueprint, $command).';';
+
+ return $dropExistingConstraintsSql.'alter table '.$this->wrapTable($blueprint).' drop column '.implode(', ', $columns);
+ }
+
+ /**
+ * Compile a drop default constraint command.
+ *
+ * @param \Illuminate\Database\Schema\Blueprint $blueprint
+ * @param \Illuminate\Support\Fluent $command
+ * @return string
+ */
+ public function compileDropDefaultConstraint(Blueprint $blueprint, Fluent $command)
+ {
+ $columns = "'".implode("','", $command->columns)."'";
+
+ $tableName = $this->getTablePrefix().$blueprint->getTable();
+
+ $sql = "DECLARE @sql NVARCHAR(MAX) = '';";
+ $sql .= "SELECT @sql += 'ALTER TABLE [dbo].[{$tableName}] DROP CONSTRAINT ' + OBJECT_NAME([default_object_id]) + ';' ";
+ $sql .= 'FROM SYS.COLUMNS ';
+ $sql .= "WHERE [object_id] = OBJECT_ID('[dbo].[{$tableName}]') AND [name] in ({$columns}) AND [default_object_id] <> 0;";
+ $sql .= 'EXEC(@sql)';
+
+ return $sql;
}
/**
@@ -280,8 +304,8 @@ class SqlServerGrammar extends Grammar
/**
* Compile a rename index command.
*
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
+ * @param \Illuminate\Database\Schema\Blueprint $blueprint
+ * @param \Illuminate\Support\Fluent $command
* @return string
*/
public function compileRenameIndex(Blueprint $blueprint, Fluent $command)
@@ -320,10 +344,25 @@ class SqlServerGrammar extends Grammar
public function compileDropAllForeignKeys()
{
return "DECLARE @sql NVARCHAR(MAX) = N'';
- SELECT @sql += 'ALTER TABLE ' + QUOTENAME(OBJECT_NAME(parent_object_id))
+ SELECT @sql += 'ALTER TABLE '
+ + QUOTENAME(OBJECT_SCHEMA_NAME(parent_object_id)) + '.' + + QUOTENAME(OBJECT_NAME(parent_object_id))
+ ' DROP CONSTRAINT ' + QUOTENAME(name) + ';'
FROM sys.foreign_keys;
-
+
+ EXEC sp_executesql @sql;";
+ }
+
+ /**
+ * Compile the command to drop all views.
+ *
+ * @return string
+ */
+ public function compileDropAllViews()
+ {
+ return "DECLARE @sql NVARCHAR(MAX) = N'';
+ SELECT @sql += 'DROP VIEW ' + QUOTENAME(OBJECT_SCHEMA_NAME(object_id)) + '.' + QUOTENAME(name) + ';'
+ FROM sys.views;
+
EXEC sp_executesql @sql;";
}
@@ -589,7 +628,7 @@ class SqlServerGrammar extends Grammar
/**
* Create the column definition for a timestamp (with time zone) type.
*
- * @link https://msdn.microsoft.com/en-us/library/bb630289(v=sql.120).aspx
+ * @link https://docs.microsoft.com/en-us/sql/t-sql/data-types/datetimeoffset-transact-sql?view=sql-server-ver15
*
* @param \Illuminate\Support\Fluent $column
* @return string
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php
index 85f3e92c2..f07946c85 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php
@@ -93,7 +93,7 @@ class MySqlBuilder extends Builder
*
* @return array
*/
- protected function getAllTables()
+ public function getAllTables()
{
return $this->connection->select(
$this->grammar->compileGetAllTables()
@@ -105,7 +105,7 @@ class MySqlBuilder extends Builder
*
* @return array
*/
- protected function getAllViews()
+ public function getAllViews()
{
return $this->connection->select(
$this->grammar->compileGetAllViews()
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/PostgresBuilder.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/PostgresBuilder.php
index af03af7e1..76673a719 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Schema/PostgresBuilder.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/PostgresBuilder.php
@@ -30,7 +30,7 @@ class PostgresBuilder extends Builder
{
$tables = [];
- $excludedTables = ['spatial_ref_sys'];
+ $excludedTables = $this->connection->getConfig('dont_drop') ?? ['spatial_ref_sys'];
foreach ($this->getAllTables() as $row) {
$row = (array) $row;
@@ -77,6 +77,8 @@ class PostgresBuilder extends Builder
/**
* Drop all types from the database.
+ *
+ * @return void
*/
public function dropAllTypes()
{
@@ -102,10 +104,10 @@ class PostgresBuilder extends Builder
*
* @return array
*/
- protected function getAllTables()
+ public function getAllTables()
{
return $this->connection->select(
- $this->grammar->compileGetAllTables($this->connection->getConfig('schema'))
+ $this->grammar->compileGetAllTables((array) $this->connection->getConfig('schema'))
);
}
@@ -114,10 +116,10 @@ class PostgresBuilder extends Builder
*
* @return array
*/
- protected function getAllViews()
+ public function getAllViews()
{
return $this->connection->select(
- $this->grammar->compileGetAllViews($this->connection->getConfig('schema'))
+ $this->grammar->compileGetAllViews((array) $this->connection->getConfig('schema'))
);
}
@@ -126,7 +128,7 @@ class PostgresBuilder extends Builder
*
* @return array
*/
- protected function getAllTypes()
+ public function getAllTypes()
{
return $this->connection->select(
$this->grammar->compileGetAllTypes()
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/SqlServerBuilder.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/SqlServerBuilder.php
index b9d3b2735..0b3e47bec 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/Schema/SqlServerBuilder.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/SqlServerBuilder.php
@@ -15,4 +15,14 @@ class SqlServerBuilder extends Builder
$this->connection->statement($this->grammar->compileDropAllTables());
}
+
+ /**
+ * Drop all views from the database.
+ *
+ * @return void
+ */
+ public function dropAllViews()
+ {
+ $this->connection->statement($this->grammar->compileDropAllViews());
+ }
}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Seeder.php b/vendor/laravel/framework/src/Illuminate/Database/Seeder.php
index c415c8984..2facfd7de 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/Seeder.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/Seeder.php
@@ -2,10 +2,10 @@
namespace Illuminate\Database;
-use Illuminate\Support\Arr;
-use InvalidArgumentException;
use Illuminate\Console\Command;
use Illuminate\Container\Container;
+use Illuminate\Support\Arr;
+use InvalidArgumentException;
abstract class Seeder
{
@@ -37,11 +37,21 @@ abstract class Seeder
foreach ($classes as $class) {
$seeder = $this->resolve($class);
+ $name = get_class($seeder);
+
if ($silent === false && isset($this->command)) {
- $this->command->getOutput()->writeln('Seeding: '.get_class($seeder));
+ $this->command->getOutput()->writeln("Seeding: {$name}");
}
+ $startTime = microtime(true);
+
$seeder->__invoke();
+
+ $runTime = round(microtime(true) - $startTime, 2);
+
+ if ($silent === false && isset($this->command)) {
+ $this->command->getOutput()->writeln("Seeded: {$name} ({$runTime} seconds)");
+ }
}
return $this;
diff --git a/vendor/laravel/framework/src/Illuminate/Database/SqlServerConnection.php b/vendor/laravel/framework/src/Illuminate/Database/SqlServerConnection.php
index db5a0bed8..c5f0c19cf 100755
--- a/vendor/laravel/framework/src/Illuminate/Database/SqlServerConnection.php
+++ b/vendor/laravel/framework/src/Illuminate/Database/SqlServerConnection.php
@@ -3,13 +3,12 @@
namespace Illuminate\Database;
use Closure;
-use Exception;
-use Throwable;
-use Illuminate\Database\Schema\SqlServerBuilder;
use Doctrine\DBAL\Driver\PDOSqlsrv\Driver as DoctrineDriver;
-use Illuminate\Database\Query\Processors\SqlServerProcessor;
use Illuminate\Database\Query\Grammars\SqlServerGrammar as QueryGrammar;
+use Illuminate\Database\Query\Processors\SqlServerProcessor;
use Illuminate\Database\Schema\Grammars\SqlServerGrammar as SchemaGrammar;
+use Illuminate\Database\Schema\SqlServerBuilder;
+use Throwable;
class SqlServerConnection extends Connection
{
@@ -20,7 +19,7 @@ class SqlServerConnection extends Connection
* @param int $attempts
* @return mixed
*
- * @throws \Exception|\Throwable
+ * @throws \Throwable
*/
public function transaction(Closure $callback, $attempts = 1)
{
@@ -43,11 +42,7 @@ class SqlServerConnection extends Connection
// If we catch an exception, we will roll back so nothing gets messed
// up in the database. Then we'll re-throw the exception so it can
// be handled how the developer sees fit for their applications.
- catch (Exception $e) {
- $this->getPdo()->exec('ROLLBACK TRAN');
-
- throw $e;
- } catch (Throwable $e) {
+ catch (Throwable $e) {
$this->getPdo()->exec('ROLLBACK TRAN');
throw $e;
diff --git a/vendor/laravel/framework/src/Illuminate/Database/composer.json b/vendor/laravel/framework/src/Illuminate/Database/composer.json
index 288dba5cc..38d7d371a 100644
--- a/vendor/laravel/framework/src/Illuminate/Database/composer.json
+++ b/vendor/laravel/framework/src/Illuminate/Database/composer.json
@@ -15,11 +15,12 @@
}
],
"require": {
- "php": "^7.1.3",
+ "php": "^7.2.5|^8.0",
"ext-json": "*",
- "illuminate/container": "5.8.*",
- "illuminate/contracts": "5.8.*",
- "illuminate/support": "5.8.*"
+ "illuminate/container": "^7.0",
+ "illuminate/contracts": "^7.0",
+ "illuminate/support": "^7.0",
+ "symfony/console": "^5.0"
},
"autoload": {
"psr-4": {
@@ -28,16 +29,17 @@
},
"extra": {
"branch-alias": {
- "dev-master": "5.8-dev"
+ "dev-master": "7.x-dev"
}
},
"suggest": {
"doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.6).",
- "fzaninotto/faker": "Required to use the eloquent factory builder (^1.4).",
- "illuminate/console": "Required to use the database commands (5.8.*).",
- "illuminate/events": "Required to use the observers with Eloquent (5.8.*).",
- "illuminate/filesystem": "Required to use the migrations (5.8.*).",
- "illuminate/pagination": "Required to paginate the result set (5.8.*)."
+ "fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).",
+ "illuminate/console": "Required to use the database commands (^7.0).",
+ "illuminate/events": "Required to use the observers with Eloquent (^7.0).",
+ "illuminate/filesystem": "Required to use the migrations (^7.0).",
+ "illuminate/pagination": "Required to paginate the result set (^7.0).",
+ "symfony/finder": "Required to use Eloquent model factories (^5.0)."
},
"config": {
"sort-packages": true
diff --git a/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php b/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php
index 5aa16a085..6c5d4826c 100755
--- a/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php
+++ b/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php
@@ -2,10 +2,10 @@
namespace Illuminate\Encryption;
-use RuntimeException;
use Illuminate\Contracts\Encryption\DecryptException;
-use Illuminate\Contracts\Encryption\EncryptException;
use Illuminate\Contracts\Encryption\Encrypter as EncrypterContract;
+use Illuminate\Contracts\Encryption\EncryptException;
+use RuntimeException;
class Encrypter implements EncrypterContract
{
@@ -100,7 +100,7 @@ class Encrypter implements EncrypterContract
// its authenticity. Then, we'll JSON the data into the "payload" array.
$mac = $this->hash($iv = base64_encode($iv), $value);
- $json = json_encode(compact('iv', 'value', 'mac'));
+ $json = json_encode(compact('iv', 'value', 'mac'), JSON_UNESCAPED_SLASHES);
if (json_last_error() !== JSON_ERROR_NONE) {
throw new EncryptException('Could not encrypt the data.');
diff --git a/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php
index ad7b93d47..cd590f12d 100755
--- a/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php
+++ b/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php
@@ -2,9 +2,10 @@
namespace Illuminate\Encryption;
-use RuntimeException;
-use Illuminate\Support\Str;
use Illuminate\Support\ServiceProvider;
+use Illuminate\Support\Str;
+use Opis\Closure\SerializableClosure;
+use RuntimeException;
class EncryptionServiceProvider extends ServiceProvider
{
@@ -14,21 +15,56 @@ class EncryptionServiceProvider extends ServiceProvider
* @return void
*/
public function register()
+ {
+ $this->registerEncrypter();
+ $this->registerOpisSecurityKey();
+ }
+
+ /**
+ * Register the encrypter.
+ *
+ * @return void
+ */
+ protected function registerEncrypter()
{
$this->app->singleton('encrypter', function ($app) {
$config = $app->make('config')->get('app');
- // If the key starts with "base64:", we will need to decode the key before handing
- // it off to the encrypter. Keys may be base-64 encoded for presentation and we
- // want to make sure to convert them back to the raw bytes before encrypting.
- if (Str::startsWith($key = $this->key($config), 'base64:')) {
- $key = base64_decode(substr($key, 7));
- }
-
- return new Encrypter($key, $config['cipher']);
+ return new Encrypter($this->parseKey($config), $config['cipher']);
});
}
+ /**
+ * Configure Opis Closure signing for security.
+ *
+ * @return void
+ */
+ protected function registerOpisSecurityKey()
+ {
+ $config = $this->app->make('config')->get('app');
+
+ if (! class_exists(SerializableClosure::class) || empty($config['key'])) {
+ return;
+ }
+
+ SerializableClosure::setSecretKey($this->parseKey($config));
+ }
+
+ /**
+ * Parse the encryption key.
+ *
+ * @param array $config
+ * @return string
+ */
+ protected function parseKey(array $config)
+ {
+ if (Str::startsWith($key = $this->key($config), $prefix = 'base64:')) {
+ $key = base64_decode(Str::after($key, $prefix));
+ }
+
+ return $key;
+ }
+
/**
* Extract the encryption key from the given configuration.
*
diff --git a/vendor/laravel/framework/src/Illuminate/Encryption/composer.json b/vendor/laravel/framework/src/Illuminate/Encryption/composer.json
index 1421c2696..3ea301e72 100644
--- a/vendor/laravel/framework/src/Illuminate/Encryption/composer.json
+++ b/vendor/laravel/framework/src/Illuminate/Encryption/composer.json
@@ -14,12 +14,12 @@
}
],
"require": {
- "php": "^7.1.3",
+ "php": "^7.2.5|^8.0",
"ext-json": "*",
"ext-mbstring": "*",
"ext-openssl": "*",
- "illuminate/contracts": "5.8.*",
- "illuminate/support": "5.8.*"
+ "illuminate/contracts": "^7.0",
+ "illuminate/support": "^7.0"
},
"autoload": {
"psr-4": {
@@ -28,7 +28,7 @@
},
"extra": {
"branch-alias": {
- "dev-master": "5.8-dev"
+ "dev-master": "7.x-dev"
}
},
"config": {
diff --git a/vendor/laravel/framework/src/Illuminate/Events/CallQueuedListener.php b/vendor/laravel/framework/src/Illuminate/Events/CallQueuedListener.php
index be0fee3ae..b389b40ef 100644
--- a/vendor/laravel/framework/src/Illuminate/Events/CallQueuedListener.php
+++ b/vendor/laravel/framework/src/Illuminate/Events/CallQueuedListener.php
@@ -4,8 +4,8 @@ namespace Illuminate\Events;
use Illuminate\Container\Container;
use Illuminate\Contracts\Queue\Job;
-use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
+use Illuminate\Queue\InteractsWithQueue;
class CallQueuedListener implements ShouldQueue
{
@@ -39,6 +39,13 @@ class CallQueuedListener implements ShouldQueue
*/
public $tries;
+ /**
+ * The number of seconds to wait before retrying the job.
+ *
+ * @var int
+ */
+ public $retryAfter;
+
/**
* The timestamp indicating when the job should timeout.
*
@@ -82,17 +89,15 @@ class CallQueuedListener implements ShouldQueue
$this->job, $container->make($this->class)
);
- call_user_func_array(
- [$handler, $this->method], $this->data
- );
+ $handler->{$this->method}(...array_values($this->data));
}
/**
* Set the job instance of the given class if necessary.
*
* @param \Illuminate\Contracts\Queue\Job $job
- * @param mixed $instance
- * @return mixed
+ * @param object $instance
+ * @return object
*/
protected function setJobInstanceIfNecessary(Job $job, $instance)
{
@@ -108,7 +113,7 @@ class CallQueuedListener implements ShouldQueue
*
* The event instance and the exception will be passed.
*
- * @param \Exception $e
+ * @param \Throwable $e
* @return void
*/
public function failed($e)
@@ -117,10 +122,10 @@ class CallQueuedListener implements ShouldQueue
$handler = Container::getInstance()->make($this->class);
- $parameters = array_merge($this->data, [$e]);
+ $parameters = array_merge(array_values($this->data), [$e]);
if (method_exists($handler, 'failed')) {
- call_user_func_array([$handler, 'failed'], $parameters);
+ $handler->failed(...$parameters);
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php b/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php
index 95826c0d8..b81275855 100755
--- a/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php
+++ b/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php
@@ -3,18 +3,21 @@
namespace Illuminate\Events;
use Exception;
-use ReflectionClass;
+use Illuminate\Container\Container;
+use Illuminate\Contracts\Broadcasting\Factory as BroadcastFactory;
+use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
+use Illuminate\Contracts\Container\Container as ContainerContract;
+use Illuminate\Contracts\Events\Dispatcher as DispatcherContract;
+use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
-use Illuminate\Container\Container;
-use Illuminate\Contracts\Queue\ShouldQueue;
-use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
-use Illuminate\Contracts\Events\Dispatcher as DispatcherContract;
-use Illuminate\Contracts\Broadcasting\Factory as BroadcastFactory;
-use Illuminate\Contracts\Container\Container as ContainerContract;
+use Illuminate\Support\Traits\Macroable;
+use ReflectionClass;
class Dispatcher implements DispatcherContract
{
+ use Macroable;
+
/**
* The IoC container instance.
*
@@ -65,7 +68,7 @@ class Dispatcher implements DispatcherContract
* Register an event listener with the dispatcher.
*
* @param string|array $events
- * @param mixed $listener
+ * @param \Closure|string $listener
* @return void
*/
public function listen($events, $listener)
@@ -83,7 +86,7 @@ class Dispatcher implements DispatcherContract
* Setup a wildcard listener callback.
*
* @param string $event
- * @param mixed $listener
+ * @param \Closure|string $listener
* @return void
*/
protected function setupWildcardListen($event, $listener)
@@ -101,7 +104,26 @@ class Dispatcher implements DispatcherContract
*/
public function hasListeners($eventName)
{
- return isset($this->listeners[$eventName]) || isset($this->wildcards[$eventName]);
+ return isset($this->listeners[$eventName]) ||
+ isset($this->wildcards[$eventName]) ||
+ $this->hasWildcardListeners($eventName);
+ }
+
+ /**
+ * Determine if the given event has any wildcard listeners.
+ *
+ * @param string $eventName
+ * @return bool
+ */
+ public function hasWildcardListeners($eventName)
+ {
+ foreach ($this->wildcards as $key => $listeners) {
+ if (Str::is($key, $eventName)) {
+ return true;
+ }
+ }
+
+ return false;
}
/**
@@ -139,7 +161,15 @@ class Dispatcher implements DispatcherContract
{
$subscriber = $this->resolveSubscriber($subscriber);
- $subscriber->subscribe($this);
+ $events = $subscriber->subscribe($this);
+
+ if (is_array($events)) {
+ foreach ($events as $event => $listeners) {
+ foreach ($listeners as $listener) {
+ $this->listen($event, $listener);
+ }
+ }
+ }
}
/**
@@ -339,6 +369,10 @@ class Dispatcher implements DispatcherContract
return $this->createClassListener($listener, $wildcard);
}
+ if (is_array($listener) && isset($listener[0]) && is_string($listener[0])) {
+ return $this->createClassListener($listener, $wildcard);
+ }
+
return function ($event, $payload) use ($listener, $wildcard) {
if ($wildcard) {
return $listener($event, $payload);
@@ -362,21 +396,23 @@ class Dispatcher implements DispatcherContract
return call_user_func($this->createClassCallable($listener), $event, $payload);
}
- return call_user_func_array(
- $this->createClassCallable($listener), $payload
- );
+ $callable = $this->createClassCallable($listener);
+
+ return $callable(...array_values($payload));
};
}
/**
* Create the class based event callable.
*
- * @param string $listener
+ * @param array|string $listener
* @return callable
*/
protected function createClassCallable($listener)
{
- [$class, $method] = $this->parseClassCallable($listener);
+ [$class, $method] = is_array($listener)
+ ? $listener
+ : $this->parseClassCallable($listener);
if ($this->handlerShouldBeQueued($class)) {
return $this->createQueuedHandlerCallable($class, $method);
@@ -442,8 +478,10 @@ class Dispatcher implements DispatcherContract
*/
protected function handlerWantsToBeQueued($class, $arguments)
{
- if (method_exists($class, 'shouldQueue')) {
- return $this->container->make($class)->shouldQueue($arguments[0]);
+ $instance = $this->container->make($class);
+
+ if (method_exists($instance, 'shouldQueue')) {
+ return $instance->shouldQueue($arguments[0]);
}
return true;
@@ -465,7 +503,9 @@ class Dispatcher implements DispatcherContract
$listener->connection ?? null
);
- $queue = $listener->queue ?? null;
+ $queue = method_exists($listener, 'viaQueue')
+ ? $listener->viaQueue()
+ : $listener->queue ?? null;
isset($listener->delay)
? $connection->laterOn($queue, $listener->delay, $job)
@@ -500,6 +540,8 @@ class Dispatcher implements DispatcherContract
{
return tap($job, function ($job) use ($listener) {
$job->tries = $listener->tries ?? null;
+ $job->retryAfter = method_exists($listener, 'retryAfter')
+ ? $listener->retryAfter() : ($listener->retryAfter ?? null);
$job->timeout = $listener->timeout ?? null;
$job->timeoutAt = method_exists($listener, 'retryUntil')
? $listener->retryUntil() : null;
@@ -519,6 +561,12 @@ class Dispatcher implements DispatcherContract
} else {
unset($this->listeners[$event]);
}
+
+ foreach ($this->wildcardsCache as $key => $listeners) {
+ if (Str::is($event, $key)) {
+ unset($this->wildcardsCache[$key]);
+ }
+ }
}
/**
diff --git a/vendor/laravel/framework/src/Illuminate/Events/EventServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Events/EventServiceProvider.php
index fa3ed6f6f..15fb60b10 100755
--- a/vendor/laravel/framework/src/Illuminate/Events/EventServiceProvider.php
+++ b/vendor/laravel/framework/src/Illuminate/Events/EventServiceProvider.php
@@ -2,8 +2,8 @@
namespace Illuminate\Events;
-use Illuminate\Support\ServiceProvider;
use Illuminate\Contracts\Queue\Factory as QueueFactoryContract;
+use Illuminate\Support\ServiceProvider;
class EventServiceProvider extends ServiceProvider
{
diff --git a/vendor/laravel/framework/src/Illuminate/Events/NullDispatcher.php b/vendor/laravel/framework/src/Illuminate/Events/NullDispatcher.php
new file mode 100644
index 000000000..793ef1e19
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Events/NullDispatcher.php
@@ -0,0 +1,141 @@
+dispatcher = $dispatcher;
+ }
+
+ /**
+ * Don't fire an event.
+ *
+ * @param string|object $event
+ * @param mixed $payload
+ * @param bool $halt
+ * @return void
+ */
+ public function dispatch($event, $payload = [], $halt = false)
+ {
+ }
+
+ /**
+ * Don't register an event and payload to be fired later.
+ *
+ * @param string $event
+ * @param array $payload
+ * @return void
+ */
+ public function push($event, $payload = [])
+ {
+ }
+
+ /**
+ * Don't dispatch an event.
+ *
+ * @param string|object $event
+ * @param mixed $payload
+ * @return array|null
+ */
+ public function until($event, $payload = [])
+ {
+ }
+
+ /**
+ * Register an event listener with the dispatcher.
+ *
+ * @param string|array $events
+ * @param \Closure|string $listener
+ * @return void
+ */
+ public function listen($events, $listener)
+ {
+ $this->dispatcher->listen($events, $listener);
+ }
+
+ /**
+ * Determine if a given event has listeners.
+ *
+ * @param string $eventName
+ * @return bool
+ */
+ public function hasListeners($eventName)
+ {
+ return $this->dispatcher->hasListeners($eventName);
+ }
+
+ /**
+ * Register an event subscriber with the dispatcher.
+ *
+ * @param object|string $subscriber
+ * @return void
+ */
+ public function subscribe($subscriber)
+ {
+ $this->dispatcher->subscribe($subscriber);
+ }
+
+ /**
+ * Flush a set of pushed events.
+ *
+ * @param string $event
+ * @return void
+ */
+ public function flush($event)
+ {
+ $this->dispatcher->flush($event);
+ }
+
+ /**
+ * Remove a set of listeners from the dispatcher.
+ *
+ * @param string $event
+ * @return void
+ */
+ public function forget($event)
+ {
+ $this->dispatcher->forget($event);
+ }
+
+ /**
+ * Forget all of the queued listeners.
+ *
+ * @return void
+ */
+ public function forgetPushed()
+ {
+ $this->dispatcher->forgetPushed();
+ }
+
+ /**
+ * Dynamically pass method calls to the underlying dispatcher.
+ *
+ * @param string $method
+ * @param array $parameters
+ * @return mixed
+ */
+ public function __call($method, $parameters)
+ {
+ return $this->forwardCallTo($this->dispatcher, $method, $parameters);
+ }
+}
diff --git a/vendor/laravel/framework/src/Illuminate/Events/composer.json b/vendor/laravel/framework/src/Illuminate/Events/composer.json
index d75f2c1ea..c93a0320c 100755
--- a/vendor/laravel/framework/src/Illuminate/Events/composer.json
+++ b/vendor/laravel/framework/src/Illuminate/Events/composer.json
@@ -14,10 +14,10 @@
}
],
"require": {
- "php": "^7.1.3",
- "illuminate/container": "5.8.*",
- "illuminate/contracts": "5.8.*",
- "illuminate/support": "5.8.*"
+ "php": "^7.2.5|^8.0",
+ "illuminate/container": "^7.0",
+ "illuminate/contracts": "^7.0",
+ "illuminate/support": "^7.0"
},
"autoload": {
"psr-4": {
@@ -26,7 +26,7 @@
},
"extra": {
"branch-alias": {
- "dev-master": "5.8-dev"
+ "dev-master": "7.x-dev"
}
},
"config": {
diff --git a/vendor/laravel/framework/src/Illuminate/Filesystem/Cache.php b/vendor/laravel/framework/src/Illuminate/Filesystem/Cache.php
index 46cabc35d..8ae2486da 100644
--- a/vendor/laravel/framework/src/Illuminate/Filesystem/Cache.php
+++ b/vendor/laravel/framework/src/Illuminate/Filesystem/Cache.php
@@ -31,9 +31,10 @@ class Cache extends AbstractCache
/**
* Create a new cache instance.
*
- * @param \Illuminate\Contracts\Cache\Repository $repository
- * @param string $key
- * @param int|null $expire
+ * @param \Illuminate\Contracts\Cache\Repository $repository
+ * @param string $key
+ * @param int|null $expire
+ * @return void
*/
public function __construct(Repository $repository, $key = 'flysystem', $expire = null)
{
diff --git a/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php b/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php
index 6ed474e4c..4a10417d1 100644
--- a/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php
+++ b/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php
@@ -4,9 +4,11 @@ namespace Illuminate\Filesystem;
use ErrorException;
use FilesystemIterator;
-use Symfony\Component\Finder\Finder;
-use Illuminate\Support\Traits\Macroable;
use Illuminate\Contracts\Filesystem\FileNotFoundException;
+use Illuminate\Support\Traits\Macroable;
+use RuntimeException;
+use Symfony\Component\Finder\Finder;
+use Symfony\Component\Mime\MimeTypes;
class Filesystem
{
@@ -23,6 +25,17 @@ class Filesystem
return file_exists($path);
}
+ /**
+ * Determine if a file or directory is missing.
+ *
+ * @param string $path
+ * @return bool
+ */
+ public function missing($path)
+ {
+ return ! $this->exists($path);
+ }
+
/**
* Get the contents of a file.
*
@@ -38,7 +51,7 @@ class Filesystem
return $lock ? $this->sharedGet($path) : file_get_contents($path);
}
- throw new FileNotFoundException("File does not exist at path {$path}");
+ throw new FileNotFoundException("File does not exist at path {$path}.");
}
/**
@@ -84,7 +97,7 @@ class Filesystem
return require $path;
}
- throw new FileNotFoundException("File does not exist at path {$path}");
+ throw new FileNotFoundException("File does not exist at path {$path}.");
}
/**
@@ -240,7 +253,7 @@ class Filesystem
}
/**
- * Create a hard link to the target file or directory.
+ * Create a symlink to the target file or directory. On Windows, a hard link is created if the target is a file.
*
* @param string $target
* @param string $link
@@ -301,6 +314,23 @@ class Filesystem
return pathinfo($path, PATHINFO_EXTENSION);
}
+ /**
+ * Guess the file extension from the mime-type of a given file.
+ *
+ * @param string $path
+ * @return string|null
+ */
+ public function guessExtension($path)
+ {
+ if (! class_exists(MimeTypes::class)) {
+ throw new RuntimeException(
+ 'To enable support for guessing extensions, please install the symfony/mime package.'
+ );
+ }
+
+ return (new MimeTypes)->getExtensions($this->mimeType($path))[0] ?? null;
+ }
+
/**
* Get the file type of a given file.
*
@@ -393,7 +423,7 @@ class Filesystem
* Find path names matching a given pattern.
*
* @param string $pattern
- * @param int $flags
+ * @param int $flags
* @return array
*/
public function glob($pattern, $flags = 0)
@@ -448,13 +478,28 @@ class Filesystem
return $directories;
}
+ /**
+ * Ensure a directory exists.
+ *
+ * @param string $path
+ * @param int $mode
+ * @param bool $recursive
+ * @return void
+ */
+ public function ensureDirectoryExists($path, $mode = 0755, $recursive = true)
+ {
+ if (! $this->isDirectory($path)) {
+ $this->makeDirectory($path, $mode, $recursive);
+ }
+ }
+
/**
* Create a directory.
*
* @param string $path
- * @param int $mode
- * @param bool $recursive
- * @param bool $force
+ * @param int $mode
+ * @param bool $recursive
+ * @param bool $force
* @return bool
*/
public function makeDirectory($path, $mode = 0755, $recursive = false, $force = false)
@@ -502,9 +547,7 @@ class Filesystem
// If the destination directory does not actually exist, we will go ahead and
// create it recursively, which just gets the destination prepared to copy
// the files over. Once we make the directory we'll proceed the copying.
- if (! $this->isDirectory($destination)) {
- $this->makeDirectory($destination, 0777, true);
- }
+ $this->ensureDirectoryExists($destination, 0777);
$items = new FilesystemIterator($directory, $options);
@@ -541,7 +584,7 @@ class Filesystem
* The directory itself may be optionally preserved.
*
* @param string $directory
- * @param bool $preserve
+ * @param bool $preserve
* @return bool
*/
public function deleteDirectory($directory, $preserve = false)
diff --git a/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemAdapter.php b/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemAdapter.php
index 9198c757d..fb3ffdc39 100644
--- a/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemAdapter.php
+++ b/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemAdapter.php
@@ -2,33 +2,33 @@
namespace Illuminate\Filesystem;
-use RuntimeException;
-use Illuminate\Http\File;
-use Illuminate\Support\Arr;
-use Illuminate\Support\Str;
-use InvalidArgumentException;
-use Illuminate\Support\Carbon;
-use Illuminate\Http\UploadedFile;
-use Illuminate\Support\Collection;
-use League\Flysystem\AdapterInterface;
-use PHPUnit\Framework\Assert as PHPUnit;
-use League\Flysystem\FileExistsException;
-use League\Flysystem\FilesystemInterface;
-use League\Flysystem\AwsS3v3\AwsS3Adapter;
-use League\Flysystem\Cached\CachedAdapter;
-use League\Flysystem\FileNotFoundException;
-use League\Flysystem\Rackspace\RackspaceAdapter;
-use League\Flysystem\Adapter\Local as LocalAdapter;
-use Symfony\Component\HttpFoundation\StreamedResponse;
use Illuminate\Contracts\Filesystem\Cloud as CloudFilesystemContract;
-use Illuminate\Contracts\Filesystem\Filesystem as FilesystemContract;
use Illuminate\Contracts\Filesystem\FileExistsException as ContractFileExistsException;
use Illuminate\Contracts\Filesystem\FileNotFoundException as ContractFileNotFoundException;
+use Illuminate\Contracts\Filesystem\Filesystem as FilesystemContract;
+use Illuminate\Http\File;
+use Illuminate\Http\UploadedFile;
+use Illuminate\Support\Arr;
+use Illuminate\Support\Collection;
+use Illuminate\Support\Str;
+use InvalidArgumentException;
+use League\Flysystem\Adapter\Ftp;
+use League\Flysystem\Adapter\Local as LocalAdapter;
+use League\Flysystem\AdapterInterface;
+use League\Flysystem\AwsS3v3\AwsS3Adapter;
+use League\Flysystem\Cached\CachedAdapter;
+use League\Flysystem\FileExistsException;
+use League\Flysystem\FileNotFoundException;
+use League\Flysystem\FilesystemInterface;
+use PHPUnit\Framework\Assert as PHPUnit;
+use Psr\Http\Message\StreamInterface;
+use RuntimeException;
+use Symfony\Component\HttpFoundation\StreamedResponse;
/**
* @mixin \League\Flysystem\FilesystemInterface
*/
-class FilesystemAdapter implements FilesystemContract, CloudFilesystemContract
+class FilesystemAdapter implements CloudFilesystemContract
{
/**
* The Flysystem filesystem implementation.
@@ -97,6 +97,17 @@ class FilesystemAdapter implements FilesystemContract, CloudFilesystemContract
return $this->driver->has($path);
}
+ /**
+ * Determine if a file or directory is missing.
+ *
+ * @param string $path
+ * @return bool
+ */
+ public function missing($path)
+ {
+ return ! $this->exists($path);
+ }
+
/**
* Get the full path for the file at the given "short" path.
*
@@ -105,7 +116,13 @@ class FilesystemAdapter implements FilesystemContract, CloudFilesystemContract
*/
public function path($path)
{
- return $this->driver->getAdapter()->getPathPrefix().$path;
+ $adapter = $this->driver->getAdapter();
+
+ if ($adapter instanceof CachedAdapter) {
+ $adapter = $adapter->getAdapter();
+ }
+
+ return $adapter->getPathPrefix().$path;
}
/**
@@ -121,7 +138,7 @@ class FilesystemAdapter implements FilesystemContract, CloudFilesystemContract
try {
return $this->driver->read($path);
} catch (FileNotFoundException $e) {
- throw new ContractFileNotFoundException($path, $e->getCode(), $e);
+ throw new ContractFileNotFoundException($e->getMessage(), $e->getCode(), $e);
}
}
@@ -205,6 +222,10 @@ class FilesystemAdapter implements FilesystemContract, CloudFilesystemContract
return $this->putFile($path, $contents, $options);
}
+ if ($contents instanceof StreamInterface) {
+ return $this->driver->putStream($path, $contents->detach(), $options);
+ }
+
return is_resource($contents)
? $this->driver->putStream($path, $contents, $options)
: $this->driver->put($path, $contents, $options);
@@ -214,12 +235,14 @@ class FilesystemAdapter implements FilesystemContract, CloudFilesystemContract
* Store the uploaded file on the disk.
*
* @param string $path
- * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile $file
- * @param array $options
+ * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile|string $file
+ * @param mixed $options
* @return string|false
*/
public function putFile($path, $file, $options = [])
{
+ $file = is_string($file) ? new File($file) : $file;
+
return $this->putFileAs($path, $file, $file->hashName(), $options);
}
@@ -227,14 +250,14 @@ class FilesystemAdapter implements FilesystemContract, CloudFilesystemContract
* Store the uploaded file on the disk with a given name.
*
* @param string $path
- * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile $file
+ * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile|string $file
* @param string $name
- * @param array $options
+ * @param mixed $options
* @return string|false
*/
public function putFileAs($path, $file, $name, $options = [])
{
- $stream = fopen($file->getRealPath(), 'r');
+ $stream = fopen(is_string($file) ? $file : $file->getRealPath(), 'r');
// Next, we will format the path of the file and store the file using a stream since
// they provide better performance than alternatives. Once we write the file this
@@ -415,8 +438,8 @@ class FilesystemAdapter implements FilesystemContract, CloudFilesystemContract
return $this->driver->getUrl($path);
} elseif ($adapter instanceof AwsS3Adapter) {
return $this->getAwsUrl($adapter, $path);
- } elseif ($adapter instanceof RackspaceAdapter) {
- return $this->getRackspaceUrl($adapter, $path);
+ } elseif ($adapter instanceof Ftp) {
+ return $this->getFtpUrl($path);
} elseif ($adapter instanceof LocalAdapter) {
return $this->getLocalUrl($path);
} else {
@@ -472,13 +495,16 @@ class FilesystemAdapter implements FilesystemContract, CloudFilesystemContract
/**
* Get the URL for the file at the given path.
*
- * @param \League\Flysystem\Rackspace\RackspaceAdapter $adapter
- * @param string $path
+ * @param string $path
* @return string
*/
- protected function getRackspaceUrl($adapter, $path)
+ protected function getFtpUrl($path)
{
- return (string) $adapter->getContainer()->getObject($path)->getPublicUrl();
+ $config = $this->driver->getConfig();
+
+ return $config->has('url')
+ ? $this->concatPathToUrl($config->get('url'), $path)
+ : $path;
}
/**
@@ -532,8 +558,6 @@ class FilesystemAdapter implements FilesystemContract, CloudFilesystemContract
return $adapter->getTemporaryUrl($path, $expiration, $options);
} elseif ($adapter instanceof AwsS3Adapter) {
return $this->getAwsTemporaryUrl($adapter, $path, $expiration, $options);
- } elseif ($adapter instanceof RackspaceAdapter) {
- return $this->getRackspaceTemporaryUrl($adapter, $path, $expiration, $options);
} else {
throw new RuntimeException('This driver does not support creating temporary URLs.');
}
@@ -543,9 +567,9 @@ class FilesystemAdapter implements FilesystemContract, CloudFilesystemContract
* Get a temporary URL for the file at the given path.
*
* @param \League\Flysystem\AwsS3v3\AwsS3Adapter $adapter
- * @param string $path
- * @param \DateTimeInterface $expiration
- * @param array $options
+ * @param string $path
+ * @param \DateTimeInterface $expiration
+ * @param array $options
* @return string
*/
public function getAwsTemporaryUrl($adapter, $path, $expiration, $options)
@@ -562,29 +586,11 @@ class FilesystemAdapter implements FilesystemContract, CloudFilesystemContract
)->getUri();
}
- /**
- * Get a temporary URL for the file at the given path.
- *
- * @param \League\Flysystem\Rackspace\RackspaceAdapter $adapter
- * @param string $path
- * @param \DateTimeInterface $expiration
- * @param array $options
- * @return string
- */
- public function getRackspaceTemporaryUrl($adapter, $path, $expiration, $options)
- {
- return $adapter->getContainer()->getObject($path)->getTemporaryUrl(
- Carbon::now()->diffInSeconds($expiration),
- $options['method'] ?? 'GET',
- $options['forcePublicUrl'] ?? true
- );
- }
-
/**
* Concatenate a path to a URL.
*
- * @param string $url
- * @param string $path
+ * @param string $url
+ * @param string $path
* @return string
*/
protected function concatPathToUrl($url, $path)
@@ -725,7 +731,7 @@ class FilesystemAdapter implements FilesystemContract, CloudFilesystemContract
return AdapterInterface::VISIBILITY_PRIVATE;
}
- throw new InvalidArgumentException("Unknown visibility: {$visibility}");
+ throw new InvalidArgumentException("Unknown visibility: {$visibility}.");
}
/**
@@ -739,6 +745,6 @@ class FilesystemAdapter implements FilesystemContract, CloudFilesystemContract
*/
public function __call($method, array $parameters)
{
- return call_user_func_array([$this->driver, $method], $parameters);
+ return $this->driver->{$method}(...array_values($parameters));
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemManager.php b/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemManager.php
index 51647019e..6003ac6b9 100644
--- a/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemManager.php
+++ b/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemManager.php
@@ -2,22 +2,20 @@
namespace Illuminate\Filesystem;
-use Closure;
use Aws\S3\S3Client;
-use OpenCloud\Rackspace;
+use Closure;
+use Illuminate\Contracts\Filesystem\Factory as FactoryContract;
use Illuminate\Support\Arr;
use InvalidArgumentException;
-use League\Flysystem\AdapterInterface;
-use League\Flysystem\Sftp\SftpAdapter;
-use League\Flysystem\FilesystemInterface;
-use League\Flysystem\Cached\CachedAdapter;
-use League\Flysystem\Filesystem as Flysystem;
use League\Flysystem\Adapter\Ftp as FtpAdapter;
-use League\Flysystem\Rackspace\RackspaceAdapter;
use League\Flysystem\Adapter\Local as LocalAdapter;
+use League\Flysystem\AdapterInterface;
use League\Flysystem\AwsS3v3\AwsS3Adapter as S3Adapter;
+use League\Flysystem\Cached\CachedAdapter;
use League\Flysystem\Cached\Storage\Memory as MemoryStore;
-use Illuminate\Contracts\Filesystem\Factory as FactoryContract;
+use League\Flysystem\Filesystem as Flysystem;
+use League\Flysystem\FilesystemInterface;
+use League\Flysystem\Sftp\SftpAdapter;
/**
* @mixin \Illuminate\Contracts\Filesystem\Filesystem
@@ -115,16 +113,22 @@ class FilesystemManager implements FactoryContract
{
$config = $this->getConfig($name);
- if (isset($this->customCreators[$config['driver']])) {
+ if (empty($config['driver'])) {
+ throw new InvalidArgumentException("Disk [{$name}] does not have a configured driver.");
+ }
+
+ $name = $config['driver'];
+
+ if (isset($this->customCreators[$name])) {
return $this->callCustomCreator($config);
}
- $driverMethod = 'create'.ucfirst($config['driver']).'Driver';
+ $driverMethod = 'create'.ucfirst($name).'Driver';
if (method_exists($this, $driverMethod)) {
return $this->{$driverMethod}($config);
} else {
- throw new InvalidArgumentException("Driver [{$config['driver']}] is not supported.");
+ throw new InvalidArgumentException("Driver [{$name}] is not supported.");
}
}
@@ -204,8 +208,10 @@ class FilesystemManager implements FactoryContract
$options = $config['options'] ?? [];
+ $streamReads = $config['stream_reads'] ?? false;
+
return $this->adapt($this->createFlysystem(
- new S3Adapter(new S3Client($s3Config), $s3Config['bucket'], $root, $options), $config
+ new S3Adapter(new S3Client($s3Config), $s3Config['bucket'], $root, $options, $streamReads), $config
));
}
@@ -226,41 +232,6 @@ class FilesystemManager implements FactoryContract
return $config;
}
- /**
- * Create an instance of the Rackspace driver.
- *
- * @param array $config
- * @return \Illuminate\Contracts\Filesystem\Cloud
- */
- public function createRackspaceDriver(array $config)
- {
- $client = new Rackspace($config['endpoint'], [
- 'username' => $config['username'], 'apiKey' => $config['key'],
- ], $config['options'] ?? []);
-
- $root = $config['root'] ?? null;
-
- return $this->adapt($this->createFlysystem(
- new RackspaceAdapter($this->getRackspaceContainer($client, $config), $root), $config
- ));
- }
-
- /**
- * Get the Rackspace Cloud Files container.
- *
- * @param \OpenCloud\Rackspace $client
- * @param array $config
- * @return \OpenCloud\ObjectStore\Resource\Container
- */
- protected function getRackspaceContainer(Rackspace $client, array $config)
- {
- $urlType = $config['url_type'] ?? null;
-
- $store = $client->objectStoreService('cloudFiles', $config['region'], $urlType);
-
- return $store->getContainer($config['container']);
- }
-
/**
* Create a Flysystem instance with the given adapter.
*
@@ -335,7 +306,7 @@ class FilesystemManager implements FactoryContract
*/
protected function getConfig($name)
{
- return $this->app['config']["filesystems.disks.{$name}"];
+ return $this->app['config']["filesystems.disks.{$name}"] ?: [];
}
/**
@@ -376,7 +347,7 @@ class FilesystemManager implements FactoryContract
/**
* Register a custom driver creator Closure.
*
- * @param string $driver
+ * @param string $driver
* @param \Closure $callback
* @return $this
*/
@@ -391,7 +362,7 @@ class FilesystemManager implements FactoryContract
* Dynamically call the default driver instance.
*
* @param string $method
- * @param array $parameters
+ * @param array $parameters
* @return mixed
*/
public function __call($method, $parameters)
diff --git a/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemServiceProvider.php
index 693227056..ff348a224 100644
--- a/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemServiceProvider.php
+++ b/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemServiceProvider.php
@@ -39,12 +39,12 @@ class FilesystemServiceProvider extends ServiceProvider
{
$this->registerManager();
- $this->app->singleton('filesystem.disk', function () {
- return $this->app['filesystem']->disk($this->getDefaultDriver());
+ $this->app->singleton('filesystem.disk', function ($app) {
+ return $app['filesystem']->disk($this->getDefaultDriver());
});
- $this->app->singleton('filesystem.cloud', function () {
- return $this->app['filesystem']->disk($this->getCloudDriver());
+ $this->app->singleton('filesystem.cloud', function ($app) {
+ return $app['filesystem']->disk($this->getCloudDriver());
});
}
@@ -55,8 +55,8 @@ class FilesystemServiceProvider extends ServiceProvider
*/
protected function registerManager()
{
- $this->app->singleton('filesystem', function () {
- return new FilesystemManager($this->app);
+ $this->app->singleton('filesystem', function ($app) {
+ return new FilesystemManager($app);
});
}
diff --git a/vendor/laravel/framework/src/Illuminate/Filesystem/composer.json b/vendor/laravel/framework/src/Illuminate/Filesystem/composer.json
index 2bafd57d6..f1a48239e 100644
--- a/vendor/laravel/framework/src/Illuminate/Filesystem/composer.json
+++ b/vendor/laravel/framework/src/Illuminate/Filesystem/composer.json
@@ -14,10 +14,10 @@
}
],
"require": {
- "php": "^7.1.3",
- "illuminate/contracts": "5.8.*",
- "illuminate/support": "5.8.*",
- "symfony/finder": "^4.2"
+ "php": "^7.2.5|^8.0",
+ "illuminate/contracts": "^7.0",
+ "illuminate/support": "^7.0",
+ "symfony/finder": "^5.0"
},
"autoload": {
"psr-4": {
@@ -26,15 +26,18 @@
},
"extra": {
"branch-alias": {
- "dev-master": "5.8-dev"
+ "dev-master": "7.x-dev"
}
},
"suggest": {
- "league/flysystem": "Required to use the Flysystem local and FTP drivers (^1.0).",
+ "ext-ftp": "Required to use the Flysystem FTP driver.",
+ "illuminate/http": "Required for handling uploaded files (^7.0).",
+ "league/flysystem": "Required to use the Flysystem local and FTP drivers (^1.1).",
"league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^1.0).",
"league/flysystem-cached-adapter": "Required to use the Flysystem cache (^1.0).",
- "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (^1.0).",
- "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0)."
+ "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0).",
+ "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).",
+ "symfony/mime": "Required to enable support for guessing extensions (^5.0)."
},
"config": {
"sort-packages": true
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/AliasLoader.php b/vendor/laravel/framework/src/Illuminate/Foundation/AliasLoader.php
index 63f38913d..b8765339f 100755
--- a/vendor/laravel/framework/src/Illuminate/Foundation/AliasLoader.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/AliasLoader.php
@@ -134,13 +134,13 @@ class AliasLoader
/**
* Add an alias to the loader.
*
- * @param string $class
* @param string $alias
+ * @param string $class
* @return void
*/
- public function alias($class, $alias)
+ public function alias($alias, $class)
{
- $this->aliases[$class] = $alias;
+ $this->aliases[$alias] = $class;
}
/**
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Application.php b/vendor/laravel/framework/src/Illuminate/Foundation/Application.php
index 60e594ee2..89b2ede18 100755
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Application.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Application.php
@@ -3,33 +3,37 @@
namespace Illuminate\Foundation;
use Closure;
-use RuntimeException;
-use Illuminate\Support\Arr;
-use Illuminate\Support\Str;
-use Illuminate\Http\Request;
-use Illuminate\Support\Collection;
use Illuminate\Container\Container;
-use Illuminate\Filesystem\Filesystem;
-use Illuminate\Log\LogServiceProvider;
-use Illuminate\Support\ServiceProvider;
-use Illuminate\Events\EventServiceProvider;
-use Illuminate\Routing\RoutingServiceProvider;
-use Symfony\Component\HttpKernel\HttpKernelInterface;
-use Symfony\Component\HttpKernel\Exception\HttpException;
-use Illuminate\Contracts\Http\Kernel as HttpKernelContract;
-use Illuminate\Foundation\Bootstrap\LoadEnvironmentVariables;
-use Symfony\Component\HttpFoundation\Request as SymfonyRequest;
-use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Illuminate\Contracts\Foundation\Application as ApplicationContract;
+use Illuminate\Contracts\Foundation\CachesConfiguration;
+use Illuminate\Contracts\Foundation\CachesRoutes;
+use Illuminate\Contracts\Http\Kernel as HttpKernelContract;
+use Illuminate\Events\EventServiceProvider;
+use Illuminate\Filesystem\Filesystem;
+use Illuminate\Foundation\Bootstrap\LoadEnvironmentVariables;
+use Illuminate\Foundation\Events\LocaleUpdated;
+use Illuminate\Http\Request;
+use Illuminate\Log\LogServiceProvider;
+use Illuminate\Routing\RoutingServiceProvider;
+use Illuminate\Support\Arr;
+use Illuminate\Support\Collection;
+use Illuminate\Support\Env;
+use Illuminate\Support\ServiceProvider;
+use Illuminate\Support\Str;
+use RuntimeException;
+use Symfony\Component\HttpFoundation\Request as SymfonyRequest;
+use Symfony\Component\HttpKernel\Exception\HttpException;
+use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
+use Symfony\Component\HttpKernel\HttpKernelInterface;
-class Application extends Container implements ApplicationContract, HttpKernelInterface
+class Application extends Container implements ApplicationContract, CachesConfiguration, CachesRoutes, HttpKernelInterface
{
/**
* The Laravel framework version.
*
* @var string
*/
- const VERSION = '5.8.38';
+ const VERSION = '7.30.1';
/**
* The base path for the Laravel installation.
@@ -129,6 +133,13 @@ class Application extends Container implements ApplicationContract, HttpKernelIn
*/
protected $environmentFile = '.env';
+ /**
+ * Indicates if the application is running in the console.
+ *
+ * @var bool|null
+ */
+ protected $isRunningInConsole;
+
/**
* The application namespace.
*
@@ -136,6 +147,13 @@ class Application extends Container implements ApplicationContract, HttpKernelIn
*/
protected $namespace;
+ /**
+ * The prefixes of absolute cache paths for use during normalization.
+ *
+ * @var array
+ */
+ protected $absoluteCachePathPrefixes = ['/', '\\'];
+
/**
* Create a new Illuminate application instance.
*
@@ -177,9 +195,11 @@ class Application extends Container implements ApplicationContract, HttpKernelIn
$this->instance(Container::class, $this);
$this->singleton(Mix::class);
- $this->instance(PackageManifest::class, new PackageManifest(
- new Filesystem, $this->basePath(), $this->getCachedPackagesPath()
- ));
+ $this->singleton(PackageManifest::class, function () {
+ return new PackageManifest(
+ new Filesystem, $this->basePath(), $this->getCachedPackagesPath()
+ );
+ });
}
/**
@@ -549,11 +569,11 @@ class Application extends Container implements ApplicationContract, HttpKernelIn
*/
public function runningInConsole()
{
- if (isset($_ENV['APP_RUNNING_IN_CONSOLE'])) {
- return $_ENV['APP_RUNNING_IN_CONSOLE'] === 'true';
+ if ($this->isRunningInConsole === null) {
+ $this->isRunningInConsole = Env::get('APP_RUNNING_IN_CONSOLE') ?? (\PHP_SAPI === 'cli' || \PHP_SAPI === 'phpdbg');
}
- return php_sapi_name() === 'cli' || php_sapi_name() === 'phpdbg';
+ return $this->isRunningInConsole;
}
/**
@@ -575,7 +595,7 @@ class Application extends Container implements ApplicationContract, HttpKernelIn
{
$providers = Collection::make($this->config['app.providers'])
->partition(function ($provider) {
- return Str::startsWith($provider, 'Illuminate\\');
+ return strpos($provider, 'Illuminate\\') === 0;
});
$providers->splice(1, 0, [$this->make(PackageManifest::class)->providers()]);
@@ -588,7 +608,7 @@ class Application extends Container implements ApplicationContract, HttpKernelIn
* Register a service provider with the application.
*
* @param \Illuminate\Support\ServiceProvider|string $provider
- * @param bool $force
+ * @param bool $force
* @return \Illuminate\Support\ServiceProvider
*/
public function register($provider, $force = false)
@@ -750,27 +770,47 @@ class Application extends Container implements ApplicationContract, HttpKernelIn
/**
* Resolve the given type from the container.
*
- * (Overriding Container::make)
- *
* @param string $abstract
* @param array $parameters
* @return mixed
*/
public function make($abstract, array $parameters = [])
{
- $abstract = $this->getAlias($abstract);
-
- if ($this->isDeferredService($abstract) && ! isset($this->instances[$abstract])) {
- $this->loadDeferredProvider($abstract);
- }
+ $this->loadDeferredProviderIfNeeded($abstract = $this->getAlias($abstract));
return parent::make($abstract, $parameters);
}
/**
- * Determine if the given abstract type has been bound.
+ * Resolve the given type from the container.
*
- * (Overriding Container::bound)
+ * @param string $abstract
+ * @param array $parameters
+ * @param bool $raiseEvents
+ * @return mixed
+ */
+ protected function resolve($abstract, $parameters = [], $raiseEvents = true)
+ {
+ $this->loadDeferredProviderIfNeeded($abstract = $this->getAlias($abstract));
+
+ return parent::resolve($abstract, $parameters, $raiseEvents);
+ }
+
+ /**
+ * Load the deferred provider if the given type is a deferred service and the instance has not been loaded.
+ *
+ * @param string $abstract
+ * @return void
+ */
+ protected function loadDeferredProviderIfNeeded($abstract)
+ {
+ if ($this->isDeferredService($abstract) && ! isset($this->instances[$abstract])) {
+ $this->loadDeferredProvider($abstract);
+ }
+ }
+
+ /**
+ * Determine if the given abstract type has been bound.
*
* @param string $abstract
* @return bool
@@ -863,14 +903,14 @@ class Application extends Container implements ApplicationContract, HttpKernelIn
protected function fireAppCallbacks(array $callbacks)
{
foreach ($callbacks as $callback) {
- call_user_func($callback, $this);
+ $callback($this);
}
}
/**
* {@inheritdoc}
*/
- public function handle(SymfonyRequest $request, $type = self::MASTER_REQUEST, $catch = true)
+ public function handle(SymfonyRequest $request, int $type = self::MASTER_REQUEST, bool $catch = true)
{
return $this[HttpKernelContract::class]->handle(Request::createFromBase($request));
}
@@ -893,7 +933,7 @@ class Application extends Container implements ApplicationContract, HttpKernelIn
*/
public function getCachedServicesPath()
{
- return $_ENV['APP_SERVICES_CACHE'] ?? $this->bootstrapPath().'/cache/services.php';
+ return $this->normalizeCachePath('APP_SERVICES_CACHE', 'cache/services.php');
}
/**
@@ -903,7 +943,7 @@ class Application extends Container implements ApplicationContract, HttpKernelIn
*/
public function getCachedPackagesPath()
{
- return $_ENV['APP_PACKAGES_CACHE'] ?? $this->bootstrapPath().'/cache/packages.php';
+ return $this->normalizeCachePath('APP_PACKAGES_CACHE', 'cache/packages.php');
}
/**
@@ -923,7 +963,7 @@ class Application extends Container implements ApplicationContract, HttpKernelIn
*/
public function getCachedConfigPath()
{
- return $_ENV['APP_CONFIG_CACHE'] ?? $this->bootstrapPath().'/cache/config.php';
+ return $this->normalizeCachePath('APP_CONFIG_CACHE', 'cache/config.php');
}
/**
@@ -943,7 +983,7 @@ class Application extends Container implements ApplicationContract, HttpKernelIn
*/
public function getCachedRoutesPath()
{
- return $_ENV['APP_ROUTES_CACHE'] ?? $this->bootstrapPath().'/cache/routes.php';
+ return $this->normalizeCachePath('APP_ROUTES_CACHE', 'cache/routes-v7.php');
}
/**
@@ -963,7 +1003,38 @@ class Application extends Container implements ApplicationContract, HttpKernelIn
*/
public function getCachedEventsPath()
{
- return $_ENV['APP_EVENTS_CACHE'] ?? $this->bootstrapPath().'/cache/events.php';
+ return $this->normalizeCachePath('APP_EVENTS_CACHE', 'cache/events.php');
+ }
+
+ /**
+ * Normalize a relative or absolute path to a cache file.
+ *
+ * @param string $key
+ * @param string $default
+ * @return string
+ */
+ protected function normalizeCachePath($key, $default)
+ {
+ if (is_null($env = Env::get($key))) {
+ return $this->bootstrapPath($default);
+ }
+
+ return Str::startsWith($env, $this->absoluteCachePathPrefixes)
+ ? $env
+ : $this->basePath($env);
+ }
+
+ /**
+ * Add new prefix to list of absolute path prefixes.
+ *
+ * @param string $prefix
+ * @return $this
+ */
+ public function addAbsoluteCachePathPrefix($prefix)
+ {
+ $this->absoluteCachePathPrefixes[] = $prefix;
+
+ return $this;
}
/**
@@ -979,12 +1050,13 @@ class Application extends Container implements ApplicationContract, HttpKernelIn
/**
* Throw an HttpException with the given data.
*
- * @param int $code
+ * @param int $code
* @param string $message
- * @param array $headers
+ * @param array $headers
* @return void
*
* @throws \Symfony\Component\HttpKernel\Exception\HttpException
+ * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
*/
public function abort($code, $message = '', array $headers = [])
{
@@ -1030,6 +1102,17 @@ class Application extends Container implements ApplicationContract, HttpKernelIn
return $this->loadedProviders;
}
+ /**
+ * Determine if the given service provider is loaded.
+ *
+ * @param string $provider
+ * @return bool
+ */
+ public function providerIsLoaded(string $provider)
+ {
+ return isset($this->loadedProviders[$provider]);
+ }
+
/**
* Get the application's deferred services.
*
@@ -1094,6 +1177,16 @@ class Application extends Container implements ApplicationContract, HttpKernelIn
return $this['config']->get('app.locale');
}
+ /**
+ * Get the current application fallback locale.
+ *
+ * @return string
+ */
+ public function getFallbackLocale()
+ {
+ return $this['config']->get('app.fallback_locale');
+ }
+
/**
* Set the current application locale.
*
@@ -1106,7 +1199,20 @@ class Application extends Container implements ApplicationContract, HttpKernelIn
$this['translator']->setLocale($locale);
- $this['events']->dispatch(new Events\LocaleUpdated($locale));
+ $this['events']->dispatch(new LocaleUpdated($locale));
+ }
+
+ /**
+ * Set the current application fallback locale.
+ *
+ * @param string $fallbackLocale
+ * @return void
+ */
+ public function setFallbackLocale($fallbackLocale)
+ {
+ $this['config']->set('app.fallback_locale', $fallbackLocale);
+
+ $this['translator']->setFallback($fallbackLocale);
}
/**
@@ -1133,11 +1239,12 @@ class Application extends Container implements ApplicationContract, HttpKernelIn
'auth.driver' => [\Illuminate\Contracts\Auth\Guard::class],
'blade.compiler' => [\Illuminate\View\Compilers\BladeCompiler::class],
'cache' => [\Illuminate\Cache\CacheManager::class, \Illuminate\Contracts\Cache\Factory::class],
- 'cache.store' => [\Illuminate\Cache\Repository::class, \Illuminate\Contracts\Cache\Repository::class],
+ 'cache.store' => [\Illuminate\Cache\Repository::class, \Illuminate\Contracts\Cache\Repository::class, \Psr\SimpleCache\CacheInterface::class],
+ 'cache.psr6' => [\Symfony\Component\Cache\Adapter\Psr16Adapter::class, \Symfony\Component\Cache\Adapter\AdapterInterface::class, \Psr\Cache\CacheItemPoolInterface::class],
'config' => [\Illuminate\Config\Repository::class, \Illuminate\Contracts\Config\Repository::class],
'cookie' => [\Illuminate\Cookie\CookieJar::class, \Illuminate\Contracts\Cookie\Factory::class, \Illuminate\Contracts\Cookie\QueueingFactory::class],
'encrypter' => [\Illuminate\Encryption\Encrypter::class, \Illuminate\Contracts\Encryption\Encrypter::class],
- 'db' => [\Illuminate\Database\DatabaseManager::class],
+ 'db' => [\Illuminate\Database\DatabaseManager::class, \Illuminate\Database\ConnectionResolverInterface::class],
'db.connection' => [\Illuminate\Database\Connection::class, \Illuminate\Database\ConnectionInterface::class],
'events' => [\Illuminate\Events\Dispatcher::class, \Illuminate\Contracts\Events\Dispatcher::class],
'files' => [\Illuminate\Filesystem\Filesystem::class],
@@ -1148,6 +1255,7 @@ class Application extends Container implements ApplicationContract, HttpKernelIn
'hash.driver' => [\Illuminate\Contracts\Hashing\Hasher::class],
'translator' => [\Illuminate\Translation\Translator::class, \Illuminate\Contracts\Translation\Translator::class],
'log' => [\Illuminate\Log\LogManager::class, \Psr\Log\LoggerInterface::class],
+ 'mail.manager' => [\Illuminate\Mail\MailManager::class, \Illuminate\Contracts\Mail\Factory::class],
'mailer' => [\Illuminate\Mail\Mailer::class, \Illuminate\Contracts\Mail\Mailer::class, \Illuminate\Contracts\Mail\MailQueue::class],
'auth.password' => [\Illuminate\Auth\Passwords\PasswordBrokerManager::class, \Illuminate\Contracts\Auth\PasswordBrokerFactory::class],
'auth.password.broker' => [\Illuminate\Auth\Passwords\PasswordBroker::class, \Illuminate\Contracts\Auth\PasswordBroker::class],
@@ -1156,6 +1264,7 @@ class Application extends Container implements ApplicationContract, HttpKernelIn
'queue.failer' => [\Illuminate\Queue\Failed\FailedJobProviderInterface::class],
'redirect' => [\Illuminate\Routing\Redirector::class],
'redis' => [\Illuminate\Redis\RedisManager::class, \Illuminate\Contracts\Redis\Factory::class],
+ 'redis.connection' => [\Illuminate\Redis\Connections\Connection::class, \Illuminate\Contracts\Redis\Connection::class],
'request' => [\Illuminate\Http\Request::class, \Symfony\Component\HttpFoundation\Request::class],
'router' => [\Illuminate\Routing\Router::class, \Illuminate\Contracts\Routing\Registrar::class, \Illuminate\Contracts\Routing\BindingRegistrar::class],
'session' => [\Illuminate\Session\SessionManager::class],
@@ -1187,6 +1296,7 @@ class Application extends Container implements ApplicationContract, HttpKernelIn
$this->reboundCallbacks = [];
$this->serviceProviders = [];
$this->resolvingCallbacks = [];
+ $this->terminatingCallbacks = [];
$this->afterResolvingCallbacks = [];
$this->globalResolvingCallbacks = [];
}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/Access/Authorizable.php b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/Access/Authorizable.php
index 9e8e33bdf..dd0ba609f 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/Access/Authorizable.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/Access/Authorizable.php
@@ -7,38 +7,38 @@ use Illuminate\Contracts\Auth\Access\Gate;
trait Authorizable
{
/**
- * Determine if the entity has a given ability.
+ * Determine if the entity has the given abilities.
*
- * @param string $ability
+ * @param iterable|string $abilities
* @param array|mixed $arguments
* @return bool
*/
- public function can($ability, $arguments = [])
+ public function can($abilities, $arguments = [])
{
- return app(Gate::class)->forUser($this)->check($ability, $arguments);
+ return app(Gate::class)->forUser($this)->check($abilities, $arguments);
}
/**
- * Determine if the entity does not have a given ability.
+ * Determine if the entity does not have the given abilities.
*
- * @param string $ability
+ * @param iterable|string $abilities
* @param array|mixed $arguments
* @return bool
*/
- public function cant($ability, $arguments = [])
+ public function cant($abilities, $arguments = [])
{
- return ! $this->can($ability, $arguments);
+ return ! $this->can($abilities, $arguments);
}
/**
- * Determine if the entity does not have a given ability.
+ * Determine if the entity does not have the given abilities.
*
- * @param string $ability
+ * @param iterable|string $abilities
* @param array|mixed $arguments
* @return bool
*/
- public function cannot($ability, $arguments = [])
+ public function cannot($abilities, $arguments = [])
{
- return $this->cant($ability, $arguments);
+ return $this->cant($abilities, $arguments);
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/Access/AuthorizesRequests.php b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/Access/AuthorizesRequests.php
index 9930d9052..85a9596f9 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/Access/AuthorizesRequests.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/Access/AuthorizesRequests.php
@@ -2,8 +2,8 @@
namespace Illuminate\Foundation\Auth\Access;
-use Illuminate\Support\Str;
use Illuminate\Contracts\Auth\Access\Gate;
+use Illuminate\Support\Str;
trait AuthorizesRequests
{
@@ -105,6 +105,7 @@ trait AuthorizesRequests
protected function resourceAbilityMap()
{
return [
+ 'index' => 'viewAny',
'show' => 'view',
'create' => 'create',
'store' => 'create',
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/RegistersUsers.php b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/RegistersUsers.php
deleted file mode 100644
index f3238f28b..000000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/RegistersUsers.php
+++ /dev/null
@@ -1,62 +0,0 @@
-validator($request->all())->validate();
-
- event(new Registered($user = $this->create($request->all())));
-
- $this->guard()->login($user);
-
- return $this->registered($request, $user)
- ?: redirect($this->redirectPath());
- }
-
- /**
- * Get the guard to be used during registration.
- *
- * @return \Illuminate\Contracts\Auth\StatefulGuard
- */
- protected function guard()
- {
- return Auth::guard();
- }
-
- /**
- * The user has been registered.
- *
- * @param \Illuminate\Http\Request $request
- * @param mixed $user
- * @return mixed
- */
- protected function registered(Request $request, $user)
- {
- //
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/User.php b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/User.php
index c816436fe..be1dff542 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/User.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/User.php
@@ -4,12 +4,12 @@ namespace Illuminate\Foundation\Auth;
use Illuminate\Auth\Authenticatable;
use Illuminate\Auth\MustVerifyEmail;
-use Illuminate\Database\Eloquent\Model;
use Illuminate\Auth\Passwords\CanResetPassword;
-use Illuminate\Foundation\Auth\Access\Authorizable;
-use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
+use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
+use Illuminate\Database\Eloquent\Model;
+use Illuminate\Foundation\Auth\Access\Authorizable;
class User extends Model implements
AuthenticatableContract,
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/VerifiesEmails.php b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/VerifiesEmails.php
deleted file mode 100644
index 74e74ed09..000000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/VerifiesEmails.php
+++ /dev/null
@@ -1,66 +0,0 @@
-user()->hasVerifiedEmail()
- ? redirect($this->redirectPath())
- : view('auth.verify');
- }
-
- /**
- * Mark the authenticated user's email address as verified.
- *
- * @param \Illuminate\Http\Request $request
- * @return \Illuminate\Http\Response
- * @throws \Illuminate\Auth\Access\AuthorizationException
- */
- public function verify(Request $request)
- {
- if ($request->route('id') != $request->user()->getKey()) {
- throw new AuthorizationException;
- }
-
- if ($request->user()->hasVerifiedEmail()) {
- return redirect($this->redirectPath());
- }
-
- if ($request->user()->markEmailAsVerified()) {
- event(new Verified($request->user()));
- }
-
- return redirect($this->redirectPath())->with('verified', true);
- }
-
- /**
- * Resend the email verification notification.
- *
- * @param \Illuminate\Http\Request $request
- * @return \Illuminate\Http\Response
- */
- public function resend(Request $request)
- {
- if ($request->user()->hasVerifiedEmail()) {
- return redirect($this->redirectPath());
- }
-
- $request->user()->sendEmailVerificationNotification();
-
- return back()->with('resent', true);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php b/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php
index ad576347e..280efaa87 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php
@@ -2,13 +2,13 @@
namespace Illuminate\Foundation\Bootstrap;
-use Exception;
use ErrorException;
+use Exception;
use Illuminate\Contracts\Debug\ExceptionHandler;
use Illuminate\Contracts\Foundation\Application;
use Symfony\Component\Console\Output\ConsoleOutput;
-use Symfony\Component\Debug\Exception\FatalErrorException;
-use Symfony\Component\Debug\Exception\FatalThrowableError;
+use Symfony\Component\ErrorHandler\Error\FatalError;
+use Throwable;
class HandleExceptions
{
@@ -80,12 +80,8 @@ class HandleExceptions
* @param \Throwable $e
* @return void
*/
- public function handleException($e)
+ public function handleException(Throwable $e)
{
- if (! $e instanceof Exception) {
- $e = new FatalThrowableError($e);
- }
-
try {
self::$reservedMemory = null;
@@ -104,10 +100,10 @@ class HandleExceptions
/**
* Render an exception to the console.
*
- * @param \Exception $e
+ * @param \Throwable $e
* @return void
*/
- protected function renderForConsole(Exception $e)
+ protected function renderForConsole(Throwable $e)
{
$this->getExceptionHandler()->renderForConsole(new ConsoleOutput, $e);
}
@@ -115,10 +111,10 @@ class HandleExceptions
/**
* Render an exception as an HTTP response and send it.
*
- * @param \Exception $e
+ * @param \Throwable $e
* @return void
*/
- protected function renderHttpResponse(Exception $e)
+ protected function renderHttpResponse(Throwable $e)
{
$this->getExceptionHandler()->render($this->app['request'], $e)->send();
}
@@ -131,22 +127,20 @@ class HandleExceptions
public function handleShutdown()
{
if (! is_null($error = error_get_last()) && $this->isFatal($error['type'])) {
- $this->handleException($this->fatalExceptionFromError($error, 0));
+ $this->handleException($this->fatalErrorFromPhpError($error, 0));
}
}
/**
- * Create a new fatal exception instance from an error array.
+ * Create a new fatal error instance from an error array.
*
* @param array $error
* @param int|null $traceOffset
- * @return \Symfony\Component\Debug\Exception\FatalErrorException
+ * @return \Symfony\Component\ErrorHandler\Error\FatalError
*/
- protected function fatalExceptionFromError(array $error, $traceOffset = null)
+ protected function fatalErrorFromPhpError(array $error, $traceOffset = null)
{
- return new FatalErrorException(
- $error['message'], $error['type'], 0, $error['file'], $error['line'], $traceOffset
- );
+ return new FatalError($error['message'], 0, $error, $traceOffset);
}
/**
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php b/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php
index 8f4653de9..501a1eea4 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php
@@ -3,11 +3,11 @@
namespace Illuminate\Foundation\Bootstrap;
use Exception;
-use SplFileInfo;
use Illuminate\Config\Repository;
-use Symfony\Component\Finder\Finder;
-use Illuminate\Contracts\Foundation\Application;
use Illuminate\Contracts\Config\Repository as RepositoryContract;
+use Illuminate\Contracts\Foundation\Application;
+use SplFileInfo;
+use Symfony\Component\Finder\Finder;
class LoadConfiguration
{
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadEnvironmentVariables.php b/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadEnvironmentVariables.php
index b39bbf83e..60dd3707f 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadEnvironmentVariables.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadEnvironmentVariables.php
@@ -3,13 +3,10 @@
namespace Illuminate\Foundation\Bootstrap;
use Dotenv\Dotenv;
-use Dotenv\Environment\DotenvFactory;
use Dotenv\Exception\InvalidFileException;
-use Dotenv\Environment\Adapter\PutenvAdapter;
-use Symfony\Component\Console\Input\ArgvInput;
-use Dotenv\Environment\Adapter\EnvConstAdapter;
use Illuminate\Contracts\Foundation\Application;
-use Dotenv\Environment\Adapter\ServerConstAdapter;
+use Illuminate\Support\Env;
+use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Output\ConsoleOutput;
class LoadEnvironmentVariables
@@ -51,12 +48,14 @@ class LoadEnvironmentVariables
}
}
- if (! env('APP_ENV')) {
+ $environment = Env::get('APP_ENV');
+
+ if (! $environment) {
return;
}
$this->setEnvironmentFilePath(
- $app, $app->environmentFile().'.'.env('APP_ENV')
+ $app, $app->environmentFile().'.'.$environment
);
}
@@ -87,9 +86,9 @@ class LoadEnvironmentVariables
protected function createDotenv($app)
{
return Dotenv::create(
+ Env::getRepository(),
$app->environmentPath(),
- $app->environmentFile(),
- new DotenvFactory([new EnvConstAdapter, new ServerConstAdapter, new PutenvAdapter])
+ $app->environmentFile()
);
}
@@ -106,6 +105,6 @@ class LoadEnvironmentVariables
$output->writeln('The environment file is invalid!');
$output->writeln($e->getMessage());
- die(1);
+ exit(1);
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterFacades.php b/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterFacades.php
index 62a42d074..2a4c6b4ad 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterFacades.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterFacades.php
@@ -2,10 +2,10 @@
namespace Illuminate\Foundation\Bootstrap;
-use Illuminate\Foundation\AliasLoader;
-use Illuminate\Support\Facades\Facade;
-use Illuminate\Foundation\PackageManifest;
use Illuminate\Contracts\Foundation\Application;
+use Illuminate\Foundation\AliasLoader;
+use Illuminate\Foundation\PackageManifest;
+use Illuminate\Support\Facades\Facade;
class RegisterFacades
{
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/SetRequestForConsole.php b/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/SetRequestForConsole.php
index fda735ba2..613fa857e 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/SetRequestForConsole.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/SetRequestForConsole.php
@@ -2,8 +2,8 @@
namespace Illuminate\Foundation\Bootstrap;
-use Illuminate\Http\Request;
use Illuminate\Contracts\Foundation\Application;
+use Illuminate\Http\Request;
class SetRequestForConsole
{
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Bus/Dispatchable.php b/vendor/laravel/framework/src/Illuminate/Foundation/Bus/Dispatchable.php
index 6dd992e5f..f088497c2 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Bus/Dispatchable.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Bus/Dispatchable.php
@@ -3,6 +3,7 @@
namespace Illuminate\Foundation\Bus;
use Illuminate\Contracts\Bus\Dispatcher;
+use Illuminate\Support\Fluent;
trait Dispatchable
{
@@ -16,6 +17,32 @@ trait Dispatchable
return new PendingDispatch(new static(...func_get_args()));
}
+ /**
+ * Dispatch the job with the given arguments if the given truth test passes.
+ *
+ * @param bool $boolean
+ * @return \Illuminate\Foundation\Bus\PendingDispatch|\Illuminate\Support\Fluent
+ */
+ public static function dispatchIf($boolean, ...$arguments)
+ {
+ return $boolean
+ ? new PendingDispatch(new static(...$arguments))
+ : new Fluent;
+ }
+
+ /**
+ * Dispatch the job with the given arguments unless the given truth test passes.
+ *
+ * @param bool $boolean
+ * @return \Illuminate\Foundation\Bus\PendingDispatch|\Illuminate\Support\Fluent
+ */
+ public static function dispatchUnless($boolean, ...$arguments)
+ {
+ return ! $boolean
+ ? new PendingDispatch(new static(...$arguments))
+ : new Fluent;
+ }
+
/**
* Dispatch a command to its appropriate handler in the current process.
*
@@ -26,6 +53,16 @@ trait Dispatchable
return app(Dispatcher::class)->dispatchNow(new static(...func_get_args()));
}
+ /**
+ * Dispatch a command to its appropriate handler after the current process.
+ *
+ * @return mixed
+ */
+ public static function dispatchAfterResponse()
+ {
+ return app(Dispatcher::class)->dispatchAfterResponse(new static(...func_get_args()));
+ }
+
/**
* Set the jobs that should run if this job is successful.
*
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Bus/PendingChain.php b/vendor/laravel/framework/src/Illuminate/Foundation/Bus/PendingChain.php
index b34553679..090e44d4c 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Bus/PendingChain.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Bus/PendingChain.php
@@ -2,14 +2,17 @@
namespace Illuminate\Foundation\Bus;
+use Closure;
+use Illuminate\Queue\CallQueuedClosure;
+
class PendingChain
{
/**
* The class name of the job being dispatched.
*
- * @var string
+ * @var mixed
*/
- public $class;
+ public $job;
/**
* The jobs to be chained.
@@ -21,13 +24,13 @@ class PendingChain
/**
* Create a new PendingChain instance.
*
- * @param string $class
+ * @param mixed $job
* @param array $chain
* @return void
*/
- public function __construct($class, $chain)
+ public function __construct($job, $chain)
{
- $this->class = $class;
+ $this->job = $job;
$this->chain = $chain;
}
@@ -38,8 +41,14 @@ class PendingChain
*/
public function dispatch()
{
- return (new PendingDispatch(
- new $this->class(...func_get_args())
- ))->chain($this->chain);
+ if (is_string($this->job)) {
+ $firstJob = new $this->job(...func_get_args());
+ } elseif ($this->job instanceof Closure) {
+ $firstJob = CallQueuedClosure::create($this->job);
+ } else {
+ $firstJob = $this->job;
+ }
+
+ return (new PendingDispatch($firstJob))->chain($this->chain);
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Bus/PendingDispatch.php b/vendor/laravel/framework/src/Illuminate/Foundation/Bus/PendingDispatch.php
index 3c3879d4f..89329515e 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Bus/PendingDispatch.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Bus/PendingDispatch.php
@@ -13,6 +13,13 @@ class PendingDispatch
*/
protected $job;
+ /**
+ * Indicates if the job should be dispatched immediately after sending the response.
+ *
+ * @var bool
+ */
+ protected $afterResponse = false;
+
/**
* Create a new pending job dispatch.
*
@@ -102,6 +109,18 @@ class PendingDispatch
return $this;
}
+ /**
+ * Indicate that the job should be dispatched after the response is sent to the browser.
+ *
+ * @return $this
+ */
+ public function afterResponse()
+ {
+ $this->afterResponse = true;
+
+ return $this;
+ }
+
/**
* Handle the object's destruction.
*
@@ -109,6 +128,10 @@ class PendingDispatch
*/
public function __destruct()
{
- app(Dispatcher::class)->dispatch($this->job);
+ if ($this->afterResponse) {
+ app(Dispatcher::class)->dispatchAfterResponse($this->job);
+ } else {
+ app(Dispatcher::class)->dispatch($this->job);
+ }
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/AppNameCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/AppNameCommand.php
deleted file mode 100644
index 1c0d359fa..000000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/AppNameCommand.php
+++ /dev/null
@@ -1,296 +0,0 @@
-files = $files;
- $this->composer = $composer;
- }
-
- /**
- * Execute the console command.
- *
- * @return void
- */
- public function handle()
- {
- $this->currentRoot = trim($this->laravel->getNamespace(), '\\');
-
- $this->setAppDirectoryNamespace();
- $this->setBootstrapNamespaces();
- $this->setConfigNamespaces();
- $this->setComposerNamespace();
- $this->setDatabaseFactoryNamespaces();
-
- $this->info('Application namespace set!');
-
- $this->composer->dumpAutoloads();
-
- $this->call('optimize:clear');
- }
-
- /**
- * Set the namespace on the files in the app directory.
- *
- * @return void
- */
- protected function setAppDirectoryNamespace()
- {
- $files = Finder::create()
- ->in($this->laravel['path'])
- ->contains($this->currentRoot)
- ->name('*.php');
-
- foreach ($files as $file) {
- $this->replaceNamespace($file->getRealPath());
- }
- }
-
- /**
- * Replace the App namespace at the given path.
- *
- * @param string $path
- * @return void
- */
- protected function replaceNamespace($path)
- {
- $search = [
- 'namespace '.$this->currentRoot.';',
- $this->currentRoot.'\\',
- ];
-
- $replace = [
- 'namespace '.$this->argument('name').';',
- $this->argument('name').'\\',
- ];
-
- $this->replaceIn($path, $search, $replace);
- }
-
- /**
- * Set the bootstrap namespaces.
- *
- * @return void
- */
- protected function setBootstrapNamespaces()
- {
- $search = [
- $this->currentRoot.'\\Http',
- $this->currentRoot.'\\Console',
- $this->currentRoot.'\\Exceptions',
- ];
-
- $replace = [
- $this->argument('name').'\\Http',
- $this->argument('name').'\\Console',
- $this->argument('name').'\\Exceptions',
- ];
-
- $this->replaceIn($this->getBootstrapPath(), $search, $replace);
- }
-
- /**
- * Set the namespace in the appropriate configuration files.
- *
- * @return void
- */
- protected function setConfigNamespaces()
- {
- $this->setAppConfigNamespaces();
- $this->setAuthConfigNamespace();
- $this->setServicesConfigNamespace();
- }
-
- /**
- * Set the application provider namespaces.
- *
- * @return void
- */
- protected function setAppConfigNamespaces()
- {
- $search = [
- $this->currentRoot.'\\Providers',
- $this->currentRoot.'\\Http\\Controllers\\',
- ];
-
- $replace = [
- $this->argument('name').'\\Providers',
- $this->argument('name').'\\Http\\Controllers\\',
- ];
-
- $this->replaceIn($this->getConfigPath('app'), $search, $replace);
- }
-
- /**
- * Set the authentication User namespace.
- *
- * @return void
- */
- protected function setAuthConfigNamespace()
- {
- $this->replaceIn(
- $this->getConfigPath('auth'),
- $this->currentRoot.'\\User',
- $this->argument('name').'\\User'
- );
- }
-
- /**
- * Set the services User namespace.
- *
- * @return void
- */
- protected function setServicesConfigNamespace()
- {
- $this->replaceIn(
- $this->getConfigPath('services'),
- $this->currentRoot.'\\User',
- $this->argument('name').'\\User'
- );
- }
-
- /**
- * Set the PSR-4 namespace in the Composer file.
- *
- * @return void
- */
- protected function setComposerNamespace()
- {
- $this->replaceIn(
- $this->getComposerPath(),
- str_replace('\\', '\\\\', $this->currentRoot).'\\\\',
- str_replace('\\', '\\\\', $this->argument('name')).'\\\\'
- );
- }
-
- /**
- * Set the namespace in database factory files.
- *
- * @return void
- */
- protected function setDatabaseFactoryNamespaces()
- {
- $files = Finder::create()
- ->in(database_path('factories'))
- ->contains($this->currentRoot)
- ->name('*.php');
-
- foreach ($files as $file) {
- $this->replaceIn(
- $file->getRealPath(),
- $this->currentRoot, $this->argument('name')
- );
- }
- }
-
- /**
- * Replace the given string in the given file.
- *
- * @param string $path
- * @param string|array $search
- * @param string|array $replace
- * @return void
- */
- protected function replaceIn($path, $search, $replace)
- {
- if ($this->files->exists($path)) {
- $this->files->put($path, str_replace($search, $replace, $this->files->get($path)));
- }
- }
-
- /**
- * Get the path to the bootstrap/app.php file.
- *
- * @return string
- */
- protected function getBootstrapPath()
- {
- return $this->laravel->bootstrapPath().'/app.php';
- }
-
- /**
- * Get the path to the Composer.json file.
- *
- * @return string
- */
- protected function getComposerPath()
- {
- return base_path('composer.json');
- }
-
- /**
- * Get the path to the given configuration file.
- *
- * @param string $name
- * @return string
- */
- protected function getConfigPath($name)
- {
- return $this->laravel['path.config'].'/'.$name.'.php';
- }
-
- /**
- * Get the console command arguments.
- *
- * @return array
- */
- protected function getArguments()
- {
- return [
- ['name', InputArgument::REQUIRED, 'The desired namespace'],
- ];
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/CastMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/CastMakeCommand.php
new file mode 100644
index 000000000..fd390de10
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/CastMakeCommand.php
@@ -0,0 +1,50 @@
+callback))->getParameters() as $parameter) {
- if (isset($inputs[$parameter->name])) {
- $parameters[$parameter->name] = $inputs[$parameter->name];
+ if (isset($inputs[$parameter->getName()])) {
+ $parameters[$parameter->getName()] = $inputs[$parameter->getName()];
}
}
- return $this->laravel->call(
+ return (int) $this->laravel->call(
$this->callback->bindTo($this, $this), $parameters
);
}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ComponentMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ComponentMakeCommand.php
new file mode 100644
index 000000000..8ab3e8eee
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ComponentMakeCommand.php
@@ -0,0 +1,144 @@
+option('force')) {
+ return false;
+ }
+
+ if (! $this->option('inline')) {
+ $this->writeView();
+ }
+ }
+
+ /**
+ * Write the view for the component.
+ *
+ * @return void
+ */
+ protected function writeView()
+ {
+ $path = $this->viewPath(
+ str_replace('.', '/', 'components.'.$this->getView())
+ );
+
+ if (! $this->files->isDirectory(dirname($path))) {
+ $this->files->makeDirectory(dirname($path), 0777, true, true);
+ }
+
+ file_put_contents(
+ $path.'.blade.php',
+ '
+
+
'
+ );
+ }
+
+ /**
+ * Build the class with the given name.
+ *
+ * @param string $name
+ * @return string
+ */
+ protected function buildClass($name)
+ {
+ if ($this->option('inline')) {
+ return str_replace(
+ 'DummyView',
+ "<<<'blade'\n
\n \n
\nblade",
+ parent::buildClass($name)
+ );
+ }
+
+ return str_replace(
+ 'DummyView',
+ 'view(\'components.'.$this->getView().'\')',
+ parent::buildClass($name)
+ );
+ }
+
+ /**
+ * Get the view name relative to the components directory.
+ *
+ * @return string view
+ */
+ protected function getView()
+ {
+ $name = str_replace('\\', '/', $this->argument('name'));
+
+ return collect(explode('/', $name))
+ ->map(function ($part) {
+ return Str::kebab($part);
+ })
+ ->implode('.');
+ }
+
+ /**
+ * Get the stub file for the generator.
+ *
+ * @return string
+ */
+ protected function getStub()
+ {
+ return __DIR__.'/stubs/view-component.stub';
+ }
+
+ /**
+ * Get the default namespace for the class.
+ *
+ * @param string $rootNamespace
+ * @return string
+ */
+ protected function getDefaultNamespace($rootNamespace)
+ {
+ return $rootNamespace.'\View\Components';
+ }
+
+ /**
+ * Get the console command options.
+ *
+ * @return array
+ */
+ protected function getOptions()
+ {
+ return [
+ ['force', null, InputOption::VALUE_NONE, 'Create the class even if the component already exists'],
+ ['inline', null, InputOption::VALUE_NONE, 'Create a component that renders an inline view'],
+ ];
+ }
+}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConfigCacheCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConfigCacheCommand.php
index 714921c3c..2703ec7ac 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConfigCacheCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConfigCacheCommand.php
@@ -2,11 +2,11 @@
namespace Illuminate\Foundation\Console;
-use Throwable;
-use LogicException;
use Illuminate\Console\Command;
-use Illuminate\Filesystem\Filesystem;
use Illuminate\Contracts\Console\Kernel as ConsoleKernelContract;
+use Illuminate\Filesystem\Filesystem;
+use LogicException;
+use Throwable;
class ConfigCacheCommand extends Command
{
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConsoleMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConsoleMakeCommand.php
index 54183e90f..cada887f9 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConsoleMakeCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConsoleMakeCommand.php
@@ -3,8 +3,8 @@
namespace Illuminate\Foundation\Console;
use Illuminate\Console\GeneratorCommand;
-use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
+use Symfony\Component\Console\Input\InputOption;
class ConsoleMakeCommand extends GeneratorCommand
{
@@ -40,7 +40,7 @@ class ConsoleMakeCommand extends GeneratorCommand
{
$stub = parent::replaceClass($stub, $name);
- return str_replace('dummy:command', $this->option('command'), $stub);
+ return str_replace(['dummy:command', '{{ command }}'], $this->option('command'), $stub);
}
/**
@@ -50,7 +50,11 @@ class ConsoleMakeCommand extends GeneratorCommand
*/
protected function getStub()
{
- return __DIR__.'/stubs/console.stub';
+ $relativePath = '/stubs/console.stub';
+
+ return file_exists($customPath = $this->laravel->basePath(trim($relativePath, '/')))
+ ? $customPath
+ : __DIR__.$relativePath;
}
/**
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/DownCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/DownCommand.php
index 50f8a6d1d..af2f6eb95 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/DownCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/DownCommand.php
@@ -34,6 +34,12 @@ class DownCommand extends Command
public function handle()
{
try {
+ if (file_exists(storage_path('framework/down'))) {
+ $this->comment('Application is already down.');
+
+ return true;
+ }
+
file_put_contents(storage_path('framework/down'),
json_encode($this->getDownFilePayload(),
JSON_PRETTY_PRINT));
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/EventGenerateCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/EventGenerateCommand.php
index 0c6a4a7b6..529b198fa 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/EventGenerateCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/EventGenerateCommand.php
@@ -2,9 +2,9 @@
namespace Illuminate\Foundation\Console;
-use Illuminate\Support\Str;
use Illuminate\Console\Command;
use Illuminate\Foundation\Support\Providers\EventServiceProvider;
+use Illuminate\Support\Str;
class EventGenerateCommand extends Command
{
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/EventListCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/EventListCommand.php
index f2c87ef53..4b11ebb46 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/EventListCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/EventListCommand.php
@@ -2,9 +2,9 @@
namespace Illuminate\Foundation\Console;
-use Illuminate\Support\Str;
use Illuminate\Console\Command;
use Illuminate\Foundation\Support\Providers\EventServiceProvider;
+use Illuminate\Support\Str;
class EventListCommand extends Command
{
@@ -48,7 +48,7 @@ class EventListCommand extends Command
$events = [];
foreach ($this->laravel->getProviders(EventServiceProvider::class) as $provider) {
- $providerEvents = array_merge_recursive($provider->discoverEvents(), $provider->listens());
+ $providerEvents = array_merge_recursive($provider->shouldDiscoverEvents() ? $provider->discoverEvents() : [], $provider->listens());
$events = array_merge_recursive($events, $providerEvents);
}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/EventMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/EventMakeCommand.php
index f18719aa9..af7bf5261 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/EventMakeCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/EventMakeCommand.php
@@ -35,7 +35,8 @@ class EventMakeCommand extends GeneratorCommand
*/
protected function alreadyExists($rawName)
{
- return class_exists($rawName);
+ return class_exists($rawName) ||
+ $this->files->exists($this->getPath($this->qualifyClass($rawName)));
}
/**
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/JobMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/JobMakeCommand.php
index 60d942eb0..57c9a93b2 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/JobMakeCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/JobMakeCommand.php
@@ -36,8 +36,21 @@ class JobMakeCommand extends GeneratorCommand
protected function getStub()
{
return $this->option('sync')
- ? __DIR__.'/stubs/job.stub'
- : __DIR__.'/stubs/job-queued.stub';
+ ? $this->resolveStubPath('/stubs/job.stub')
+ : $this->resolveStubPath('/stubs/job.queued.stub');
+ }
+
+ /**
+ * Resolve the fully-qualified path to the stub.
+ *
+ * @param string $stub
+ * @return string
+ */
+ protected function resolveStubPath($stub)
+ {
+ return file_exists($customPath = $this->laravel->basePath(trim($stub, '/')))
+ ? $customPath
+ : __DIR__.$stub;
}
/**
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php
index ea8a10749..e6b079849 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php
@@ -3,20 +3,19 @@
namespace Illuminate\Foundation\Console;
use Closure;
-use Exception;
-use Throwable;
-use ReflectionClass;
-use Illuminate\Support\Arr;
-use Illuminate\Support\Str;
-use Illuminate\Console\Command;
-use Symfony\Component\Finder\Finder;
-use Illuminate\Console\Scheduling\Schedule;
-use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Console\Application as Artisan;
-use Illuminate\Contracts\Debug\ExceptionHandler;
-use Illuminate\Contracts\Foundation\Application;
+use Illuminate\Console\Command;
+use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Contracts\Console\Kernel as KernelContract;
-use Symfony\Component\Debug\Exception\FatalThrowableError;
+use Illuminate\Contracts\Debug\ExceptionHandler;
+use Illuminate\Contracts\Events\Dispatcher;
+use Illuminate\Contracts\Foundation\Application;
+use Illuminate\Support\Arr;
+use Illuminate\Support\Env;
+use Illuminate\Support\Str;
+use ReflectionClass;
+use Symfony\Component\Finder\Finder;
+use Throwable;
class Kernel implements KernelContract
{
@@ -37,7 +36,7 @@ class Kernel implements KernelContract
/**
* The Artisan application instance.
*
- * @var \Illuminate\Console\Application
+ * @var \Illuminate\Console\Application|null
*/
protected $artisan;
@@ -99,13 +98,10 @@ class Kernel implements KernelContract
protected function defineConsoleSchedule()
{
$this->app->singleton(Schedule::class, function ($app) {
- return (new Schedule($this->scheduleTimezone()))
- ->useCache($this->scheduleCache());
+ return tap(new Schedule($this->scheduleTimezone()), function ($schedule) {
+ $this->schedule($schedule->useCache($this->scheduleCache()));
+ });
});
-
- $schedule = $this->app->make(Schedule::class);
-
- $this->schedule($schedule);
}
/**
@@ -115,7 +111,7 @@ class Kernel implements KernelContract
*/
protected function scheduleCache()
{
- return $_ENV['SCHEDULE_CACHE_DRIVER'] ?? null;
+ return Env::get('SCHEDULE_CACHE_DRIVER');
}
/**
@@ -131,15 +127,7 @@ class Kernel implements KernelContract
$this->bootstrap();
return $this->getArtisan()->run($input, $output);
- } catch (Exception $e) {
- $this->reportException($e);
-
- $this->renderException($output, $e);
-
- return 1;
} catch (Throwable $e) {
- $e = new FatalThrowableError($e);
-
$this->reportException($e);
$this->renderException($output, $e);
@@ -279,7 +267,7 @@ class Kernel implements KernelContract
* Queue the given console command.
*
* @param string $command
- * @param array $parameters
+ * @param array $parameters
* @return \Illuminate\Foundation\Bus\PendingDispatch
*/
public function queue($command, array $parameters = [])
@@ -370,10 +358,10 @@ class Kernel implements KernelContract
/**
* Report the exception to the exception handler.
*
- * @param \Exception $e
+ * @param \Throwable $e
* @return void
*/
- protected function reportException(Exception $e)
+ protected function reportException(Throwable $e)
{
$this->app[ExceptionHandler::class]->report($e);
}
@@ -382,10 +370,10 @@ class Kernel implements KernelContract
* Render the given exception.
*
* @param \Symfony\Component\Console\Output\OutputInterface $output
- * @param \Exception $e
+ * @param \Throwable $e
* @return void
*/
- protected function renderException($output, Exception $e)
+ protected function renderException($output, Throwable $e)
{
$this->app[ExceptionHandler::class]->renderForConsole($output, $e);
}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/KeyGenerateCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/KeyGenerateCommand.php
index 99492f071..030ca2137 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/KeyGenerateCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/KeyGenerateCommand.php
@@ -3,8 +3,8 @@
namespace Illuminate\Foundation\Console;
use Illuminate\Console\Command;
-use Illuminate\Encryption\Encrypter;
use Illuminate\Console\ConfirmableTrait;
+use Illuminate\Encryption\Encrypter;
class KeyGenerateCommand extends Command
{
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ListenerMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ListenerMakeCommand.php
index 7fed4e675..0ded743aa 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ListenerMakeCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ListenerMakeCommand.php
@@ -2,8 +2,8 @@
namespace Illuminate\Foundation\Console;
-use Illuminate\Support\Str;
use Illuminate\Console\GeneratorCommand;
+use Illuminate\Support\Str;
use Symfony\Component\Console\Input\InputOption;
class ListenerMakeCommand extends GeneratorCommand
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/MailMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/MailMakeCommand.php
index d401a9ec4..19bef8db3 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/MailMakeCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/MailMakeCommand.php
@@ -51,7 +51,9 @@ class MailMakeCommand extends GeneratorCommand
*/
protected function writeMarkdownTemplate()
{
- $path = resource_path('views/'.str_replace('.', '/', $this->option('markdown'))).'.blade.php';
+ $path = $this->viewPath(
+ str_replace('.', '/', $this->option('markdown')).'.blade.php'
+ );
if (! $this->files->isDirectory(dirname($path))) {
$this->files->makeDirectory(dirname($path), 0755, true);
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ModelMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ModelMakeCommand.php
index c0116999b..9500e4b04 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ModelMakeCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ModelMakeCommand.php
@@ -2,8 +2,8 @@
namespace Illuminate\Foundation\Console;
-use Illuminate\Support\Str;
use Illuminate\Console\GeneratorCommand;
+use Illuminate\Support\Str;
use Symfony\Component\Console\Input\InputOption;
class ModelMakeCommand extends GeneratorCommand
@@ -42,6 +42,7 @@ class ModelMakeCommand extends GeneratorCommand
if ($this->option('all')) {
$this->input->setOption('factory', true);
+ $this->input->setOption('seed', true);
$this->input->setOption('migration', true);
$this->input->setOption('controller', true);
$this->input->setOption('resource', true);
@@ -55,7 +56,11 @@ class ModelMakeCommand extends GeneratorCommand
$this->createMigration();
}
- if ($this->option('controller') || $this->option('resource')) {
+ if ($this->option('seed')) {
+ $this->createSeeder();
+ }
+
+ if ($this->option('controller') || $this->option('resource') || $this->option('api')) {
$this->createController();
}
}
@@ -94,6 +99,20 @@ class ModelMakeCommand extends GeneratorCommand
]);
}
+ /**
+ * Create a seeder file for the model.
+ *
+ * @return void
+ */
+ protected function createSeeder()
+ {
+ $seeder = Str::studly(class_basename($this->argument('name')));
+
+ $this->call('make:seed', [
+ 'name' => "{$seeder}Seeder",
+ ]);
+ }
+
/**
* Create a controller for the model.
*
@@ -105,10 +124,11 @@ class ModelMakeCommand extends GeneratorCommand
$modelName = $this->qualifyClass($this->getNameInput());
- $this->call('make:controller', [
- 'name' => "{$controller}Controller",
- '--model' => $this->option('resource') ? $modelName : null,
- ]);
+ $this->call('make:controller', array_filter([
+ 'name' => "{$controller}Controller",
+ '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,
+ '--api' => $this->option('api'),
+ ]));
}
/**
@@ -118,11 +138,22 @@ class ModelMakeCommand extends GeneratorCommand
*/
protected function getStub()
{
- if ($this->option('pivot')) {
- return __DIR__.'/stubs/pivot.model.stub';
- }
+ return $this->option('pivot')
+ ? $this->resolveStubPath('/stubs/model.pivot.stub')
+ : $this->resolveStubPath('/stubs/model.stub');
+ }
- return __DIR__.'/stubs/model.stub';
+ /**
+ * Resolve the fully-qualified path to the stub.
+ *
+ * @param string $stub
+ * @return string
+ */
+ protected function resolveStubPath($stub)
+ {
+ return file_exists($customPath = $this->laravel->basePath(trim($stub, '/')))
+ ? $customPath
+ : __DIR__.$stub;
}
/**
@@ -133,19 +164,15 @@ class ModelMakeCommand extends GeneratorCommand
protected function getOptions()
{
return [
- ['all', 'a', InputOption::VALUE_NONE, 'Generate a migration, factory, and resource controller for the model'],
-
+ ['all', 'a', InputOption::VALUE_NONE, 'Generate a migration, seeder, factory, and resource controller for the model'],
['controller', 'c', InputOption::VALUE_NONE, 'Create a new controller for the model'],
-
['factory', 'f', InputOption::VALUE_NONE, 'Create a new factory for the model'],
-
['force', null, InputOption::VALUE_NONE, 'Create the class even if the model already exists'],
-
['migration', 'm', InputOption::VALUE_NONE, 'Create a new migration file for the model'],
-
+ ['seed', 's', InputOption::VALUE_NONE, 'Create a new seeder file for the model'],
['pivot', 'p', InputOption::VALUE_NONE, 'Indicates if the generated model should be a custom intermediate table model'],
-
['resource', 'r', InputOption::VALUE_NONE, 'Indicates if the generated controller should be a resource controller'],
+ ['api', null, InputOption::VALUE_NONE, 'Indicates if the generated controller should be an API controller'],
];
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/NotificationMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/NotificationMakeCommand.php
index 40e9d849f..6eb66e282 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/NotificationMakeCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/NotificationMakeCommand.php
@@ -51,7 +51,9 @@ class NotificationMakeCommand extends GeneratorCommand
*/
protected function writeMarkdownTemplate()
{
- $path = resource_path('views/'.str_replace('.', '/', $this->option('markdown'))).'.blade.php';
+ $path = $this->viewPath(
+ str_replace('.', '/', $this->option('markdown')).'.blade.php'
+ );
if (! $this->files->isDirectory(dirname($path))) {
$this->files->makeDirectory(dirname($path), 0755, true);
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ObserverMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ObserverMakeCommand.php
index 77a816264..b1f1346a5 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ObserverMakeCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ObserverMakeCommand.php
@@ -2,8 +2,8 @@
namespace Illuminate\Foundation\Console;
-use Illuminate\Support\Str;
use Illuminate\Console\GeneratorCommand;
+use Illuminate\Support\Str;
use Symfony\Component\Console\Input\InputOption;
class ObserverMakeCommand extends GeneratorCommand
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/PolicyMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/PolicyMakeCommand.php
index 1d4f07ecb..8b6380ca9 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/PolicyMakeCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/PolicyMakeCommand.php
@@ -2,8 +2,8 @@
namespace Illuminate\Foundation\Console;
-use Illuminate\Support\Str;
use Illuminate\Console\GeneratorCommand;
+use Illuminate\Support\Str;
use Symfony\Component\Console\Input\InputOption;
class PolicyMakeCommand extends GeneratorCommand
@@ -67,6 +67,22 @@ class PolicyMakeCommand extends GeneratorCommand
);
}
+ /**
+ * Get the model for the guard's user provider.
+ *
+ * @return string|null
+ */
+ protected function userProviderModel()
+ {
+ $config = $this->laravel['config'];
+
+ $guard = $this->option('guard') ?: $config->get('auth.defaults.guard');
+
+ return $config->get(
+ 'auth.providers.'.$config->get('auth.guards.'.$guard.'.provider').'.model'
+ );
+ }
+
/**
* Replace the model for the given stub.
*
@@ -78,33 +94,41 @@ class PolicyMakeCommand extends GeneratorCommand
{
$model = str_replace('/', '\\', $model);
- $namespaceModel = $this->laravel->getNamespace().$model;
-
if (Str::startsWith($model, '\\')) {
- $stub = str_replace('NamespacedDummyModel', trim($model, '\\'), $stub);
+ $namespacedModel = trim($model, '\\');
} else {
- $stub = str_replace('NamespacedDummyModel', $namespaceModel, $stub);
+ $namespacedModel = $this->laravel->getNamespace().$model;
}
- $stub = str_replace(
- "use {$namespaceModel};\nuse {$namespaceModel};", "use {$namespaceModel};", $stub
- );
-
$model = class_basename(trim($model, '\\'));
$dummyUser = class_basename($this->userProviderModel());
$dummyModel = Str::camel($model) === 'user' ? 'model' : $model;
- $stub = str_replace('DocDummyModel', Str::snake($dummyModel, ' '), $stub);
+ $replace = [
+ 'NamespacedDummyModel' => $namespacedModel,
+ '{{ namespacedModel }}' => $namespacedModel,
+ '{{namespacedModel}}' => $namespacedModel,
+ 'DummyModel' => $model,
+ '{{ model }}' => $model,
+ '{{model}}' => $model,
+ 'dummyModel' => Str::camel($dummyModel),
+ '{{ modelVariable }}' => Str::camel($dummyModel),
+ '{{modelVariable}}' => Str::camel($dummyModel),
+ 'DummyUser' => $dummyUser,
+ '{{ user }}' => $dummyUser,
+ '{{user}}' => $dummyUser,
+ '$user' => '$'.Str::camel($dummyUser),
+ ];
- $stub = str_replace('DummyModel', $model, $stub);
+ $stub = str_replace(
+ array_keys($replace), array_values($replace), $stub
+ );
- $stub = str_replace('dummyModel', Str::camel($dummyModel), $stub);
-
- $stub = str_replace('DummyUser', $dummyUser, $stub);
-
- return str_replace('DocDummyPluralModel', Str::snake(Str::pluralStudly($dummyModel), ' '), $stub);
+ return str_replace(
+ "use {$namespacedModel};\nuse {$namespacedModel};", "use {$namespacedModel};", $stub
+ );
}
/**
@@ -115,8 +139,21 @@ class PolicyMakeCommand extends GeneratorCommand
protected function getStub()
{
return $this->option('model')
- ? __DIR__.'/stubs/policy.stub'
- : __DIR__.'/stubs/policy.plain.stub';
+ ? $this->resolveStubPath('/stubs/policy.stub')
+ : $this->resolveStubPath('/stubs/policy.plain.stub');
+ }
+
+ /**
+ * Resolve the fully-qualified path to the stub.
+ *
+ * @param string $stub
+ * @return string
+ */
+ protected function resolveStubPath($stub)
+ {
+ return file_exists($customPath = $this->laravel->basePath(trim($stub, '/')))
+ ? $customPath
+ : __DIR__.$stub;
}
/**
@@ -139,6 +176,7 @@ class PolicyMakeCommand extends GeneratorCommand
{
return [
['model', 'm', InputOption::VALUE_OPTIONAL, 'The model that the policy applies to'],
+ ['guard', 'g', InputOption::VALUE_OPTIONAL, 'The guard that the policy relies on'],
];
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/PresetCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/PresetCommand.php
deleted file mode 100644
index 9c7e6c1a8..000000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/PresetCommand.php
+++ /dev/null
@@ -1,96 +0,0 @@
-argument('type'))) {
- return call_user_func(static::$macros[$this->argument('type')], $this);
- }
-
- if (! in_array($this->argument('type'), ['none', 'bootstrap', 'vue', 'react'])) {
- throw new InvalidArgumentException('Invalid preset.');
- }
-
- return $this->{$this->argument('type')}();
- }
-
- /**
- * Install the "fresh" preset.
- *
- * @return void
- */
- protected function none()
- {
- Presets\None::install();
-
- $this->info('Frontend scaffolding removed successfully.');
- }
-
- /**
- * Install the "bootstrap" preset.
- *
- * @return void
- */
- protected function bootstrap()
- {
- Presets\Bootstrap::install();
-
- $this->info('Bootstrap scaffolding installed successfully.');
- $this->comment('Please run "npm install && npm run dev" to compile your fresh scaffolding.');
- }
-
- /**
- * Install the "vue" preset.
- *
- * @return void
- */
- protected function vue()
- {
- Presets\Vue::install();
-
- $this->info('Vue scaffolding installed successfully.');
- $this->comment('Please run "npm install && npm run dev" to compile your fresh scaffolding.');
- }
-
- /**
- * Install the "react" preset.
- *
- * @return void
- */
- protected function react()
- {
- Presets\React::install();
-
- $this->info('React scaffolding installed successfully.');
- $this->comment('Please run "npm install && npm run dev" to compile your fresh scaffolding.');
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/Bootstrap.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/Bootstrap.php
deleted file mode 100644
index 248e2f29d..000000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/Bootstrap.php
+++ /dev/null
@@ -1,44 +0,0 @@
- '^4.0.0',
- 'jquery' => '^3.2',
- 'popper.js' => '^1.12',
- ] + $packages;
- }
-
- /**
- * Update the Sass files for the application.
- *
- * @return void
- */
- protected static function updateSass()
- {
- copy(__DIR__.'/bootstrap-stubs/_variables.scss', resource_path('sass/_variables.scss'));
- copy(__DIR__.'/bootstrap-stubs/app.scss', resource_path('sass/app.scss'));
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/None.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/None.php
deleted file mode 100644
index 63e813e44..000000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/None.php
+++ /dev/null
@@ -1,72 +0,0 @@
-deleteDirectory(resource_path('js/components'));
- $filesystem->delete(resource_path('sass/_variables.scss'));
- $filesystem->deleteDirectory(base_path('node_modules'));
- $filesystem->deleteDirectory(public_path('css'));
- $filesystem->deleteDirectory(public_path('js'));
- });
- }
-
- /**
- * Update the given package array.
- *
- * @param array $packages
- * @return array
- */
- protected static function updatePackageArray(array $packages)
- {
- unset(
- $packages['bootstrap'],
- $packages['jquery'],
- $packages['popper.js'],
- $packages['vue'],
- $packages['vue-template-compiler'],
- $packages['@babel/preset-react'],
- $packages['react'],
- $packages['react-dom']
- );
-
- return $packages;
- }
-
- /**
- * Write the stubs for the Sass and JavaScript files.
- *
- * @return void
- */
- protected static function updateBootstrapping()
- {
- file_put_contents(resource_path('sass/app.scss'), ''.PHP_EOL);
- copy(__DIR__.'/none-stubs/app.js', resource_path('js/app.js'));
- copy(__DIR__.'/none-stubs/bootstrap.js', resource_path('js/bootstrap.js'));
- }
-
- /**
- * Update the Webpack configuration.
- *
- * @return void
- */
- protected static function updateWebpackConfiguration()
- {
- copy(__DIR__.'/none-stubs/webpack.mix.js', base_path('webpack.mix.js'));
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/bootstrap-stubs/app.scss b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/bootstrap-stubs/app.scss
deleted file mode 100644
index 3f1850e39..000000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/bootstrap-stubs/app.scss
+++ /dev/null
@@ -1,13 +0,0 @@
-// Fonts
-@import url('https://fonts.googleapis.com/css?family=Nunito');
-
-// Variables
-@import 'variables';
-
-// Bootstrap
-@import '~bootstrap/scss/bootstrap';
-
-.navbar-laravel {
- background-color: #fff;
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/none-stubs/app.js b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/none-stubs/app.js
deleted file mode 100644
index 31d6f636c..000000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/none-stubs/app.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/**
- * First, we will load all of this project's Javascript utilities and other
- * dependencies. Then, we will be ready to develop a robust and powerful
- * application frontend using useful Laravel and JavaScript libraries.
- */
-
-require('./bootstrap');
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/none-stubs/bootstrap.js b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/none-stubs/bootstrap.js
deleted file mode 100644
index 0c8a1b526..000000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/none-stubs/bootstrap.js
+++ /dev/null
@@ -1,42 +0,0 @@
-window._ = require('lodash');
-
-/**
- * We'll load the axios HTTP library which allows us to easily issue requests
- * to our Laravel back-end. This library automatically handles sending the
- * CSRF token as a header based on the value of the "XSRF" token cookie.
- */
-
-window.axios = require('axios');
-
-window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
-
-/**
- * Next we will register the CSRF Token as a common header with Axios so that
- * all outgoing HTTP requests automatically have it attached. This is just
- * a simple convenience so we don't have to attach every token manually.
- */
-
-let token = document.head.querySelector('meta[name="csrf-token"]');
-
-if (token) {
- window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
-} else {
- console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
-}
-
-/**
- * Echo exposes an expressive API for subscribing to channels and listening
- * for events that are broadcast by Laravel. Echo and event broadcasting
- * allows your team to easily build robust real-time web applications.
- */
-
-// import Echo from 'laravel-echo'
-
-// window.Pusher = require('pusher-js');
-
-// window.Echo = new Echo({
-// broadcaster: 'pusher',
-// key: process.env.MIX_PUSHER_APP_KEY,
-// cluster: process.env.MIX_PUSHER_APP_CLUSTER,
-// encrypted: true
-// });
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/none-stubs/webpack.mix.js b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/none-stubs/webpack.mix.js
deleted file mode 100644
index 19a48fa13..000000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/none-stubs/webpack.mix.js
+++ /dev/null
@@ -1,15 +0,0 @@
-const mix = require('laravel-mix');
-
-/*
- |--------------------------------------------------------------------------
- | Mix Asset Management
- |--------------------------------------------------------------------------
- |
- | Mix provides a clean, fluent API for defining some Webpack build steps
- | for your Laravel application. By default, we are compiling the Sass
- | file for the application as well as bundling up all the JS files.
- |
- */
-
-mix.js('resources/js/app.js', 'public/js')
- .sass('resources/sass/app.scss', 'public/css');
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/react-stubs/Example.js b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/react-stubs/Example.js
deleted file mode 100644
index eac7e8508..000000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/react-stubs/Example.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import React, { Component } from 'react';
-import ReactDOM from 'react-dom';
-
-export default class Example extends Component {
- render() {
- return (
-
-
-
-
-
Example Component
-
-
I'm an example component!
-
-
-
-
- );
- }
-}
-
-if (document.getElementById('example')) {
- ReactDOM.render(, document.getElementById('example'));
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/react-stubs/webpack.mix.js b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/react-stubs/webpack.mix.js
deleted file mode 100644
index cc075aa9c..000000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/react-stubs/webpack.mix.js
+++ /dev/null
@@ -1,15 +0,0 @@
-const mix = require('laravel-mix');
-
-/*
- |--------------------------------------------------------------------------
- | Mix Asset Management
- |--------------------------------------------------------------------------
- |
- | Mix provides a clean, fluent API for defining some Webpack build steps
- | for your Laravel application. By default, we are compiling the Sass
- | file for the application as well as bundling up all the JS files.
- |
- */
-
-mix.react('resources/js/app.js', 'public/js')
- .sass('resources/sass/app.scss', 'public/css');
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/vue-stubs/webpack.mix.js b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/vue-stubs/webpack.mix.js
deleted file mode 100644
index 19a48fa13..000000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/vue-stubs/webpack.mix.js
+++ /dev/null
@@ -1,15 +0,0 @@
-const mix = require('laravel-mix');
-
-/*
- |--------------------------------------------------------------------------
- | Mix Asset Management
- |--------------------------------------------------------------------------
- |
- | Mix provides a clean, fluent API for defining some Webpack build steps
- | for your Laravel application. By default, we are compiling the Sass
- | file for the application as well as bundling up all the JS files.
- |
- */
-
-mix.js('resources/js/app.js', 'public/js')
- .sass('resources/sass/app.scss', 'public/css');
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/QueuedCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/QueuedCommand.php
index cbad0adeb..fb3d027b4 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/QueuedCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/QueuedCommand.php
@@ -3,9 +3,9 @@
namespace Illuminate\Foundation\Console;
use Illuminate\Bus\Queueable;
+use Illuminate\Contracts\Console\Kernel as KernelContract;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
-use Illuminate\Contracts\Console\Kernel as KernelContract;
class QueuedCommand implements ShouldQueue
{
@@ -37,6 +37,6 @@ class QueuedCommand implements ShouldQueue
*/
public function handle(KernelContract $kernel)
{
- call_user_func_array([$kernel, 'call'], $this->data);
+ $kernel->call(...array_values($this->data));
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/RequestMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/RequestMakeCommand.php
index 95b7a87b9..4605c8185 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/RequestMakeCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/RequestMakeCommand.php
@@ -34,7 +34,20 @@ class RequestMakeCommand extends GeneratorCommand
*/
protected function getStub()
{
- return __DIR__.'/stubs/request.stub';
+ return $this->resolveStubPath('/stubs/request.stub');
+ }
+
+ /**
+ * Resolve the fully-qualified path to the stub.
+ *
+ * @param string $stub
+ * @return string
+ */
+ protected function resolveStubPath($stub)
+ {
+ return file_exists($customPath = $this->laravel->basePath(trim($stub, '/')))
+ ? $customPath
+ : __DIR__.$stub;
}
/**
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ResourceMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ResourceMakeCommand.php
index 85800e534..abaf6f04a 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ResourceMakeCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ResourceMakeCommand.php
@@ -2,8 +2,8 @@
namespace Illuminate\Foundation\Console;
-use Illuminate\Support\Str;
use Illuminate\Console\GeneratorCommand;
+use Illuminate\Support\Str;
use Symfony\Component\Console\Input\InputOption;
class ResourceMakeCommand extends GeneratorCommand
@@ -51,8 +51,8 @@ class ResourceMakeCommand extends GeneratorCommand
protected function getStub()
{
return $this->collection()
- ? __DIR__.'/stubs/resource-collection.stub'
- : __DIR__.'/stubs/resource.stub';
+ ? $this->resolveStubPath('/stubs/resource-collection.stub')
+ : $this->resolveStubPath('/stubs/resource.stub');
}
/**
@@ -66,6 +66,19 @@ class ResourceMakeCommand extends GeneratorCommand
Str::endsWith($this->argument('name'), 'Collection');
}
+ /**
+ * Resolve the fully-qualified path to the stub.
+ *
+ * @param string $stub
+ * @return string
+ */
+ protected function resolveStubPath($stub)
+ {
+ return file_exists($customPath = $this->laravel->basePath(trim($stub, '/')))
+ ? $customPath
+ : __DIR__.$stub;
+ }
+
/**
* Get the default namespace for the class.
*
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteCacheCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteCacheCommand.php
index 9d86f16fd..05e52670f 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteCacheCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteCacheCommand.php
@@ -3,9 +3,9 @@
namespace Illuminate\Foundation\Console;
use Illuminate\Console\Command;
+use Illuminate\Contracts\Console\Kernel as ConsoleKernelContract;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Routing\RouteCollection;
-use Illuminate\Contracts\Console\Kernel as ConsoleKernelContract;
class RouteCacheCommand extends Command
{
@@ -104,6 +104,6 @@ class RouteCacheCommand extends Command
{
$stub = $this->files->get(__DIR__.'/stubs/routes.stub');
- return str_replace('{{routes}}', base64_encode(serialize($routes)), $stub);
+ return str_replace('{{routes}}', var_export($routes->compile(), true), $stub);
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteListCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteListCommand.php
index dd83e9824..dca0156ab 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteListCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteListCommand.php
@@ -3,11 +3,11 @@
namespace Illuminate\Foundation\Console;
use Closure;
-use Illuminate\Support\Arr;
-use Illuminate\Support\Str;
+use Illuminate\Console\Command;
use Illuminate\Routing\Route;
use Illuminate\Routing\Router;
-use Illuminate\Console\Command;
+use Illuminate\Support\Arr;
+use Illuminate\Support\Str;
use Symfony\Component\Console\Input\InputOption;
class RouteListCommand extends Command
@@ -170,9 +170,9 @@ class RouteListCommand extends Command
*/
protected function getMiddleware($route)
{
- return collect($route->gatherMiddleware())->map(function ($middleware) {
+ return collect($this->router->gatherRouteMiddleware($route))->map(function ($middleware) {
return $middleware instanceof Closure ? 'Closure' : $middleware;
- })->implode(',');
+ })->implode("\n");
}
/**
@@ -240,7 +240,7 @@ class RouteListCommand extends Command
}
}
- return $results;
+ return array_map('strtolower', $results);
}
/**
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/RuleMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/RuleMakeCommand.php
index 2b6995358..111facb53 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/RuleMakeCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/RuleMakeCommand.php
@@ -34,7 +34,11 @@ class RuleMakeCommand extends GeneratorCommand
*/
protected function getStub()
{
- return __DIR__.'/stubs/rule.stub';
+ $relativePath = '/stubs/rule.stub';
+
+ return file_exists($customPath = $this->laravel->basePath(trim($relativePath, '/')))
+ ? $customPath
+ : __DIR__.$relativePath;
}
/**
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ServeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ServeCommand.php
index 60d9cce95..b931ea227 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ServeCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ServeCommand.php
@@ -3,6 +3,7 @@
namespace Illuminate\Foundation\Console;
use Illuminate\Console\Command;
+use Illuminate\Support\Env;
use Illuminate\Support\ProcessUtils;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Process\PhpExecutableFinder;
@@ -41,7 +42,7 @@ class ServeCommand extends Command
{
chdir(public_path());
- $this->line("Laravel development server started:host()}:{$this->port()}>");
+ $this->line("Laravel development server started: http://{$this->host()}:{$this->port()}");
passthru($this->serverCommand(), $status);
@@ -112,7 +113,7 @@ class ServeCommand extends Command
return [
['host', null, InputOption::VALUE_OPTIONAL, 'The host address to serve the application on', '127.0.0.1'],
- ['port', null, InputOption::VALUE_OPTIONAL, 'The port to serve the application on', $_ENV['SERVER_PORT'] ?? null],
+ ['port', null, InputOption::VALUE_OPTIONAL, 'The port to serve the application on', Env::get('SERVER_PORT')],
['tries', null, InputOption::VALUE_OPTIONAL, 'The max number of ports to attempt to serve from', 10],
];
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/StorageLinkCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/StorageLinkCommand.php
index 11e5c148c..81f7a1762 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/StorageLinkCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/StorageLinkCommand.php
@@ -3,6 +3,8 @@
namespace Illuminate\Foundation\Console;
use Illuminate\Console\Command;
+use RuntimeException;
+use Symfony\Component\Filesystem\Filesystem as SymfonyFilesystem;
class StorageLinkCommand extends Command
{
@@ -11,14 +13,14 @@ class StorageLinkCommand extends Command
*
* @var string
*/
- protected $signature = 'storage:link';
+ protected $signature = 'storage:link {--relative : Create the symbolic link using relative paths}';
/**
* The console command description.
*
* @var string
*/
- protected $description = 'Create a symbolic link from "public/storage" to "storage/app/public"';
+ protected $description = 'Create the symbolic links configured for the application';
/**
* Execute the console command.
@@ -27,14 +29,47 @@ class StorageLinkCommand extends Command
*/
public function handle()
{
- if (file_exists(public_path('storage'))) {
- return $this->error('The "public/storage" directory already exists.');
+ foreach ($this->links() as $link => $target) {
+ if (file_exists($link)) {
+ $this->error("The [$link] link already exists.");
+ } else {
+ if ($this->option('relative')) {
+ $target = $this->getRelativeTarget($link, $target);
+ }
+
+ $this->laravel->make('files')->link($target, $link);
+
+ $this->info("The [$link] link has been connected to [$target].");
+ }
}
- $this->laravel->make('files')->link(
- storage_path('app/public'), public_path('storage')
- );
+ $this->info('The links have been created.');
+ }
- $this->info('The [public/storage] directory has been linked.');
+ /**
+ * Get the symbolic links that are configured for the application.
+ *
+ * @return array
+ */
+ protected function links()
+ {
+ return $this->laravel['config']['filesystems.links'] ??
+ [public_path('storage') => storage_path('app/public')];
+ }
+
+ /**
+ * Get the relative path to the target.
+ *
+ * @param string $link
+ * @param string $target
+ * @return string
+ */
+ protected function getRelativeTarget($link, $target)
+ {
+ if (! class_exists(SymfonyFilesystem::class)) {
+ throw new RuntimeException('To enable support for relative links, please install the symfony/filesystem package.');
+ }
+
+ return (new SymfonyFilesystem)->makePathRelative($target, dirname($link));
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/StubPublishCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/StubPublishCommand.php
new file mode 100644
index 000000000..55e86a958
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/StubPublishCommand.php
@@ -0,0 +1,73 @@
+laravel->basePath('stubs'))) {
+ (new Filesystem)->makeDirectory($stubsPath);
+ }
+
+ $files = [
+ __DIR__.'/stubs/job.queued.stub' => $stubsPath.'/job.queued.stub',
+ __DIR__.'/stubs/job.stub' => $stubsPath.'/job.stub',
+ __DIR__.'/stubs/model.pivot.stub' => $stubsPath.'/model.pivot.stub',
+ __DIR__.'/stubs/model.stub' => $stubsPath.'/model.stub',
+ __DIR__.'/stubs/request.stub' => $stubsPath.'/request.stub',
+ __DIR__.'/stubs/resource.stub' => $stubsPath.'/resource.stub',
+ __DIR__.'/stubs/resource-collection.stub' => $stubsPath.'/resource-collection.stub',
+ __DIR__.'/stubs/test.stub' => $stubsPath.'/test.stub',
+ __DIR__.'/stubs/test.unit.stub' => $stubsPath.'/test.unit.stub',
+ realpath(__DIR__.'/../../Database/Console/Factories/stubs/factory.stub') => $stubsPath.'/factory.stub',
+ realpath(__DIR__.'/../../Database/Console/Seeds/stubs/seeder.stub') => $stubsPath.'/seeder.stub',
+ realpath(__DIR__.'/../../Database/Migrations/stubs/migration.create.stub') => $stubsPath.'/migration.create.stub',
+ realpath(__DIR__.'/../../Database/Migrations/stubs/migration.stub') => $stubsPath.'/migration.stub',
+ realpath(__DIR__.'/../../Database/Migrations/stubs/migration.update.stub') => $stubsPath.'/migration.update.stub',
+ realpath(__DIR__.'/../../Foundation/Console/stubs/console.stub') => $stubsPath.'/console.stub',
+ realpath(__DIR__.'/../../Foundation/Console/stubs/policy.plain.stub') => $stubsPath.'/policy.plain.stub',
+ realpath(__DIR__.'/../../Foundation/Console/stubs/policy.stub') => $stubsPath.'/policy.stub',
+ realpath(__DIR__.'/../../Foundation/Console/stubs/rule.stub') => $stubsPath.'/rule.stub',
+ realpath(__DIR__.'/../../Routing/Console/stubs/controller.api.stub') => $stubsPath.'/controller.api.stub',
+ realpath(__DIR__.'/../../Routing/Console/stubs/controller.invokable.stub') => $stubsPath.'/controller.invokable.stub',
+ realpath(__DIR__.'/../../Routing/Console/stubs/controller.model.api.stub') => $stubsPath.'/controller.model.api.stub',
+ realpath(__DIR__.'/../../Routing/Console/stubs/controller.model.stub') => $stubsPath.'/controller.model.stub',
+ realpath(__DIR__.'/../../Routing/Console/stubs/controller.nested.api.stub') => $stubsPath.'/controller.nested.api.stub',
+ realpath(__DIR__.'/../../Routing/Console/stubs/controller.nested.stub') => $stubsPath.'/controller.nested.stub',
+ realpath(__DIR__.'/../../Routing/Console/stubs/controller.plain.stub') => $stubsPath.'/controller.plain.stub',
+ realpath(__DIR__.'/../../Routing/Console/stubs/controller.stub') => $stubsPath.'/controller.stub',
+ realpath(__DIR__.'/../../Routing/Console/stubs/middleware.stub') => $stubsPath.'/middleware.stub',
+ ];
+
+ foreach ($files as $from => $to) {
+ if (! file_exists($to) || $this->option('force')) {
+ file_put_contents($to, file_get_contents($from));
+ }
+ }
+
+ $this->info('Stubs published successfully.');
+ }
+}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/TestMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/TestMakeCommand.php
index ea08d7cf8..0a176cbab 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/TestMakeCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/TestMakeCommand.php
@@ -2,8 +2,8 @@
namespace Illuminate\Foundation\Console;
-use Illuminate\Support\Str;
use Illuminate\Console\GeneratorCommand;
+use Illuminate\Support\Str;
class TestMakeCommand extends GeneratorCommand
{
@@ -35,11 +35,22 @@ class TestMakeCommand extends GeneratorCommand
*/
protected function getStub()
{
- if ($this->option('unit')) {
- return __DIR__.'/stubs/unit-test.stub';
- }
+ return $this->option('unit')
+ ? $this->resolveStubPath('/stubs/test.unit.stub')
+ : $this->resolveStubPath('/stubs/test.stub');
+ }
- return __DIR__.'/stubs/test.stub';
+ /**
+ * Resolve the fully-qualified path to the stub.
+ *
+ * @param string $stub
+ * @return string
+ */
+ protected function resolveStubPath($stub)
+ {
+ return file_exists($customPath = $this->laravel->basePath(trim($stub, '/')))
+ ? $customPath
+ : __DIR__.$stub;
}
/**
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/VendorPublishCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/VendorPublishCommand.php
index 5c878cdc7..17a459e72 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/VendorPublishCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/VendorPublishCommand.php
@@ -2,13 +2,13 @@
namespace Illuminate\Foundation\Console;
-use Illuminate\Support\Arr;
use Illuminate\Console\Command;
-use League\Flysystem\MountManager;
use Illuminate\Filesystem\Filesystem;
+use Illuminate\Support\Arr;
use Illuminate\Support\ServiceProvider;
-use League\Flysystem\Filesystem as Flysystem;
use League\Flysystem\Adapter\Local as LocalAdapter;
+use League\Flysystem\Filesystem as Flysystem;
+use League\Flysystem\MountManager;
class VendorPublishCommand extends Command
{
@@ -157,8 +157,16 @@ class VendorPublishCommand extends Command
*/
protected function publishTag($tag)
{
+ $published = false;
+
foreach ($this->pathsToPublish($tag) as $from => $to) {
$this->publishItem($from, $to);
+
+ $published = true;
+ }
+
+ if ($published === false) {
+ $this->error('Unable to locate publishable resources.');
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ViewClearCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ViewClearCommand.php
index 251e3937c..449ebe4b2 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ViewClearCommand.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ViewClearCommand.php
@@ -2,9 +2,9 @@
namespace Illuminate\Foundation\Console;
-use RuntimeException;
use Illuminate\Console\Command;
use Illuminate\Filesystem\Filesystem;
+use RuntimeException;
class ViewClearCommand extends Command
{
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/cast.stub b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/cast.stub
new file mode 100644
index 000000000..26bfd985e
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/cast.stub
@@ -0,0 +1,36 @@
+setRoutes(
- unserialize(base64_decode('{{routes}}'))
+app('router')->setCompiledRoutes(
+ {{routes}}
);
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/rule.stub b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/rule.stub
index 826af0d6c..b5b924c0c 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/rule.stub
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/rule.stub
@@ -1,10 +1,10 @@
assertTrue(true);
+ }
+}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/unit-test.stub b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/unit-test.stub
deleted file mode 100644
index 00deed881..000000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/unit-test.stub
+++ /dev/null
@@ -1,20 +0,0 @@
-assertTrue(true);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/view-component.stub b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/view-component.stub
new file mode 100644
index 000000000..20cdaa2a8
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/view-component.stub
@@ -0,0 +1,28 @@
+isInstantiable()) {
continue;
@@ -53,7 +59,7 @@ class DiscoverEvents
}
$listenerEvents[$listener->name.'@'.$method->name] =
- optional($method->getParameters()[0]->getClass())->name;
+ Reflector::getParameterClassName($method->getParameters()[0]);
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Events/Dispatchable.php b/vendor/laravel/framework/src/Illuminate/Foundation/Events/Dispatchable.php
index 0018295b6..c2acd7759 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Events/Dispatchable.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Events/Dispatchable.php
@@ -14,6 +14,32 @@ trait Dispatchable
return event(new static(...func_get_args()));
}
+ /**
+ * Dispatch the event with the given arguments if the given truth test passes.
+ *
+ * @param bool $boolean
+ * @return void
+ */
+ public static function dispatchIf($boolean, ...$arguments)
+ {
+ if ($boolean) {
+ return event(new static(...$arguments));
+ }
+ }
+
+ /**
+ * Dispatch the event with the given arguments unless the given truth test passes.
+ *
+ * @param bool $boolean
+ * @return void
+ */
+ public static function dispatchUnless($boolean, ...$arguments)
+ {
+ if (! $boolean) {
+ return event(new static(...$arguments));
+ }
+ }
+
/**
* Broadcast the event with the given arguments.
*
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php b/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php
index 59221deb0..923e6c6d1 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php
@@ -3,38 +3,38 @@
namespace Illuminate\Foundation\Exceptions;
use Exception;
-use Throwable;
-use Whoops\Run as Whoops;
-use Illuminate\Support\Arr;
-use Psr\Log\LoggerInterface;
+use Illuminate\Auth\Access\AuthorizationException;
+use Illuminate\Auth\AuthenticationException;
+use Illuminate\Contracts\Container\BindingResolutionException;
+use Illuminate\Contracts\Container\Container;
+use Illuminate\Contracts\Debug\ExceptionHandler as ExceptionHandlerContract;
+use Illuminate\Contracts\Support\Responsable;
+use Illuminate\Database\Eloquent\ModelNotFoundException;
+use Illuminate\Http\Exceptions\HttpResponseException;
+use Illuminate\Http\JsonResponse;
+use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Response;
use Illuminate\Routing\Router;
-use Illuminate\Http\JsonResponse;
+use Illuminate\Session\TokenMismatchException;
+use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\View;
+use Illuminate\Support\Reflector;
use Illuminate\Support\ViewErrorBag;
-use Whoops\Handler\HandlerInterface;
-use Illuminate\Http\RedirectResponse;
-use Illuminate\Auth\AuthenticationException;
-use Illuminate\Contracts\Container\Container;
-use Illuminate\Contracts\Support\Responsable;
-use Illuminate\Session\TokenMismatchException;
use Illuminate\Validation\ValidationException;
-use Illuminate\Auth\Access\AuthorizationException;
-use Illuminate\Http\Exceptions\HttpResponseException;
-use Symfony\Component\Debug\Exception\FlattenException;
-use Illuminate\Database\Eloquent\ModelNotFoundException;
-use Symfony\Component\HttpKernel\Exception\HttpException;
-use Illuminate\Contracts\Container\BindingResolutionException;
+use Psr\Log\LoggerInterface;
use Symfony\Component\Console\Application as ConsoleApplication;
-use Symfony\Component\HttpFoundation\Response as SymfonyResponse;
-use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
-use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
-use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
-use Symfony\Component\Debug\ExceptionHandler as SymfonyExceptionHandler;
-use Illuminate\Contracts\Debug\ExceptionHandler as ExceptionHandlerContract;
+use Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer;
use Symfony\Component\HttpFoundation\Exception\SuspiciousOperationException;
use Symfony\Component\HttpFoundation\RedirectResponse as SymfonyRedirectResponse;
+use Symfony\Component\HttpFoundation\Response as SymfonyResponse;
+use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
+use Symfony\Component\HttpKernel\Exception\HttpException;
+use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
+use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
+use Throwable;
+use Whoops\Handler\HandlerInterface;
+use Whoops\Run as Whoops;
class Handler implements ExceptionHandlerContract
{
@@ -92,19 +92,21 @@ class Handler implements ExceptionHandlerContract
/**
* Report or log an exception.
*
- * @param \Exception $e
- * @return mixed
+ * @param \Throwable $e
+ * @return void
*
- * @throws \Exception
+ * @throws \Throwable
*/
- public function report(Exception $e)
+ public function report(Throwable $e)
{
if ($this->shouldntReport($e)) {
return;
}
- if (is_callable($reportCallable = [$e, 'report'])) {
- return $this->container->call($reportCallable);
+ if (Reflector::isCallable($reportCallable = [$e, 'report'])) {
+ $this->container->call($reportCallable);
+
+ return;
}
try {
@@ -115,17 +117,21 @@ class Handler implements ExceptionHandlerContract
$logger->error(
$e->getMessage(),
- array_merge($this->context(), ['exception' => $e]
- ));
+ array_merge(
+ $this->exceptionContext($e),
+ $this->context(),
+ ['exception' => $e]
+ )
+ );
}
/**
* Determine if the exception should be reported.
*
- * @param \Exception $e
+ * @param \Throwable $e
* @return bool
*/
- public function shouldReport(Exception $e)
+ public function shouldReport(Throwable $e)
{
return ! $this->shouldntReport($e);
}
@@ -133,10 +139,10 @@ class Handler implements ExceptionHandlerContract
/**
* Determine if the exception is in the "do not report" list.
*
- * @param \Exception $e
+ * @param \Throwable $e
* @return bool
*/
- protected function shouldntReport(Exception $e)
+ protected function shouldntReport(Throwable $e)
{
$dontReport = array_merge($this->dontReport, $this->internalDontReport);
@@ -145,6 +151,17 @@ class Handler implements ExceptionHandlerContract
}));
}
+ /**
+ * Get the default exception context variables for logging.
+ *
+ * @param \Throwable $e
+ * @return array
+ */
+ protected function exceptionContext(Throwable $e)
+ {
+ return [];
+ }
+
/**
* Get the default context variables for logging.
*
@@ -163,13 +180,15 @@ class Handler implements ExceptionHandlerContract
}
/**
- * Render an exception into a response.
+ * Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
- * @param \Exception $e
- * @return \Illuminate\Http\Response|\Symfony\Component\HttpFoundation\Response
+ * @param \Throwable $e
+ * @return \Symfony\Component\HttpFoundation\Response
+ *
+ * @throws \Throwable
*/
- public function render($request, Exception $e)
+ public function render($request, Throwable $e)
{
if (method_exists($e, 'render') && $response = $e->render($request)) {
return Router::toResponse($request, $response);
@@ -188,17 +207,17 @@ class Handler implements ExceptionHandlerContract
}
return $request->expectsJson()
- ? $this->prepareJsonResponse($request, $e)
- : $this->prepareResponse($request, $e);
+ ? $this->prepareJsonResponse($request, $e)
+ : $this->prepareResponse($request, $e);
}
/**
* Prepare exception for rendering.
*
- * @param \Exception $e
- * @return \Exception
+ * @param \Throwable $e
+ * @return \Throwable
*/
- protected function prepareException(Exception $e)
+ protected function prepareException(Throwable $e)
{
if ($e instanceof ModelNotFoundException) {
$e = new NotFoundHttpException($e->getMessage(), $e);
@@ -278,10 +297,10 @@ class Handler implements ExceptionHandlerContract
* Prepare a response for the given exception.
*
* @param \Illuminate\Http\Request $request
- * @param \Exception $e
+ * @param \Throwable $e
* @return \Symfony\Component\HttpFoundation\Response
*/
- protected function prepareResponse($request, Exception $e)
+ protected function prepareResponse($request, Throwable $e)
{
if (! $this->isHttpException($e) && config('app.debug')) {
return $this->toIlluminateResponse($this->convertExceptionToResponse($e), $e);
@@ -299,12 +318,12 @@ class Handler implements ExceptionHandlerContract
/**
* Create a Symfony response for the given exception.
*
- * @param \Exception $e
+ * @param \Throwable $e
* @return \Symfony\Component\HttpFoundation\Response
*/
- protected function convertExceptionToResponse(Exception $e)
+ protected function convertExceptionToResponse(Throwable $e)
{
- return SymfonyResponse::create(
+ return new SymfonyResponse(
$this->renderExceptionContent($e),
$this->isHttpException($e) ? $e->getStatusCode() : 500,
$this->isHttpException($e) ? $e->getHeaders() : []
@@ -314,10 +333,10 @@ class Handler implements ExceptionHandlerContract
/**
* Get the response content for the given exception.
*
- * @param \Exception $e
+ * @param \Throwable $e
* @return string
*/
- protected function renderExceptionContent(Exception $e)
+ protected function renderExceptionContent(Throwable $e)
{
try {
return config('app.debug') && class_exists(Whoops::class)
@@ -331,13 +350,13 @@ class Handler implements ExceptionHandlerContract
/**
* Render an exception to a string using "Whoops".
*
- * @param \Exception $e
+ * @param \Throwable $e
* @return string
*/
- protected function renderExceptionWithWhoops(Exception $e)
+ protected function renderExceptionWithWhoops(Throwable $e)
{
return tap(new Whoops, function ($whoops) {
- $whoops->pushHandler($this->whoopsHandler());
+ $whoops->appendHandler($this->whoopsHandler());
$whoops->writeToOutput(false);
@@ -362,15 +381,15 @@ class Handler implements ExceptionHandlerContract
/**
* Render an exception to a string using Symfony.
*
- * @param \Exception $e
+ * @param \Throwable $e
* @param bool $debug
* @return string
*/
- protected function renderExceptionWithSymfony(Exception $e, $debug)
+ protected function renderExceptionWithSymfony(Throwable $e, $debug)
{
- return (new SymfonyExceptionHandler($debug))->getHtml(
- FlattenException::create($e)
- );
+ $renderer = new HtmlErrorRenderer($debug);
+
+ return $renderer->render($e)->getAsString();
}
/**
@@ -383,7 +402,7 @@ class Handler implements ExceptionHandlerContract
{
$this->registerErrorViewPaths();
- if (view()->exists($view = "errors::{$e->getStatusCode()}")) {
+ if (view()->exists($view = $this->getHttpExceptionView($e))) {
return response()->view($view, [
'errors' => new ViewErrorBag,
'exception' => $e,
@@ -407,14 +426,25 @@ class Handler implements ExceptionHandlerContract
})->push(__DIR__.'/views')->all());
}
+ /**
+ * Get the view used to render HTTP exceptions.
+ *
+ * @param \Symfony\Component\HttpKernel\Exception\HttpExceptionInterface $e
+ * @return string
+ */
+ protected function getHttpExceptionView(HttpExceptionInterface $e)
+ {
+ return "errors::{$e->getStatusCode()}";
+ }
+
/**
* Map the given exception into an Illuminate response.
*
* @param \Symfony\Component\HttpFoundation\Response $response
- * @param \Exception $e
+ * @param \Throwable $e
* @return \Illuminate\Http\Response
*/
- protected function toIlluminateResponse($response, Exception $e)
+ protected function toIlluminateResponse($response, Throwable $e)
{
if ($response instanceof SymfonyRedirectResponse) {
$response = new RedirectResponse(
@@ -433,10 +463,10 @@ class Handler implements ExceptionHandlerContract
* Prepare a JSON response for the given exception.
*
* @param \Illuminate\Http\Request $request
- * @param \Exception $e
+ * @param \Throwable $e
* @return \Illuminate\Http\JsonResponse
*/
- protected function prepareJsonResponse($request, Exception $e)
+ protected function prepareJsonResponse($request, Throwable $e)
{
return new JsonResponse(
$this->convertExceptionToArray($e),
@@ -449,10 +479,10 @@ class Handler implements ExceptionHandlerContract
/**
* Convert the given exception to an array.
*
- * @param \Exception $e
+ * @param \Throwable $e
* @return array
*/
- protected function convertExceptionToArray(Exception $e)
+ protected function convertExceptionToArray(Throwable $e)
{
return config('app.debug') ? [
'message' => $e->getMessage(),
@@ -471,21 +501,21 @@ class Handler implements ExceptionHandlerContract
* Render an exception to the console.
*
* @param \Symfony\Component\Console\Output\OutputInterface $output
- * @param \Exception $e
+ * @param \Throwable $e
* @return void
*/
- public function renderForConsole($output, Exception $e)
+ public function renderForConsole($output, Throwable $e)
{
- (new ConsoleApplication)->renderException($e, $output);
+ (new ConsoleApplication)->renderThrowable($e, $output);
}
/**
* Determine if the given exception is an HTTP exception.
*
- * @param \Exception $e
+ * @param \Throwable $e
* @return bool
*/
- protected function isHttpException(Exception $e)
+ protected function isHttpException(Throwable $e)
{
return $e instanceof HttpExceptionInterface;
}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/WhoopsHandler.php b/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/WhoopsHandler.php
index b94a7acce..c91d1ac7b 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/WhoopsHandler.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/WhoopsHandler.php
@@ -2,8 +2,8 @@
namespace Illuminate\Foundation\Exceptions;
-use Illuminate\Support\Arr;
use Illuminate\Filesystem\Filesystem;
+use Illuminate\Support\Arr;
use Whoops\Handler\PrettyPageHandler;
class WhoopsHandler
@@ -27,7 +27,7 @@ class WhoopsHandler
/**
* Register the application paths with the handler.
*
- * @param \Whoops\Handler\PrettyPageHandler $handler
+ * @param \Whoops\Handler\PrettyPageHandler $handler
* @return $this
*/
protected function registerApplicationPaths($handler)
@@ -55,12 +55,12 @@ class WhoopsHandler
/**
* Register the blacklist with the handler.
*
- * @param \Whoops\Handler\PrettyPageHandler $handler
+ * @param \Whoops\Handler\PrettyPageHandler $handler
* @return $this
*/
protected function registerBlacklist($handler)
{
- foreach (config('app.debug_blacklist', []) as $key => $secrets) {
+ foreach (config('app.debug_blacklist', config('app.debug_hide', [])) as $key => $secrets) {
foreach ($secrets as $secret) {
$handler->blacklist($key, $secret);
}
@@ -72,7 +72,7 @@ class WhoopsHandler
/**
* Register the editor with the handler.
*
- * @param \Whoops\Handler\PrettyPageHandler $handler
+ * @param \Whoops\Handler\PrettyPageHandler $handler
* @return $this
*/
protected function registerEditor($handler)
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Http/Exceptions/MaintenanceModeException.php b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Exceptions/MaintenanceModeException.php
index 45c76b220..9fe9ffd68 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Http/Exceptions/MaintenanceModeException.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Exceptions/MaintenanceModeException.php
@@ -2,10 +2,10 @@
namespace Illuminate\Foundation\Http\Exceptions;
-use Exception;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Date;
use Symfony\Component\HttpKernel\Exception\ServiceUnavailableHttpException;
+use Throwable;
class MaintenanceModeException extends ServiceUnavailableHttpException
{
@@ -36,11 +36,11 @@ class MaintenanceModeException extends ServiceUnavailableHttpException
* @param int $time
* @param int|null $retryAfter
* @param string|null $message
- * @param \Exception|null $previous
+ * @param \Throwable|null $previous
* @param int $code
* @return void
*/
- public function __construct($time, $retryAfter = null, $message = null, Exception $previous = null, $code = 0)
+ public function __construct($time, $retryAfter = null, $message = null, Throwable $previous = null, $code = 0)
{
parent::__construct($retryAfter, $message, $previous, $code);
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Http/FormRequest.php b/vendor/laravel/framework/src/Illuminate/Foundation/Http/FormRequest.php
index a67b2c3c5..96169f3ce 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Http/FormRequest.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Http/FormRequest.php
@@ -2,15 +2,15 @@
namespace Illuminate\Foundation\Http;
+use Illuminate\Auth\Access\AuthorizationException;
+use Illuminate\Contracts\Container\Container;
+use Illuminate\Contracts\Validation\Factory as ValidationFactory;
+use Illuminate\Contracts\Validation\ValidatesWhenResolved;
+use Illuminate\Contracts\Validation\Validator;
use Illuminate\Http\Request;
use Illuminate\Routing\Redirector;
-use Illuminate\Contracts\Container\Container;
-use Illuminate\Contracts\Validation\Validator;
-use Illuminate\Validation\ValidationException;
-use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Validation\ValidatesWhenResolvedTrait;
-use Illuminate\Contracts\Validation\ValidatesWhenResolved;
-use Illuminate\Contracts\Validation\Factory as ValidationFactory;
+use Illuminate\Validation\ValidationException;
class FormRequest extends Request implements ValidatesWhenResolved
{
@@ -112,7 +112,7 @@ class FormRequest extends Request implements ValidatesWhenResolved
*
* @return array
*/
- protected function validationData()
+ public function validationData()
{
return $this->all();
}
@@ -175,7 +175,7 @@ class FormRequest extends Request implements ValidatesWhenResolved
*/
protected function failedAuthorization()
{
- throw new AuthorizationException('This action is unauthorized.');
+ throw new AuthorizationException;
}
/**
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php
index 022dd8eec..38f2fd6c0 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php
@@ -2,15 +2,15 @@
namespace Illuminate\Foundation\Http;
-use Exception;
-use Throwable;
-use Illuminate\Routing\Router;
-use Illuminate\Routing\Pipeline;
-use Illuminate\Support\Facades\Facade;
use Illuminate\Contracts\Debug\ExceptionHandler;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Contracts\Http\Kernel as KernelContract;
-use Symfony\Component\Debug\Exception\FatalThrowableError;
+use Illuminate\Foundation\Http\Events\RequestHandled;
+use Illuminate\Routing\Pipeline;
+use Illuminate\Routing\Router;
+use Illuminate\Support\Facades\Facade;
+use InvalidArgumentException;
+use Throwable;
class Kernel implements KernelContract
{
@@ -73,7 +73,8 @@ class Kernel implements KernelContract
protected $middlewarePriority = [
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
- \Illuminate\Auth\Middleware\Authenticate::class,
+ \Illuminate\Contracts\Auth\Middleware\AuthenticatesRequests::class,
+ \Illuminate\Routing\Middleware\ThrottleRequests::class,
\Illuminate\Session\Middleware\AuthenticateSession::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
\Illuminate\Auth\Middleware\Authorize::class,
@@ -91,15 +92,7 @@ class Kernel implements KernelContract
$this->app = $app;
$this->router = $router;
- $router->middlewarePriority = $this->middlewarePriority;
-
- foreach ($this->middlewareGroups as $key => $middleware) {
- $router->middlewareGroup($key, $middleware);
- }
-
- foreach ($this->routeMiddleware as $key => $middleware) {
- $router->aliasMiddleware($key, $middleware);
- }
+ $this->syncMiddlewareToRouter();
}
/**
@@ -114,18 +107,14 @@ class Kernel implements KernelContract
$request->enableHttpMethodParameterOverride();
$response = $this->sendRequestThroughRouter($request);
- } catch (Exception $e) {
- $this->reportException($e);
-
- $response = $this->renderException($request, $e);
} catch (Throwable $e) {
- $this->reportException($e = new FatalThrowableError($e));
+ $this->reportException($e);
$response = $this->renderException($request, $e);
}
$this->app['events']->dispatch(
- new Events\RequestHandled($request, $response)
+ new RequestHandled($request, $response)
);
return $response;
@@ -293,6 +282,106 @@ class Kernel implements KernelContract
return $this;
}
+ /**
+ * Prepend the given middleware to the given middleware group.
+ *
+ * @param string $group
+ * @param string $middleware
+ * @return $this
+ *
+ * @throws \InvalidArgumentException
+ */
+ public function prependMiddlewareToGroup($group, $middleware)
+ {
+ if (! isset($this->middlewareGroups[$group])) {
+ throw new InvalidArgumentException("The [{$group}] middleware group has not been defined.");
+ }
+
+ if (array_search($middleware, $this->middlewareGroups[$group]) === false) {
+ array_unshift($this->middlewareGroups[$group], $middleware);
+ }
+
+ $this->syncMiddlewareToRouter();
+
+ return $this;
+ }
+
+ /**
+ * Append the given middleware to the given middleware group.
+ *
+ * @param string $group
+ * @param string $middleware
+ * @return $this
+ *
+ * @throws \InvalidArgumentException
+ */
+ public function appendMiddlewareToGroup($group, $middleware)
+ {
+ if (! isset($this->middlewareGroups[$group])) {
+ throw new InvalidArgumentException("The [{$group}] middleware group has not been defined.");
+ }
+
+ if (array_search($middleware, $this->middlewareGroups[$group]) === false) {
+ $this->middlewareGroups[$group][] = $middleware;
+ }
+
+ $this->syncMiddlewareToRouter();
+
+ return $this;
+ }
+
+ /**
+ * Prepend the given middleware to the middleware priority list.
+ *
+ * @param string $middleware
+ * @return $this
+ */
+ public function prependToMiddlewarePriority($middleware)
+ {
+ if (! in_array($middleware, $this->middlewarePriority)) {
+ array_unshift($this->middlewarePriority, $middleware);
+ }
+
+ $this->syncMiddlewareToRouter();
+
+ return $this;
+ }
+
+ /**
+ * Append the given middleware to the middleware priority list.
+ *
+ * @param string $middleware
+ * @return $this
+ */
+ public function appendToMiddlewarePriority($middleware)
+ {
+ if (! in_array($middleware, $this->middlewarePriority)) {
+ $this->middlewarePriority[] = $middleware;
+ }
+
+ $this->syncMiddlewareToRouter();
+
+ return $this;
+ }
+
+ /**
+ * Sync the current state of the middleware to the router.
+ *
+ * @return void
+ */
+ protected function syncMiddlewareToRouter()
+ {
+ $this->router->middlewarePriority = $this->middlewarePriority;
+
+ foreach ($this->middlewareGroups as $key => $middleware) {
+ $this->router->middlewareGroup($key, $middleware);
+ }
+
+ foreach ($this->routeMiddleware as $key => $middleware) {
+ $this->router->aliasMiddleware($key, $middleware);
+ }
+ }
+
/**
* Get the bootstrap classes for the application.
*
@@ -306,10 +395,10 @@ class Kernel implements KernelContract
/**
* Report the exception to the exception handler.
*
- * @param \Exception $e
+ * @param \Throwable $e
* @return void
*/
- protected function reportException(Exception $e)
+ protected function reportException(Throwable $e)
{
$this->app[ExceptionHandler::class]->report($e);
}
@@ -318,10 +407,10 @@ class Kernel implements KernelContract
* Render the exception to a response.
*
* @param \Illuminate\Http\Request $request
- * @param \Exception $e
+ * @param \Throwable $e
* @return \Symfony\Component\HttpFoundation\Response
*/
- protected function renderException($request, Exception $e)
+ protected function renderException($request, Throwable $e)
{
return $this->app[ExceptionHandler::class]->render($request, $e);
}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php
index 037e5a474..5a34d1860 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php
@@ -3,9 +3,9 @@
namespace Illuminate\Foundation\Http\Middleware;
use Closure;
-use Symfony\Component\HttpFoundation\IpUtils;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Foundation\Http\Exceptions\MaintenanceModeException;
+use Symfony\Component\HttpFoundation\IpUtils;
class CheckForMaintenanceMode
{
@@ -42,6 +42,7 @@ class CheckForMaintenanceMode
* @return mixed
*
* @throws \Symfony\Component\HttpKernel\Exception\HttpException
+ * @throws \Illuminate\Foundation\Http\Exceptions\MaintenanceModeException
*/
public function handle($request, Closure $next)
{
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php
index beb7946e6..59483200e 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php
@@ -3,12 +3,15 @@
namespace Illuminate\Foundation\Http\Middleware;
use Closure;
+use Illuminate\Contracts\Encryption\DecryptException;
+use Illuminate\Contracts\Encryption\Encrypter;
+use Illuminate\Contracts\Foundation\Application;
+use Illuminate\Contracts\Support\Responsable;
+use Illuminate\Cookie\CookieValuePrefix;
+use Illuminate\Cookie\Middleware\EncryptCookies;
+use Illuminate\Session\TokenMismatchException;
use Illuminate\Support\InteractsWithTime;
use Symfony\Component\HttpFoundation\Cookie;
-use Illuminate\Contracts\Encryption\Encrypter;
-use Illuminate\Session\TokenMismatchException;
-use Illuminate\Contracts\Foundation\Application;
-use Illuminate\Cookie\Middleware\EncryptCookies;
class VerifyCsrfToken
{
@@ -150,7 +153,11 @@ class VerifyCsrfToken
$token = $request->input('_token') ?: $request->header('X-CSRF-TOKEN');
if (! $token && $header = $request->header('X-XSRF-TOKEN')) {
- $token = $this->encrypter->decrypt($header, static::serialized());
+ try {
+ $token = CookieValuePrefix::remove($this->encrypter->decrypt($header, static::serialized()));
+ } catch (DecryptException $e) {
+ $token = '';
+ }
}
return $token;
@@ -177,6 +184,10 @@ class VerifyCsrfToken
{
$config = config('session');
+ if ($response instanceof Responsable) {
+ $response = $response->toResponse($request);
+ }
+
$response->headers->setCookie(
new Cookie(
'XSRF-TOKEN', $request->session()->token(), $this->availableAt(60 * $config['lifetime']),
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Inspiring.php b/vendor/laravel/framework/src/Illuminate/Foundation/Inspiring.php
index 61258cb4a..6023f5635 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Inspiring.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Inspiring.php
@@ -20,19 +20,31 @@ class Inspiring
public static function quote()
{
return Collection::make([
- 'When there is no desire, all things are at peace. - Laozi',
- 'Simplicity is the ultimate sophistication. - Leonardo da Vinci',
- 'Simplicity is the essence of happiness. - Cedric Bledsoe',
- 'Smile, breathe, and go slowly. - Thich Nhat Hanh',
- 'Simplicity is an acquired taste. - Katharine Gerould',
- 'Well begun is half done. - Aristotle',
- 'He who is contented is rich. - Laozi',
- 'Very little is needed to make a happy life. - Marcus Antoninus',
- 'It is quality rather than quantity that matters. - Lucius Annaeus Seneca',
- 'Genius is one percent inspiration and ninety-nine percent perspiration. - Thomas Edison',
- 'Computer science is no more about computers than astronomy is about telescopes. - Edsger Dijkstra',
- 'It always seems impossible until it is done. - Nelson Mandela',
'Act only according to that maxim whereby you can, at the same time, will that it should become a universal law. - Immanuel Kant',
+ 'An unexamined life is not worth living. - Socrates',
+ 'Be present above all else. - Naval Ravikant',
+ 'Happiness is not something readymade. It comes from your own actions. - Dalai Lama',
+ 'He who is contented is rich. - Laozi',
+ 'I begin to speak only when I am certain what I will say is not better left unsaid - Cato the Younger',
+ 'If you do not have a consistent goal in life, you can not live it in a consistent way. - Marcus Aurelius',
+ 'It is not the man who has too little, but the man who craves more, that is poor. - Seneca',
+ 'It is quality rather than quantity that matters. - Lucius Annaeus Seneca',
+ 'Knowing is not enough; we must apply. Being willing is not enough; we must do. - Leonardo da Vinci',
+ 'Let all your things have their places; let each part of your business have its time. - Benjamin Franklin',
+ 'No surplus words or unnecessary actions. - Marcus Aurelius',
+ 'Order your soul. Reduce your wants. - Augustine',
+ 'People find pleasure in different ways. I find it in keeping my mind clear. - Marcus Aurelius',
+ 'Simplicity is an acquired taste. - Katharine Gerould',
+ 'Simplicity is the consequence of refined emotions. - Jean D\'Alembert',
+ 'Simplicity is the essence of happiness. - Cedric Bledsoe',
+ 'Simplicity is the ultimate sophistication. - Leonardo da Vinci',
+ 'Smile, breathe, and go slowly. - Thich Nhat Hanh',
+ 'The only way to do great work is to love what you do. - Steve Jobs',
+ 'The whole future lies in uncertainty: live immediately. - Seneca',
+ 'Very little is needed to make a happy life. - Marcus Antoninus',
+ 'Waste no more time arguing what a good man should be, be one. - Marcus Aurelius',
+ 'Well begun is half done. - Aristotle',
+ 'When there is no desire, all things are at peace. - Laozi',
])->random();
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Mix.php b/vendor/laravel/framework/src/Illuminate/Foundation/Mix.php
index ec1517825..271d7dbd6 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Mix.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Mix.php
@@ -3,8 +3,8 @@
namespace Illuminate\Foundation;
use Exception;
-use Illuminate\Support\Str;
use Illuminate\Support\HtmlString;
+use Illuminate\Support\Str;
class Mix
{
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/PackageManifest.php b/vendor/laravel/framework/src/Illuminate/Foundation/PackageManifest.php
index 35079fdd6..9356cef02 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/PackageManifest.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/PackageManifest.php
@@ -65,9 +65,7 @@ class PackageManifest
*/
public function providers()
{
- return collect($this->getManifest())->flatMap(function ($configuration) {
- return (array) ($configuration['providers'] ?? []);
- })->filter()->all();
+ return $this->config('providers');
}
/**
@@ -77,8 +75,19 @@ class PackageManifest
*/
public function aliases()
{
- return collect($this->getManifest())->flatMap(function ($configuration) {
- return (array) ($configuration['aliases'] ?? []);
+ return $this->config('aliases');
+ }
+
+ /**
+ * Get all of the values for all packages for the given configuration name.
+ *
+ * @param string $key
+ * @return array
+ */
+ public function config($key)
+ {
+ return collect($this->getManifest())->flatMap(function ($configuration) use ($key) {
+ return (array) ($configuration[$key] ?? []);
})->filter()->all();
}
@@ -97,8 +106,6 @@ class PackageManifest
$this->build();
}
- $this->files->get($this->manifestPath);
-
return $this->manifest = file_exists($this->manifestPath) ?
$this->files->getRequire($this->manifestPath) : [];
}
@@ -166,8 +173,8 @@ class PackageManifest
*/
protected function write(array $manifest)
{
- if (! is_writable(dirname($this->manifestPath))) {
- throw new Exception('The '.dirname($this->manifestPath).' directory must be present and writable.');
+ if (! is_writable($dirname = dirname($this->manifestPath))) {
+ throw new Exception("The {$dirname} directory must be present and writable.");
}
$this->files->replace(
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php b/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php
index 903908f3d..b0044ae50 100755
--- a/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php
@@ -3,8 +3,8 @@
namespace Illuminate\Foundation;
use Exception;
-use Illuminate\Filesystem\Filesystem;
use Illuminate\Contracts\Foundation\Application as ApplicationContract;
+use Illuminate\Filesystem\Filesystem;
class ProviderRepository
{
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php
index 110d5e89a..c76251739 100755
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php
@@ -2,79 +2,72 @@
namespace Illuminate\Foundation\Providers;
-use Illuminate\Support\ServiceProvider;
-use Illuminate\Queue\Console\TableCommand;
-use Illuminate\Auth\Console\AuthMakeCommand;
-use Illuminate\Foundation\Console\UpCommand;
-use Illuminate\Foundation\Console\DownCommand;
use Illuminate\Auth\Console\ClearResetsCommand;
use Illuminate\Cache\Console\CacheTableCommand;
-use Illuminate\Foundation\Console\ServeCommand;
-use Illuminate\Foundation\Console\PresetCommand;
-use Illuminate\Queue\Console\FailedTableCommand;
-use Illuminate\Foundation\Console\AppNameCommand;
-use Illuminate\Foundation\Console\JobMakeCommand;
-use Illuminate\Database\Console\Seeds\SeedCommand;
-use Illuminate\Foundation\Console\MailMakeCommand;
-use Illuminate\Foundation\Console\OptimizeCommand;
-use Illuminate\Foundation\Console\RuleMakeCommand;
-use Illuminate\Foundation\Console\TestMakeCommand;
-use Illuminate\Foundation\Console\EventListCommand;
-use Illuminate\Foundation\Console\EventMakeCommand;
-use Illuminate\Foundation\Console\ModelMakeCommand;
-use Illuminate\Foundation\Console\RouteListCommand;
-use Illuminate\Foundation\Console\ViewCacheCommand;
-use Illuminate\Foundation\Console\ViewClearCommand;
-use Illuminate\Session\Console\SessionTableCommand;
-use Illuminate\Contracts\Support\DeferrableProvider;
-use Illuminate\Foundation\Console\EventCacheCommand;
-use Illuminate\Foundation\Console\EventClearCommand;
-use Illuminate\Foundation\Console\PolicyMakeCommand;
-use Illuminate\Foundation\Console\RouteCacheCommand;
-use Illuminate\Foundation\Console\RouteClearCommand;
+use Illuminate\Cache\Console\ClearCommand as CacheClearCommand;
+use Illuminate\Cache\Console\ForgetCommand as CacheForgetCommand;
+use Illuminate\Console\Scheduling\ScheduleFinishCommand;
use Illuminate\Console\Scheduling\ScheduleRunCommand;
+use Illuminate\Contracts\Support\DeferrableProvider;
+use Illuminate\Database\Console\Factories\FactoryMakeCommand;
+use Illuminate\Database\Console\Seeds\SeedCommand;
+use Illuminate\Database\Console\Seeds\SeederMakeCommand;
+use Illuminate\Database\Console\WipeCommand;
+use Illuminate\Foundation\Console\CastMakeCommand;
use Illuminate\Foundation\Console\ChannelMakeCommand;
+use Illuminate\Foundation\Console\ClearCompiledCommand;
+use Illuminate\Foundation\Console\ComponentMakeCommand;
use Illuminate\Foundation\Console\ConfigCacheCommand;
use Illuminate\Foundation\Console\ConfigClearCommand;
use Illuminate\Foundation\Console\ConsoleMakeCommand;
+use Illuminate\Foundation\Console\DownCommand;
use Illuminate\Foundation\Console\EnvironmentCommand;
-use Illuminate\Foundation\Console\KeyGenerateCommand;
-use Illuminate\Foundation\Console\RequestMakeCommand;
-use Illuminate\Foundation\Console\StorageLinkCommand;
-use Illuminate\Routing\Console\ControllerMakeCommand;
-use Illuminate\Routing\Console\MiddlewareMakeCommand;
-use Illuminate\Foundation\Console\ListenerMakeCommand;
-use Illuminate\Foundation\Console\ObserverMakeCommand;
-use Illuminate\Foundation\Console\ProviderMakeCommand;
-use Illuminate\Foundation\Console\ResourceMakeCommand;
-use Illuminate\Foundation\Console\ClearCompiledCommand;
+use Illuminate\Foundation\Console\EventCacheCommand;
+use Illuminate\Foundation\Console\EventClearCommand;
use Illuminate\Foundation\Console\EventGenerateCommand;
+use Illuminate\Foundation\Console\EventListCommand;
+use Illuminate\Foundation\Console\EventMakeCommand;
use Illuminate\Foundation\Console\ExceptionMakeCommand;
-use Illuminate\Foundation\Console\OptimizeClearCommand;
-use Illuminate\Foundation\Console\VendorPublishCommand;
-use Illuminate\Console\Scheduling\ScheduleFinishCommand;
-use Illuminate\Database\Console\Seeds\SeederMakeCommand;
-use Illuminate\Foundation\Console\PackageDiscoverCommand;
-use Illuminate\Database\Console\Migrations\MigrateCommand;
+use Illuminate\Foundation\Console\JobMakeCommand;
+use Illuminate\Foundation\Console\KeyGenerateCommand;
+use Illuminate\Foundation\Console\ListenerMakeCommand;
+use Illuminate\Foundation\Console\MailMakeCommand;
+use Illuminate\Foundation\Console\ModelMakeCommand;
use Illuminate\Foundation\Console\NotificationMakeCommand;
-use Illuminate\Database\Console\Factories\FactoryMakeCommand;
-use Illuminate\Queue\Console\WorkCommand as QueueWorkCommand;
-use Illuminate\Database\Console\Migrations\MigrateMakeCommand;
+use Illuminate\Foundation\Console\ObserverMakeCommand;
+use Illuminate\Foundation\Console\OptimizeClearCommand;
+use Illuminate\Foundation\Console\OptimizeCommand;
+use Illuminate\Foundation\Console\PackageDiscoverCommand;
+use Illuminate\Foundation\Console\PolicyMakeCommand;
+use Illuminate\Foundation\Console\ProviderMakeCommand;
+use Illuminate\Foundation\Console\RequestMakeCommand;
+use Illuminate\Foundation\Console\ResourceMakeCommand;
+use Illuminate\Foundation\Console\RouteCacheCommand;
+use Illuminate\Foundation\Console\RouteClearCommand;
+use Illuminate\Foundation\Console\RouteListCommand;
+use Illuminate\Foundation\Console\RuleMakeCommand;
+use Illuminate\Foundation\Console\ServeCommand;
+use Illuminate\Foundation\Console\StorageLinkCommand;
+use Illuminate\Foundation\Console\StubPublishCommand;
+use Illuminate\Foundation\Console\TestMakeCommand;
+use Illuminate\Foundation\Console\UpCommand;
+use Illuminate\Foundation\Console\VendorPublishCommand;
+use Illuminate\Foundation\Console\ViewCacheCommand;
+use Illuminate\Foundation\Console\ViewClearCommand;
use Illuminate\Notifications\Console\NotificationTableCommand;
-use Illuminate\Cache\Console\ClearCommand as CacheClearCommand;
-use Illuminate\Queue\Console\RetryCommand as QueueRetryCommand;
-use Illuminate\Cache\Console\ForgetCommand as CacheForgetCommand;
-use Illuminate\Queue\Console\ListenCommand as QueueListenCommand;
-use Illuminate\Queue\Console\RestartCommand as QueueRestartCommand;
-use Illuminate\Queue\Console\ListFailedCommand as ListFailedQueueCommand;
+use Illuminate\Queue\Console\FailedTableCommand;
use Illuminate\Queue\Console\FlushFailedCommand as FlushFailedQueueCommand;
use Illuminate\Queue\Console\ForgetFailedCommand as ForgetFailedQueueCommand;
-use Illuminate\Database\Console\Migrations\FreshCommand as MigrateFreshCommand;
-use Illuminate\Database\Console\Migrations\ResetCommand as MigrateResetCommand;
-use Illuminate\Database\Console\Migrations\StatusCommand as MigrateStatusCommand;
-use Illuminate\Database\Console\Migrations\InstallCommand as MigrateInstallCommand;
-use Illuminate\Database\Console\Migrations\RefreshCommand as MigrateRefreshCommand;
-use Illuminate\Database\Console\Migrations\RollbackCommand as MigrateRollbackCommand;
+use Illuminate\Queue\Console\ListenCommand as QueueListenCommand;
+use Illuminate\Queue\Console\ListFailedCommand as ListFailedQueueCommand;
+use Illuminate\Queue\Console\RestartCommand as QueueRestartCommand;
+use Illuminate\Queue\Console\RetryCommand as QueueRetryCommand;
+use Illuminate\Queue\Console\TableCommand;
+use Illuminate\Queue\Console\WorkCommand as QueueWorkCommand;
+use Illuminate\Routing\Console\ControllerMakeCommand;
+use Illuminate\Routing\Console\MiddlewareMakeCommand;
+use Illuminate\Session\Console\SessionTableCommand;
+use Illuminate\Support\ServiceProvider;
class ArtisanServiceProvider extends ServiceProvider implements DeferrableProvider
{
@@ -90,23 +83,16 @@ class ArtisanServiceProvider extends ServiceProvider implements DeferrableProvid
'ClearResets' => 'command.auth.resets.clear',
'ConfigCache' => 'command.config.cache',
'ConfigClear' => 'command.config.clear',
+ 'DbWipe' => 'command.db.wipe',
'Down' => 'command.down',
'Environment' => 'command.environment',
'EventCache' => 'command.event.cache',
'EventClear' => 'command.event.clear',
'EventList' => 'command.event.list',
'KeyGenerate' => 'command.key.generate',
- 'Migrate' => 'command.migrate',
- 'MigrateFresh' => 'command.migrate.fresh',
- 'MigrateInstall' => 'command.migrate.install',
- 'MigrateRefresh' => 'command.migrate.refresh',
- 'MigrateReset' => 'command.migrate.reset',
- 'MigrateRollback' => 'command.migrate.rollback',
- 'MigrateStatus' => 'command.migrate.status',
'Optimize' => 'command.optimize',
'OptimizeClear' => 'command.optimize.clear',
'PackageDiscover' => 'command.package.discover',
- 'Preset' => 'command.preset',
'QueueFailed' => 'command.queue.failed',
'QueueFlush' => 'command.queue.flush',
'QueueForget' => 'command.queue.forget',
@@ -132,10 +118,10 @@ class ArtisanServiceProvider extends ServiceProvider implements DeferrableProvid
* @var array
*/
protected $devCommands = [
- 'AppName' => 'command.app.name',
- 'AuthMake' => 'command.auth.make',
'CacheTable' => 'command.cache.table',
+ 'CastMake' => 'command.cast.make',
'ChannelMake' => 'command.channel.make',
+ 'ComponentMake' => 'command.component.make',
'ConsoleMake' => 'command.console.make',
'ControllerMake' => 'command.controller.make',
'EventGenerate' => 'command.event.generate',
@@ -146,7 +132,6 @@ class ArtisanServiceProvider extends ServiceProvider implements DeferrableProvid
'ListenerMake' => 'command.listener.make',
'MailMake' => 'command.mail.make',
'MiddlewareMake' => 'command.middleware.make',
- 'MigrateMake' => 'command.migrate.make',
'ModelMake' => 'command.model.make',
'NotificationMake' => 'command.notification.make',
'NotificationTable' => 'command.notification.table',
@@ -161,6 +146,7 @@ class ArtisanServiceProvider extends ServiceProvider implements DeferrableProvid
'SeederMake' => 'command.seeder.make',
'SessionTable' => 'command.session.table',
'Serve' => 'command.serve',
+ 'StubPublish' => 'command.stub.publish',
'TestMake' => 'command.test.make',
'VendorPublish' => 'command.vendor.publish',
];
@@ -186,36 +172,12 @@ class ArtisanServiceProvider extends ServiceProvider implements DeferrableProvid
protected function registerCommands(array $commands)
{
foreach (array_keys($commands) as $command) {
- call_user_func_array([$this, "register{$command}Command"], []);
+ $this->{"register{$command}Command"}();
}
$this->commands(array_values($commands));
}
- /**
- * Register the command.
- *
- * @return void
- */
- protected function registerAppNameCommand()
- {
- $this->app->singleton('command.app.name', function ($app) {
- return new AppNameCommand($app['composer'], $app['files']);
- });
- }
-
- /**
- * Register the command.
- *
- * @return void
- */
- protected function registerAuthMakeCommand()
- {
- $this->app->singleton('command.auth.make', function () {
- return new AuthMakeCommand;
- });
- }
-
/**
* Register the command.
*
@@ -252,6 +214,18 @@ class ArtisanServiceProvider extends ServiceProvider implements DeferrableProvid
});
}
+ /**
+ * Register the command.
+ *
+ * @return void
+ */
+ protected function registerCastMakeCommand()
+ {
+ $this->app->singleton('command.cast.make', function ($app) {
+ return new CastMakeCommand($app['files']);
+ });
+ }
+
/**
* Register the command.
*
@@ -288,6 +262,18 @@ class ArtisanServiceProvider extends ServiceProvider implements DeferrableProvid
});
}
+ /**
+ * Register the command.
+ *
+ * @return void
+ */
+ protected function registerComponentMakeCommand()
+ {
+ $this->app->singleton('command.component.make', function ($app) {
+ return new ComponentMakeCommand($app['files']);
+ });
+ }
+
/**
* Register the command.
*
@@ -336,6 +322,18 @@ class ArtisanServiceProvider extends ServiceProvider implements DeferrableProvid
});
}
+ /**
+ * Register the command.
+ *
+ * @return void
+ */
+ protected function registerDbWipeCommand()
+ {
+ $this->app->singleton('command.db.wipe', function () {
+ return new WipeCommand;
+ });
+ }
+
/**
* Register the command.
*
@@ -504,109 +502,6 @@ class ArtisanServiceProvider extends ServiceProvider implements DeferrableProvid
});
}
- /**
- * Register the command.
- *
- * @return void
- */
- protected function registerMigrateCommand()
- {
- $this->app->singleton('command.migrate', function ($app) {
- return new MigrateCommand($app['migrator']);
- });
- }
-
- /**
- * Register the command.
- *
- * @return void
- */
- protected function registerMigrateFreshCommand()
- {
- $this->app->singleton('command.migrate.fresh', function () {
- return new MigrateFreshCommand;
- });
- }
-
- /**
- * Register the command.
- *
- * @return void
- */
- protected function registerMigrateInstallCommand()
- {
- $this->app->singleton('command.migrate.install', function ($app) {
- return new MigrateInstallCommand($app['migration.repository']);
- });
- }
-
- /**
- * Register the command.
- *
- * @return void
- */
- protected function registerMigrateMakeCommand()
- {
- $this->app->singleton('command.migrate.make', function ($app) {
- // Once we have the migration creator registered, we will create the command
- // and inject the creator. The creator is responsible for the actual file
- // creation of the migrations, and may be extended by these developers.
- $creator = $app['migration.creator'];
-
- $composer = $app['composer'];
-
- return new MigrateMakeCommand($creator, $composer);
- });
- }
-
- /**
- * Register the command.
- *
- * @return void
- */
- protected function registerMigrateRefreshCommand()
- {
- $this->app->singleton('command.migrate.refresh', function () {
- return new MigrateRefreshCommand;
- });
- }
-
- /**
- * Register the command.
- *
- * @return void
- */
- protected function registerMigrateResetCommand()
- {
- $this->app->singleton('command.migrate.reset', function ($app) {
- return new MigrateResetCommand($app['migrator']);
- });
- }
-
- /**
- * Register the command.
- *
- * @return void
- */
- protected function registerMigrateRollbackCommand()
- {
- $this->app->singleton('command.migrate.rollback', function ($app) {
- return new MigrateRollbackCommand($app['migrator']);
- });
- }
-
- /**
- * Register the command.
- *
- * @return void
- */
- protected function registerMigrateStatusCommand()
- {
- $this->app->singleton('command.migrate.status', function ($app) {
- return new MigrateStatusCommand($app['migrator']);
- });
- }
-
/**
* Register the command.
*
@@ -703,18 +598,6 @@ class ArtisanServiceProvider extends ServiceProvider implements DeferrableProvid
});
}
- /**
- * Register the command.
- *
- * @return void
- */
- protected function registerPresetCommand()
- {
- $this->app->singleton('command.preset', function () {
- return new PresetCommand;
- });
- }
-
/**
* Register the command.
*
@@ -782,8 +665,8 @@ class ArtisanServiceProvider extends ServiceProvider implements DeferrableProvid
*/
protected function registerQueueRestartCommand()
{
- $this->app->singleton('command.queue.restart', function () {
- return new QueueRestartCommand;
+ $this->app->singleton('command.queue.restart', function ($app) {
+ return new QueueRestartCommand($app['cache.store']);
});
}
@@ -807,7 +690,7 @@ class ArtisanServiceProvider extends ServiceProvider implements DeferrableProvid
protected function registerQueueWorkCommand()
{
$this->app->singleton('command.queue.work', function ($app) {
- return new QueueWorkCommand($app['queue.worker']);
+ return new QueueWorkCommand($app['queue.worker'], $app['cache.store']);
});
}
@@ -987,6 +870,18 @@ class ArtisanServiceProvider extends ServiceProvider implements DeferrableProvid
});
}
+ /**
+ * Register the command.
+ *
+ * @return void
+ */
+ protected function registerStubPublishCommand()
+ {
+ $this->app->singleton('command.stub.publish', function () {
+ return new StubPublishCommand;
+ });
+ }
+
/**
* Register the command.
*
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Providers/ComposerServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Foundation/Providers/ComposerServiceProvider.php
index 6b05c256d..8fe428b0f 100755
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Providers/ComposerServiceProvider.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Providers/ComposerServiceProvider.php
@@ -2,9 +2,9 @@
namespace Illuminate\Foundation\Providers;
+use Illuminate\Contracts\Support\DeferrableProvider;
use Illuminate\Support\Composer;
use Illuminate\Support\ServiceProvider;
-use Illuminate\Contracts\Support\DeferrableProvider;
class ComposerServiceProvider extends ServiceProvider implements DeferrableProvider
{
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Providers/ConsoleSupportServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Foundation/Providers/ConsoleSupportServiceProvider.php
index f36083818..b23f18731 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Providers/ConsoleSupportServiceProvider.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Providers/ConsoleSupportServiceProvider.php
@@ -2,9 +2,9 @@
namespace Illuminate\Foundation\Providers;
-use Illuminate\Support\AggregateServiceProvider;
-use Illuminate\Database\MigrationServiceProvider;
use Illuminate\Contracts\Support\DeferrableProvider;
+use Illuminate\Database\MigrationServiceProvider;
+use Illuminate\Support\AggregateServiceProvider;
class ConsoleSupportServiceProvider extends AggregateServiceProvider implements DeferrableProvider
{
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Providers/FormRequestServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Foundation/Providers/FormRequestServiceProvider.php
index 7028d333c..d456ce0dd 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Providers/FormRequestServiceProvider.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Providers/FormRequestServiceProvider.php
@@ -2,10 +2,10 @@
namespace Illuminate\Foundation\Providers;
+use Illuminate\Contracts\Validation\ValidatesWhenResolved;
+use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Routing\Redirector;
use Illuminate\Support\ServiceProvider;
-use Illuminate\Foundation\Http\FormRequest;
-use Illuminate\Contracts\Validation\ValidatesWhenResolved;
class FormRequestServiceProvider extends ServiceProvider
{
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php
index fc0088542..b9d844965 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php
@@ -3,8 +3,9 @@
namespace Illuminate\Foundation\Providers;
use Illuminate\Http\Request;
-use Illuminate\Support\Facades\URL;
use Illuminate\Support\AggregateServiceProvider;
+use Illuminate\Support\Facades\URL;
+use Illuminate\Validation\ValidationException;
class FoundationServiceProvider extends AggregateServiceProvider
{
@@ -19,6 +20,8 @@ class FoundationServiceProvider extends AggregateServiceProvider
/**
* Boot the service provider.
+ *
+ * @return void
*/
public function boot()
{
@@ -46,12 +49,24 @@ class FoundationServiceProvider extends AggregateServiceProvider
* Register the "validate" macro on the request.
*
* @return void
+ *
+ * @throws \Illuminate\Validation\ValidationException
*/
public function registerRequestValidation()
{
Request::macro('validate', function (array $rules, ...$params) {
return validator()->validate($this->all(), $rules, ...$params);
});
+
+ Request::macro('validateWithBag', function (string $errorBag, array $rules, ...$params) {
+ try {
+ return $this->validate($rules, ...$params);
+ } catch (ValidationException $e) {
+ $e->errorBag = $errorBag;
+
+ throw $e;
+ }
+ });
}
/**
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Support/Providers/AuthServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Foundation/Support/Providers/AuthServiceProvider.php
index ac32319cf..7ccd2d4b3 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Support/Providers/AuthServiceProvider.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Support/Providers/AuthServiceProvider.php
@@ -21,7 +21,7 @@ class AuthServiceProvider extends ServiceProvider
*/
public function registerPolicies()
{
- foreach ($this->policies as $key => $value) {
+ foreach ($this->policies() as $key => $value) {
Gate::policy($key, $value);
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php
index f38eb045f..11e63a8d0 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php
@@ -2,9 +2,9 @@
namespace Illuminate\Foundation\Support\Providers;
+use Illuminate\Foundation\Events\DiscoverEvents;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\ServiceProvider;
-use Illuminate\Foundation\Events\DiscoverEvents;
class EventServiceProvider extends ServiceProvider
{
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Support/Providers/RouteServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Foundation/Support/Providers/RouteServiceProvider.php
index c86ad8c6e..b281da1a5 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Support/Providers/RouteServiceProvider.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Support/Providers/RouteServiceProvider.php
@@ -2,10 +2,10 @@
namespace Illuminate\Foundation\Support\Providers;
+use Illuminate\Contracts\Routing\UrlGenerator;
use Illuminate\Routing\Router;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Traits\ForwardsCalls;
-use Illuminate\Contracts\Routing\UrlGenerator;
/**
* @mixin \Illuminate\Routing\Router
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Assert.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Assert.php
deleted file mode 100644
index 0e51ba523..000000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Assert.php
+++ /dev/null
@@ -1,42 +0,0 @@
-app[Kernel::class]->call($command, $parameters);
}
- $this->beforeApplicationDestroyed(function () {
- if (count($this->expectedQuestions)) {
- $this->fail('Question "'.Arr::first($this->expectedQuestions)[0].'" was not asked.');
- }
-
- if (count($this->expectedOutput)) {
- $this->fail('Output "'.Arr::first($this->expectedOutput).'" was not printed.');
- }
- });
-
return new PendingCommand($this, $this->app, $command, $parameters);
}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithContainer.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithContainer.php
index 907760194..c84852e00 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithContainer.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithContainer.php
@@ -3,10 +3,18 @@
namespace Illuminate\Foundation\Testing\Concerns;
use Closure;
+use Illuminate\Foundation\Mix;
use Mockery;
trait InteractsWithContainer
{
+ /**
+ * The original Laravel Mix handler.
+ *
+ * @var \Illuminate\Foundation\Mix|null
+ */
+ protected $originalMix;
+
/**
* Register an instance of an object in the container.
*
@@ -38,22 +46,66 @@ trait InteractsWithContainer
*
* @param string $abstract
* @param \Closure|null $mock
- * @return object
+ * @return \Mockery\MockInterface
*/
protected function mock($abstract, Closure $mock = null)
{
return $this->instance($abstract, Mockery::mock(...array_filter(func_get_args())));
}
+ /**
+ * Mock a partial instance of an object in the container.
+ *
+ * @param string $abstract
+ * @param \Closure|null $mock
+ * @return \Mockery\MockInterface
+ */
+ protected function partialMock($abstract, Closure $mock = null)
+ {
+ return $this->instance($abstract, Mockery::mock(...array_filter(func_get_args()))->makePartial());
+ }
+
/**
* Spy an instance of an object in the container.
*
* @param string $abstract
* @param \Closure|null $mock
- * @return object
+ * @return \Mockery\MockInterface
*/
protected function spy($abstract, Closure $mock = null)
{
return $this->instance($abstract, Mockery::spy(...array_filter(func_get_args())));
}
+
+ /**
+ * Register an empty handler for Laravel Mix in the container.
+ *
+ * @return $this
+ */
+ protected function withoutMix()
+ {
+ if ($this->originalMix == null) {
+ $this->originalMix = app(Mix::class);
+ }
+
+ $this->swap(Mix::class, function () {
+ return '';
+ });
+
+ return $this;
+ }
+
+ /**
+ * Register an empty handler for Laravel Mix in the container.
+ *
+ * @return $this
+ */
+ protected function withMix()
+ {
+ if ($this->originalMix) {
+ $this->app->instance(Mix::class, $this->originalMix);
+ }
+
+ return $this;
+ }
}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithDatabase.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithDatabase.php
index 17914ba27..10efb827b 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithDatabase.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithDatabase.php
@@ -2,11 +2,13 @@
namespace Illuminate\Foundation\Testing\Concerns;
-use Illuminate\Support\Arr;
use Illuminate\Database\Eloquent\Model;
-use Illuminate\Foundation\Testing\Constraints\HasInDatabase;
+use Illuminate\Database\Eloquent\SoftDeletes;
+use Illuminate\Support\Arr;
+use Illuminate\Testing\Constraints\CountInDatabase;
+use Illuminate\Testing\Constraints\HasInDatabase;
+use Illuminate\Testing\Constraints\SoftDeletedInDatabase;
use PHPUnit\Framework\Constraint\LogicalNot as ReverseConstraint;
-use Illuminate\Foundation\Testing\Constraints\SoftDeletedInDatabase;
trait InteractsWithDatabase
{
@@ -46,27 +48,76 @@ trait InteractsWithDatabase
return $this;
}
+ /**
+ * Assert the count of table entries.
+ *
+ * @param string $table
+ * @param int $count
+ * @param string|null $connection
+ * @return $this
+ */
+ protected function assertDatabaseCount($table, int $count, $connection = null)
+ {
+ $this->assertThat(
+ $table, new CountInDatabase($this->getConnection($connection), $count)
+ );
+
+ return $this;
+ }
+
/**
* Assert the given record has been deleted.
*
- * @param string|\Illuminate\Database\Eloquent\Model $table
+ * @param \Illuminate\Database\Eloquent\Model|string $table
* @param array $data
* @param string|null $connection
* @return $this
*/
- protected function assertSoftDeleted($table, array $data = [], $connection = null)
+ protected function assertDeleted($table, array $data = [], $connection = null)
{
if ($table instanceof Model) {
- return $this->assertSoftDeleted($table->getTable(), [$table->getKeyName() => $table->getKey()], $table->getConnectionName());
+ return $this->assertDatabaseMissing($table->getTable(), [$table->getKeyName() => $table->getKey()], $table->getConnectionName());
+ }
+
+ $this->assertDatabaseMissing($table, $data, $connection);
+
+ return $this;
+ }
+
+ /**
+ * Assert the given record has been "soft deleted".
+ *
+ * @param \Illuminate\Database\Eloquent\Model|string $table
+ * @param array $data
+ * @param string|null $connection
+ * @param string|null $deletedAtColumn
+ * @return $this
+ */
+ protected function assertSoftDeleted($table, array $data = [], $connection = null, $deletedAtColumn = 'deleted_at')
+ {
+ if ($this->isSoftDeletableModel($table)) {
+ return $this->assertSoftDeleted($table->getTable(), [$table->getKeyName() => $table->getKey()], $table->getConnectionName(), $table->getDeletedAtColumn());
}
$this->assertThat(
- $table, new SoftDeletedInDatabase($this->getConnection($connection), $data)
+ $table, new SoftDeletedInDatabase($this->getConnection($connection), $data, $deletedAtColumn)
);
return $this;
}
+ /**
+ * Determine if the argument is a soft deletable model.
+ *
+ * @param mixed $model
+ * @return bool
+ */
+ protected function isSoftDeletableModel($model)
+ {
+ return $model instanceof Model
+ && in_array(SoftDeletes::class, class_uses_recursive($model));
+ }
+
/**
* Get the database connection.
*
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithExceptionHandling.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithExceptionHandling.php
index ee75e3429..40e3d777f 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithExceptionHandling.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithExceptionHandling.php
@@ -2,11 +2,11 @@
namespace Illuminate\Foundation\Testing\Concerns;
-use Exception;
-use Illuminate\Validation\ValidationException;
use Illuminate\Contracts\Debug\ExceptionHandler;
+use Illuminate\Validation\ValidationException;
use Symfony\Component\Console\Application as ConsoleApplication;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
+use Throwable;
trait InteractsWithExceptionHandling
{
@@ -82,12 +82,14 @@ trait InteractsWithExceptionHandling
}
/**
- * Report the given exception.
+ * Report or log an exception.
*
- * @param \Exception $e
+ * @param \Throwable $e
* @return void
+ *
+ * @throws \Exception
*/
- public function report(Exception $e)
+ public function report(Throwable $e)
{
//
}
@@ -95,50 +97,50 @@ trait InteractsWithExceptionHandling
/**
* Determine if the exception should be reported.
*
- * @param \Exception $e
+ * @param \Throwable $e
* @return bool
*/
- public function shouldReport(Exception $e)
+ public function shouldReport(Throwable $e)
{
return false;
}
/**
- * Render the given exception.
+ * Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
- * @param \Exception $e
- * @return mixed
+ * @param \Throwable $e
+ * @return \Symfony\Component\HttpFoundation\Response
*
- * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException|\Exception
+ * @throws \Throwable
*/
- public function render($request, Exception $e)
+ public function render($request, Throwable $e)
{
- if ($e instanceof NotFoundHttpException) {
- throw new NotFoundHttpException(
- "{$request->method()} {$request->url()}", null, $e->getCode()
- );
- }
-
foreach ($this->except as $class) {
if ($e instanceof $class) {
return $this->originalHandler->render($request, $e);
}
}
+ if ($e instanceof NotFoundHttpException) {
+ throw new NotFoundHttpException(
+ "{$request->method()} {$request->url()}", null, $e->getCode()
+ );
+ }
+
throw $e;
}
/**
- * Render the exception for the console.
+ * Render an exception to the console.
*
* @param \Symfony\Component\Console\Output\OutputInterface $output
- * @param \Exception $e
+ * @param \Throwable $e
* @return void
*/
- public function renderForConsole($output, Exception $e)
+ public function renderForConsole($output, Throwable $e)
{
- (new ConsoleApplication)->renderException($e, $output);
+ (new ConsoleApplication)->renderThrowable($e, $output);
}
});
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithRedis.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithRedis.php
index 8ad03236e..a68995b05 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithRedis.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithRedis.php
@@ -3,8 +3,9 @@
namespace Illuminate\Foundation\Testing\Concerns;
use Exception;
-use Illuminate\Redis\RedisManager;
use Illuminate\Foundation\Application;
+use Illuminate\Redis\RedisManager;
+use Illuminate\Support\Env;
trait InteractsWithRedis
{
@@ -30,8 +31,14 @@ trait InteractsWithRedis
public function setUpRedis()
{
$app = $this->app ?? new Application;
- $host = getenv('REDIS_HOST') ?: '127.0.0.1';
- $port = getenv('REDIS_PORT') ?: 6379;
+ $host = Env::get('REDIS_HOST', '127.0.0.1');
+ $port = Env::get('REDIS_PORT', 6379);
+
+ if (! extension_loaded('redis')) {
+ $this->markTestSkipped('The redis extension is not installed. Please install the extension to enable '.__CLASS__);
+
+ return;
+ }
if (static::$connectionFailedOnceWithDefaultsSkip) {
$this->markTestSkipped('Trying default host/port failed, please set environment variable REDIS_HOST & REDIS_PORT to enable '.__CLASS__);
@@ -42,6 +49,9 @@ trait InteractsWithRedis
foreach ($this->redisDriverProvider() as $driver) {
$this->redis[$driver[0]] = new RedisManager($app, $driver[0], [
'cluster' => false,
+ 'options' => [
+ 'prefix' => 'test_',
+ ],
'default' => [
'host' => $host,
'port' => $port,
@@ -52,9 +62,9 @@ trait InteractsWithRedis
}
try {
- $this->redis['predis']->connection()->flushdb();
+ $this->redis['phpredis']->connection()->flushdb();
} catch (Exception $e) {
- if ($host === '127.0.0.1' && $port === 6379 && getenv('REDIS_HOST') === false) {
+ if ($host === '127.0.0.1' && $port === 6379 && Env::get('REDIS_HOST') === null) {
static::$connectionFailedOnceWithDefaultsSkip = true;
$this->markTestSkipped('Trying default host/port failed, please set environment variable REDIS_HOST & REDIS_PORT to enable '.__CLASS__);
}
@@ -68,7 +78,7 @@ trait InteractsWithRedis
*/
public function tearDownRedis()
{
- $this->redis['predis']->connection()->flushdb();
+ $this->redis['phpredis']->connection()->flushdb();
foreach ($this->redisDriverProvider() as $driver) {
$this->redis[$driver[0]]->connection()->disconnect();
@@ -82,15 +92,10 @@ trait InteractsWithRedis
*/
public function redisDriverProvider()
{
- $providers = [
+ return [
['predis'],
+ ['phpredis'],
];
-
- if (extension_loaded('redis')) {
- $providers[] = ['phpredis'];
- }
-
- return $providers;
}
/**
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php
index 29e752aad..10e55aab1 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php
@@ -2,12 +2,13 @@
namespace Illuminate\Foundation\Testing\Concerns;
-use Illuminate\Support\Str;
-use Illuminate\Http\Request;
-use Illuminate\Foundation\Testing\TestResponse;
use Illuminate\Contracts\Http\Kernel as HttpKernel;
-use Symfony\Component\HttpFoundation\Request as SymfonyRequest;
+use Illuminate\Cookie\CookieValuePrefix;
+use Illuminate\Http\Request;
+use Illuminate\Support\Str;
+use Illuminate\Testing\TestResponse;
use Symfony\Component\HttpFoundation\File\UploadedFile as SymfonyUploadedFile;
+use Symfony\Component\HttpFoundation\Request as SymfonyRequest;
trait MakesHttpRequests
{
@@ -18,6 +19,20 @@ trait MakesHttpRequests
*/
protected $defaultHeaders = [];
+ /**
+ * Additional cookies for the request.
+ *
+ * @var array
+ */
+ protected $defaultCookies = [];
+
+ /**
+ * Additional cookies will not be encrypted for the request.
+ *
+ * @var array
+ */
+ protected $unencryptedCookies = [];
+
/**
* Additional server variables for the request.
*
@@ -32,10 +47,26 @@ trait MakesHttpRequests
*/
protected $followRedirects = false;
+ /**
+ * Indicates whether cookies should be encrypted.
+ *
+ * @var bool
+ */
+ protected $encryptCookies = true;
+
+ /**
+ * Indicated whether JSON requests should be performed "with credentials" (cookies).
+ *
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials
+ *
+ * @var bool
+ */
+ protected $withCredentials = false;
+
/**
* Define additional headers to be sent with the request.
*
- * @param array $headers
+ * @param array $headers
* @return $this
*/
public function withHeaders(array $headers)
@@ -48,8 +79,8 @@ trait MakesHttpRequests
/**
* Add a header to be sent with the request.
*
- * @param string $name
- * @param string $value
+ * @param string $name
+ * @param string $value
* @return $this
*/
public function withHeader(string $name, string $value)
@@ -59,6 +90,18 @@ trait MakesHttpRequests
return $this;
}
+ /**
+ * Add an authorization token for the request.
+ *
+ * @param string $token
+ * @param string $type
+ * @return $this
+ */
+ public function withToken(string $token, string $type = 'Bearer')
+ {
+ return $this->withHeader('Authorization', $type.' '.$token);
+ }
+
/**
* Flush all the configured headers.
*
@@ -131,6 +174,60 @@ trait MakesHttpRequests
return $this;
}
+ /**
+ * Define additional cookies to be sent with the request.
+ *
+ * @param array $cookies
+ * @return $this
+ */
+ public function withCookies(array $cookies)
+ {
+ $this->defaultCookies = array_merge($this->defaultCookies, $cookies);
+
+ return $this;
+ }
+
+ /**
+ * Add a cookie to be sent with the request.
+ *
+ * @param string $name
+ * @param string $value
+ * @return $this
+ */
+ public function withCookie(string $name, string $value)
+ {
+ $this->defaultCookies[$name] = $value;
+
+ return $this;
+ }
+
+ /**
+ * Define additional cookies will not be encrypted before sending with the request.
+ *
+ * @param array $cookies
+ * @return $this
+ */
+ public function withUnencryptedCookies(array $cookies)
+ {
+ $this->unencryptedCookies = array_merge($this->unencryptedCookies, $cookies);
+
+ return $this;
+ }
+
+ /**
+ * Add a cookie will not be encrypted before sending with the request.
+ *
+ * @param string $name
+ * @param string $value
+ * @return $this
+ */
+ public function withUnencryptedCookie(string $name, string $value)
+ {
+ $this->unencryptedCookies[$name] = $value;
+
+ return $this;
+ }
+
/**
* Automatically follow any redirects returned from the response.
*
@@ -143,6 +240,30 @@ trait MakesHttpRequests
return $this;
}
+ /**
+ * Include cookies and authorization headers for JSON requests.
+ *
+ * @return $this
+ */
+ public function withCredentials()
+ {
+ $this->withCredentials = true;
+
+ return $this;
+ }
+
+ /**
+ * Disable automatic encryption of cookie values.
+ *
+ * @return $this
+ */
+ public function disableCookieEncryption()
+ {
+ $this->encryptCookies = false;
+
+ return $this;
+ }
+
/**
* Set the referer header and previous URL session value in order to simulate a previous request.
*
@@ -161,13 +282,14 @@ trait MakesHttpRequests
*
* @param string $uri
* @param array $headers
- * @return \Illuminate\Foundation\Testing\TestResponse
+ * @return \Illuminate\Testing\TestResponse
*/
public function get($uri, array $headers = [])
{
$server = $this->transformHeadersToServerVars($headers);
+ $cookies = $this->prepareCookiesForRequest();
- return $this->call('GET', $uri, [], [], [], $server);
+ return $this->call('GET', $uri, [], $cookies, [], $server);
}
/**
@@ -175,7 +297,7 @@ trait MakesHttpRequests
*
* @param string $uri
* @param array $headers
- * @return \Illuminate\Foundation\Testing\TestResponse
+ * @return \Illuminate\Testing\TestResponse
*/
public function getJson($uri, array $headers = [])
{
@@ -188,13 +310,14 @@ trait MakesHttpRequests
* @param string $uri
* @param array $data
* @param array $headers
- * @return \Illuminate\Foundation\Testing\TestResponse
+ * @return \Illuminate\Testing\TestResponse
*/
public function post($uri, array $data = [], array $headers = [])
{
$server = $this->transformHeadersToServerVars($headers);
+ $cookies = $this->prepareCookiesForRequest();
- return $this->call('POST', $uri, $data, [], [], $server);
+ return $this->call('POST', $uri, $data, $cookies, [], $server);
}
/**
@@ -203,7 +326,7 @@ trait MakesHttpRequests
* @param string $uri
* @param array $data
* @param array $headers
- * @return \Illuminate\Foundation\Testing\TestResponse
+ * @return \Illuminate\Testing\TestResponse
*/
public function postJson($uri, array $data = [], array $headers = [])
{
@@ -216,13 +339,14 @@ trait MakesHttpRequests
* @param string $uri
* @param array $data
* @param array $headers
- * @return \Illuminate\Foundation\Testing\TestResponse
+ * @return \Illuminate\Testing\TestResponse
*/
public function put($uri, array $data = [], array $headers = [])
{
$server = $this->transformHeadersToServerVars($headers);
+ $cookies = $this->prepareCookiesForRequest();
- return $this->call('PUT', $uri, $data, [], [], $server);
+ return $this->call('PUT', $uri, $data, $cookies, [], $server);
}
/**
@@ -231,7 +355,7 @@ trait MakesHttpRequests
* @param string $uri
* @param array $data
* @param array $headers
- * @return \Illuminate\Foundation\Testing\TestResponse
+ * @return \Illuminate\Testing\TestResponse
*/
public function putJson($uri, array $data = [], array $headers = [])
{
@@ -244,13 +368,14 @@ trait MakesHttpRequests
* @param string $uri
* @param array $data
* @param array $headers
- * @return \Illuminate\Foundation\Testing\TestResponse
+ * @return \Illuminate\Testing\TestResponse
*/
public function patch($uri, array $data = [], array $headers = [])
{
$server = $this->transformHeadersToServerVars($headers);
+ $cookies = $this->prepareCookiesForRequest();
- return $this->call('PATCH', $uri, $data, [], [], $server);
+ return $this->call('PATCH', $uri, $data, $cookies, [], $server);
}
/**
@@ -259,7 +384,7 @@ trait MakesHttpRequests
* @param string $uri
* @param array $data
* @param array $headers
- * @return \Illuminate\Foundation\Testing\TestResponse
+ * @return \Illuminate\Testing\TestResponse
*/
public function patchJson($uri, array $data = [], array $headers = [])
{
@@ -272,13 +397,14 @@ trait MakesHttpRequests
* @param string $uri
* @param array $data
* @param array $headers
- * @return \Illuminate\Foundation\Testing\TestResponse
+ * @return \Illuminate\Testing\TestResponse
*/
public function delete($uri, array $data = [], array $headers = [])
{
$server = $this->transformHeadersToServerVars($headers);
+ $cookies = $this->prepareCookiesForRequest();
- return $this->call('DELETE', $uri, $data, [], [], $server);
+ return $this->call('DELETE', $uri, $data, $cookies, [], $server);
}
/**
@@ -287,7 +413,7 @@ trait MakesHttpRequests
* @param string $uri
* @param array $data
* @param array $headers
- * @return \Illuminate\Foundation\Testing\TestResponse
+ * @return \Illuminate\Testing\TestResponse
*/
public function deleteJson($uri, array $data = [], array $headers = [])
{
@@ -295,31 +421,32 @@ trait MakesHttpRequests
}
/**
- * Visit the given URI with a OPTION request.
+ * Visit the given URI with an OPTIONS request.
*
* @param string $uri
* @param array $data
* @param array $headers
- * @return \Illuminate\Foundation\Testing\TestResponse
+ * @return \Illuminate\Testing\TestResponse
*/
- public function option($uri, array $data = [], array $headers = [])
+ public function options($uri, array $data = [], array $headers = [])
{
$server = $this->transformHeadersToServerVars($headers);
+ $cookies = $this->prepareCookiesForRequest();
- return $this->call('OPTION', $uri, $data, [], [], $server);
+ return $this->call('OPTIONS', $uri, $data, $cookies, [], $server);
}
/**
- * Visit the given URI with a OPTION request, expecting a JSON response.
+ * Visit the given URI with an OPTIONS request, expecting a JSON response.
*
* @param string $uri
* @param array $data
* @param array $headers
- * @return \Illuminate\Foundation\Testing\TestResponse
+ * @return \Illuminate\Testing\TestResponse
*/
- public function optionJson($uri, array $data = [], array $headers = [])
+ public function optionsJson($uri, array $data = [], array $headers = [])
{
- return $this->json('OPTION', $uri, $data, $headers);
+ return $this->json('OPTIONS', $uri, $data, $headers);
}
/**
@@ -329,7 +456,7 @@ trait MakesHttpRequests
* @param string $uri
* @param array $data
* @param array $headers
- * @return \Illuminate\Foundation\Testing\TestResponse
+ * @return \Illuminate\Testing\TestResponse
*/
public function json($method, $uri, array $data = [], array $headers = [])
{
@@ -344,7 +471,13 @@ trait MakesHttpRequests
], $headers);
return $this->call(
- $method, $uri, [], [], $files, $this->transformHeadersToServerVars($headers), $content
+ $method,
+ $uri,
+ [],
+ $this->prepareCookiesForJsonRequest(),
+ $files,
+ $this->transformHeadersToServerVars($headers),
+ $content
);
}
@@ -358,7 +491,7 @@ trait MakesHttpRequests
* @param array $files
* @param array $server
* @param string|null $content
- * @return \Illuminate\Foundation\Testing\TestResponse
+ * @return \Illuminate\Testing\TestResponse
*/
public function call($method, $uri, $parameters = [], $cookies = [], $files = [], $server = [], $content = null)
{
@@ -396,11 +529,7 @@ trait MakesHttpRequests
$uri = substr($uri, 1);
}
- if (! Str::startsWith($uri, 'http')) {
- $uri = config('app.url').'/'.$uri;
- }
-
- return trim($uri, '/');
+ return trim(url($uri), '/');
}
/**
@@ -460,11 +589,37 @@ trait MakesHttpRequests
return $files;
}
+ /**
+ * If enabled, encrypt cookie values for request.
+ *
+ * @return array
+ */
+ protected function prepareCookiesForRequest()
+ {
+ if (! $this->encryptCookies) {
+ return array_merge($this->defaultCookies, $this->unencryptedCookies);
+ }
+
+ return collect($this->defaultCookies)->map(function ($value, $key) {
+ return encrypt(CookieValuePrefix::create($key, app('encrypter')->getKey()).$value, false);
+ })->merge($this->unencryptedCookies)->all();
+ }
+
+ /**
+ * If enabled, add cookies for JSON requests.
+ *
+ * @return array
+ */
+ protected function prepareCookiesForJsonRequest()
+ {
+ return $this->withCredentials ? $this->prepareCookiesForRequest() : [];
+ }
+
/**
* Follow a redirect chain until a non-redirect is received.
*
* @param \Illuminate\Http\Response $response
- * @return \Illuminate\Http\Response|\Illuminate\Foundation\Testing\TestResponse
+ * @return \Illuminate\Http\Response|\Illuminate\Testing\TestResponse
*/
protected function followRedirects($response)
{
@@ -481,7 +636,7 @@ trait MakesHttpRequests
* Create the test response instance from the given response.
*
* @param \Illuminate\Http\Response $response
- * @return \Illuminate\Foundation\Testing\TestResponse
+ * @return \Illuminate\Testing\TestResponse
*/
protected function createTestResponse($response)
{
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MocksApplicationServices.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MocksApplicationServices.php
index 0dd37f7f6..7fc360e76 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MocksApplicationServices.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MocksApplicationServices.php
@@ -2,10 +2,11 @@
namespace Illuminate\Foundation\Testing\Concerns;
-use Mockery;
use Illuminate\Contracts\Bus\Dispatcher as BusDispatcherContract;
use Illuminate\Contracts\Events\Dispatcher as EventsDispatcherContract;
use Illuminate\Contracts\Notifications\Dispatcher as NotificationDispatcher;
+use Illuminate\Support\Facades\Event;
+use Mockery;
trait MocksApplicationServices
{
@@ -102,6 +103,8 @@ trait MocksApplicationServices
$this->firedEvents[] = $called;
});
+ Event::clearResolvedInstances();
+
$this->app->instance('events', $mock);
return $this;
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Constraints/HasInDatabase.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Constraints/HasInDatabase.php
deleted file mode 100644
index b88f34222..000000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Constraints/HasInDatabase.php
+++ /dev/null
@@ -1,103 +0,0 @@
-data = $data;
-
- $this->database = $database;
- }
-
- /**
- * Check if the data is found in the given table.
- *
- * @param string $table
- * @return bool
- */
- public function matches($table): bool
- {
- return $this->database->table($table)->where($this->data)->count() > 0;
- }
-
- /**
- * Get the description of the failure.
- *
- * @param string $table
- * @return string
- */
- public function failureDescription($table): string
- {
- return sprintf(
- "a row in the table [%s] matches the attributes %s.\n\n%s",
- $table, $this->toString(JSON_PRETTY_PRINT), $this->getAdditionalInfo($table)
- );
- }
-
- /**
- * Get additional info about the records found in the database table.
- *
- * @param string $table
- * @return string
- */
- protected function getAdditionalInfo($table)
- {
- $results = $this->database->table($table)->get();
-
- if ($results->isEmpty()) {
- return 'The table is empty';
- }
-
- $description = 'Found: '.json_encode($results->take($this->show), JSON_PRETTY_PRINT);
-
- if ($results->count() > $this->show) {
- $description .= sprintf(' and %s others', $results->count() - $this->show);
- }
-
- return $description;
- }
-
- /**
- * Get a string representation of the object.
- *
- * @param int $options
- * @return string
- */
- public function toString($options = 0): string
- {
- return json_encode($this->data, $options);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Constraints/SoftDeletedInDatabase.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Constraints/SoftDeletedInDatabase.php
deleted file mode 100644
index abab48cc5..000000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Constraints/SoftDeletedInDatabase.php
+++ /dev/null
@@ -1,103 +0,0 @@
-data = $data;
-
- $this->database = $database;
- }
-
- /**
- * Check if the data is found in the given table.
- *
- * @param string $table
- * @return bool
- */
- public function matches($table): bool
- {
- return $this->database->table($table)
- ->where($this->data)->whereNotNull('deleted_at')->count() > 0;
- }
-
- /**
- * Get the description of the failure.
- *
- * @param string $table
- * @return string
- */
- public function failureDescription($table): string
- {
- return sprintf(
- "any soft deleted row in the table [%s] matches the attributes %s.\n\n%s",
- $table, $this->toString(), $this->getAdditionalInfo($table)
- );
- }
-
- /**
- * Get additional info about the records found in the database table.
- *
- * @param string $table
- * @return string
- */
- protected function getAdditionalInfo($table)
- {
- $results = $this->database->table($table)->get();
-
- if ($results->isEmpty()) {
- return 'The table is empty';
- }
-
- $description = 'Found: '.json_encode($results->take($this->show), JSON_PRETTY_PRINT);
-
- if ($results->count() > $this->show) {
- $description .= sprintf(' and %s others', $results->count() - $this->show);
- }
-
- return $description;
- }
-
- /**
- * Get a string representation of the object.
- *
- * @return string
- */
- public function toString(): string
- {
- return json_encode($this->data);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/PendingCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/PendingCommand.php
deleted file mode 100644
index 379eba14c..000000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/PendingCommand.php
+++ /dev/null
@@ -1,222 +0,0 @@
-app = $app;
- $this->test = $test;
- $this->command = $command;
- $this->parameters = $parameters;
- }
-
- /**
- * Specify a question that should be asked when the command runs.
- *
- * @param string $question
- * @param string $answer
- * @return $this
- */
- public function expectsQuestion($question, $answer)
- {
- $this->test->expectedQuestions[] = [$question, $answer];
-
- return $this;
- }
-
- /**
- * Specify output that should be printed when the command runs.
- *
- * @param string $output
- * @return $this
- */
- public function expectsOutput($output)
- {
- $this->test->expectedOutput[] = $output;
-
- return $this;
- }
-
- /**
- * Assert that the command has the given exit code.
- *
- * @param int $exitCode
- * @return $this
- */
- public function assertExitCode($exitCode)
- {
- $this->expectedExitCode = $exitCode;
-
- return $this;
- }
-
- /**
- * Execute the command.
- *
- * @return int
- */
- public function execute()
- {
- return $this->run();
- }
-
- /**
- * Execute the command.
- *
- * @return int
- */
- public function run()
- {
- $this->hasExecuted = true;
-
- $this->mockConsoleOutput();
-
- try {
- $exitCode = $this->app[Kernel::class]->call($this->command, $this->parameters);
- } catch (NoMatchingExpectationException $e) {
- if ($e->getMethodName() === 'askQuestion') {
- $this->test->fail('Unexpected question "'.$e->getActualArguments()[0]->getQuestion().'" was asked.');
- }
-
- throw $e;
- }
-
- if ($this->expectedExitCode !== null) {
- $this->test->assertEquals(
- $this->expectedExitCode, $exitCode,
- "Expected status code {$this->expectedExitCode} but received {$exitCode}."
- );
- }
-
- return $exitCode;
- }
-
- /**
- * Mock the application's console output.
- *
- * @return void
- */
- protected function mockConsoleOutput()
- {
- $mock = Mockery::mock(OutputStyle::class.'[askQuestion]', [
- (new ArrayInput($this->parameters)), $this->createABufferedOutputMock(),
- ]);
-
- foreach ($this->test->expectedQuestions as $i => $question) {
- $mock->shouldReceive('askQuestion')
- ->once()
- ->ordered()
- ->with(Mockery::on(function ($argument) use ($question) {
- return $argument->getQuestion() == $question[0];
- }))
- ->andReturnUsing(function () use ($question, $i) {
- unset($this->test->expectedQuestions[$i]);
-
- return $question[1];
- });
- }
-
- $this->app->bind(OutputStyle::class, function () use ($mock) {
- return $mock;
- });
- }
-
- /**
- * Create a mock for the buffered output.
- *
- * @return \Mockery\MockInterface
- */
- private function createABufferedOutputMock()
- {
- $mock = Mockery::mock(BufferedOutput::class.'[doWrite]')
- ->shouldAllowMockingProtectedMethods()
- ->shouldIgnoreMissing();
-
- foreach ($this->test->expectedOutput as $i => $output) {
- $mock->shouldReceive('doWrite')
- ->once()
- ->ordered()
- ->with($output, Mockery::any())
- ->andReturnUsing(function () use ($i) {
- unset($this->test->expectedOutput[$i]);
- });
- }
-
- return $mock;
- }
-
- /**
- * Handle the object's destruction.
- *
- * @return void
- */
- public function __destruct()
- {
- if ($this->hasExecuted) {
- return;
- }
-
- $this->run();
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/RefreshDatabase.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/RefreshDatabase.php
index e968ad90c..0cbeea12d 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/RefreshDatabase.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/RefreshDatabase.php
@@ -37,11 +37,21 @@ trait RefreshDatabase
*/
protected function refreshInMemoryDatabase()
{
- $this->artisan('migrate');
+ $this->artisan('migrate', $this->migrateUsing());
$this->app[Kernel::class]->setArtisan(null);
}
+ /**
+ * The parameters that should be used when running "migrate".
+ *
+ * @return array
+ */
+ protected function migrateUsing()
+ {
+ return [];
+ }
+
/**
* Refresh a conventional test database.
*
@@ -50,10 +60,7 @@ trait RefreshDatabase
protected function refreshTestDatabase()
{
if (! RefreshDatabaseState::$migrated) {
- $this->artisan('migrate:fresh', [
- '--drop-views' => $this->shouldDropViews(),
- '--drop-types' => $this->shouldDropTypes(),
- ]);
+ $this->artisan('migrate:fresh', $this->migrateFreshUsing());
$this->app[Kernel::class]->setArtisan(null);
@@ -63,6 +70,19 @@ trait RefreshDatabase
$this->beginDatabaseTransaction();
}
+ /**
+ * The parameters that should be used when running "migrate:fresh".
+ *
+ * @return array
+ */
+ protected function migrateFreshUsing()
+ {
+ return [
+ '--drop-views' => $this->shouldDropViews(),
+ '--drop-types' => $this->shouldDropTypes(),
+ ];
+ }
+
/**
* Begin a database transaction on the testing database.
*
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php
index e2aa4b11f..3bcd3f026 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php
@@ -2,15 +2,16 @@
namespace Illuminate\Foundation\Testing;
-use Mockery;
use Carbon\Carbon;
use Carbon\CarbonImmutable;
-use Illuminate\Support\Str;
-use Illuminate\Support\Facades\Facade;
-use Illuminate\Database\Eloquent\Model;
-use Mockery\Exception\InvalidCountException;
use Illuminate\Console\Application as Artisan;
+use Illuminate\Database\Eloquent\Model;
+use Illuminate\Support\Facades\Facade;
+use Illuminate\Support\Str;
+use Mockery;
+use Mockery\Exception\InvalidCountException;
use PHPUnit\Framework\TestCase as BaseTestCase;
+use Throwable;
abstract class TestCase extends BaseTestCase
{
@@ -74,6 +75,8 @@ abstract class TestCase extends BaseTestCase
*/
protected function setUp(): void
{
+ Facade::clearResolvedInstances();
+
if (! $this->app) {
$this->refreshApplication();
}
@@ -81,11 +84,9 @@ abstract class TestCase extends BaseTestCase
$this->setUpTraits();
foreach ($this->afterApplicationCreatedCallbacks as $callback) {
- call_user_func($callback);
+ $callback();
}
- Facade::clearResolvedInstances();
-
Model::setEventDispatcher($this->app['events']);
$this->setUpHasRun = true;
@@ -141,6 +142,8 @@ abstract class TestCase extends BaseTestCase
* Clean up the testing environment before the next test.
*
* @return void
+ *
+ * @throws \Mockery\Exception\InvalidCountException
*/
protected function tearDown(): void
{
@@ -205,7 +208,7 @@ abstract class TestCase extends BaseTestCase
$this->afterApplicationCreatedCallbacks[] = $callback;
if ($this->setUpHasRun) {
- call_user_func($callback);
+ $callback();
}
}
@@ -229,8 +232,8 @@ abstract class TestCase extends BaseTestCase
{
foreach ($this->beforeApplicationDestroyedCallbacks as $callback) {
try {
- call_user_func($callback);
- } catch (\Throwable $e) {
+ $callback();
+ } catch (Throwable $e) {
if (! $this->callbackException) {
$this->callbackException = $e;
}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/WithFaker.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/WithFaker.php
index f4fcfee84..cd276fbd4 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/WithFaker.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/WithFaker.php
@@ -3,6 +3,7 @@
namespace Illuminate\Foundation\Testing;
use Faker\Factory;
+use Faker\Generator;
trait WithFaker
{
@@ -42,6 +43,12 @@ trait WithFaker
*/
protected function makeFaker($locale = null)
{
- return Factory::create($locale ?? Factory::DEFAULT_LOCALE);
+ $locale = $locale ?? config('app.faker_locale', Factory::DEFAULT_LOCALE);
+
+ if (isset($this->app) && $this->app->bound(Generator::class)) {
+ return $this->app->make(Generator::class, ['locale' => $locale]);
+ }
+
+ return Factory::create($locale);
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Validation/ValidatesRequests.php b/vendor/laravel/framework/src/Illuminate/Foundation/Validation/ValidatesRequests.php
index 89ab3d125..2a1593a27 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Validation/ValidatesRequests.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/Validation/ValidatesRequests.php
@@ -2,8 +2,8 @@
namespace Illuminate\Foundation\Validation;
-use Illuminate\Http\Request;
use Illuminate\Contracts\Validation\Factory;
+use Illuminate\Http\Request;
use Illuminate\Validation\ValidationException;
trait ValidatesRequests
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php b/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php
index b5edd0add..5fbc613ac 100644
--- a/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php
+++ b/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php
@@ -1,35 +1,33 @@
path($path);
}
}
@@ -170,7 +168,7 @@ if (! function_exists('back')) {
/**
* Create a new redirect response to the previous location.
*
- * @param int $status
+ * @param int $status
* @param array $headers
* @param mixed $fallback
* @return \Illuminate\Http\RedirectResponse
@@ -190,7 +188,7 @@ if (! function_exists('base_path')) {
*/
function base_path($path = '')
{
- return app()->basePath().($path ? DIRECTORY_SEPARATOR.$path : $path);
+ return app()->basePath($path);
}
}
@@ -250,13 +248,7 @@ if (! function_exists('cache')) {
);
}
- if (! isset($arguments[1])) {
- throw new Exception(
- 'You must specify an expiration time when setting a value in the cache.'
- );
- }
-
- return app('cache')->put(key($arguments[0]), reset($arguments[0]), $arguments[1]);
+ return app('cache')->put(key($arguments[0]), reset($arguments[0]), $arguments[1] ?? null);
}
}
@@ -293,7 +285,7 @@ if (! function_exists('config_path')) {
*/
function config_path($path = '')
{
- return app()->make('path.config').($path ? DIRECTORY_SEPARATOR.$path : $path);
+ return app()->configPath($path);
}
}
@@ -306,13 +298,13 @@ if (! function_exists('cookie')) {
* @param int $minutes
* @param string|null $path
* @param string|null $domain
- * @param bool $secure
+ * @param bool|null $secure
* @param bool $httpOnly
* @param bool $raw
* @param string|null $sameSite
* @return \Illuminate\Cookie\CookieJar|\Symfony\Component\HttpFoundation\Cookie
*/
- function cookie($name = null, $value = null, $minutes = 0, $path = null, $domain = null, $secure = false, $httpOnly = true, $raw = false, $sameSite = null)
+ function cookie($name = null, $value = null, $minutes = 0, $path = null, $domain = null, $secure = null, $httpOnly = true, $raw = false, $sameSite = null)
{
$cookie = app(CookieFactory::class);
@@ -374,7 +366,7 @@ if (! function_exists('decrypt')) {
* Decrypt the given value.
*
* @param string $value
- * @param bool $unserialize
+ * @param bool $unserialize
* @return mixed
*/
function decrypt($value, $unserialize = true)
@@ -393,7 +385,7 @@ if (! function_exists('dispatch')) {
function dispatch($job)
{
if ($job instanceof Closure) {
- $job = new CallQueuedClosure(new SerializableClosure($job));
+ $job = CallQueuedClosure::create($job);
}
return new PendingDispatch($job);
@@ -423,6 +415,8 @@ if (! function_exists('elixir')) {
* @return string
*
* @throws \InvalidArgumentException
+ *
+ * @deprecated Use Laravel Mix instead.
*/
function elixir($file, $buildDirectory = 'build')
{
@@ -459,7 +453,7 @@ if (! function_exists('encrypt')) {
* Encrypt the given value.
*
* @param mixed $value
- * @param bool $serialize
+ * @param bool $serialize
* @return string
*/
function encrypt($value, $serialize = true)
@@ -485,24 +479,21 @@ if (! function_exists('event')) {
if (! function_exists('factory')) {
/**
- * Create a model factory builder for a given class, name, and amount.
+ * Create a model factory builder for a given class and amount.
*
- * @param dynamic class|class,name|class,amount|class,name,amount
+ * @param string $class
+ * @param int $amount
* @return \Illuminate\Database\Eloquent\FactoryBuilder
*/
- function factory()
+ function factory($class, $amount = null)
{
$factory = app(EloquentFactory::class);
- $arguments = func_get_args();
-
- if (isset($arguments[1]) && is_string($arguments[1])) {
- return $factory->of($arguments[0], $arguments[1])->times($arguments[2] ?? null);
- } elseif (isset($arguments[1])) {
- return $factory->of($arguments[0])->times($arguments[1]);
+ if (isset($amount) && is_int($amount)) {
+ return $factory->of($class)->times($amount);
}
- return $factory->of($arguments[0]);
+ return $factory->of($class);
}
}
@@ -511,7 +502,7 @@ if (! function_exists('info')) {
* Write some information to the log.
*
* @param string $message
- * @param array $context
+ * @param array $context
* @return void
*/
function info($message, $context = [])
@@ -584,7 +575,7 @@ if (! function_exists('now')) {
/**
* Create a new Carbon instance for the current time.
*
- * @param \DateTimeZone|string|null $tz
+ * @param \DateTimeZone|string|null $tz
* @return \Illuminate\Support\Carbon
*/
function now($tz = null)
@@ -598,7 +589,7 @@ if (! function_exists('old')) {
* Retrieve an old input item.
*
* @param string|null $key
- * @param mixed $default
+ * @param mixed $default
* @return mixed
*/
function old($key = null, $default = null)
@@ -640,9 +631,9 @@ if (! function_exists('redirect')) {
* Get an instance of the redirector.
*
* @param string|null $to
- * @param int $status
- * @param array $headers
- * @param bool|null $secure
+ * @param int $status
+ * @param array $headers
+ * @param bool|null $secure
* @return \Illuminate\Routing\Redirector|\Illuminate\Http\RedirectResponse
*/
function redirect($to = null, $status = 302, $headers = [], $secure = null)
@@ -662,13 +653,8 @@ if (! function_exists('report')) {
* @param \Throwable $exception
* @return void
*/
- function report($exception)
+ function report(Throwable $exception)
{
- if ($exception instanceof Throwable &&
- ! $exception instanceof Exception) {
- $exception = new FatalThrowableError($exception);
- }
-
app(ExceptionHandler::class)->report($exception);
}
}
@@ -678,7 +664,7 @@ if (! function_exists('request')) {
* Get an instance of the current request or an input item from the request.
*
* @param array|string|null $key
- * @param mixed $default
+ * @param mixed $default
* @return \Illuminate\Http\Request|string|array
*/
function request($key = null, $default = null)
@@ -715,7 +701,7 @@ if (! function_exists('rescue')) {
report($e);
}
- return value($rescue);
+ return $rescue instanceof Closure ? $rescue($e) : $rescue;
}
}
}
@@ -752,8 +738,8 @@ if (! function_exists('response')) {
* Return a new response from the application.
*
* @param \Illuminate\View\View|string|array|null $content
- * @param int $status
- * @param array $headers
+ * @param int $status
+ * @param array $headers
* @return \Illuminate\Http\Response|\Illuminate\Contracts\Routing\ResponseFactory
*/
function response($content = '', $status = 200, array $headers = [])
@@ -801,7 +787,7 @@ if (! function_exists('secure_url')) {
* Generate a HTTPS url for the application.
*
* @param string $path
- * @param mixed $parameters
+ * @param mixed $parameters
* @return string
*/
function secure_url($path, $parameters = [])
@@ -851,7 +837,7 @@ if (! function_exists('today')) {
/**
* Create a new Carbon instance for the current date.
*
- * @param \DateTimeZone|string|null $tz
+ * @param \DateTimeZone|string|null $tz
* @return \Illuminate\Support\Carbon
*/
function today($tz = null)
@@ -865,7 +851,7 @@ if (! function_exists('trans')) {
* Translate the given message.
*
* @param string|null $key
- * @param array $replace
+ * @param array $replace
* @param string|null $locale
* @return \Illuminate\Contracts\Translation\Translator|string|array|null
*/
@@ -875,7 +861,7 @@ if (! function_exists('trans')) {
return app('translator');
}
- return app('translator')->trans($key, $replace, $locale);
+ return app('translator')->get($key, $replace, $locale);
}
}
@@ -884,14 +870,14 @@ if (! function_exists('trans_choice')) {
* Translates the given message based on a count.
*
* @param string $key
- * @param int|array|\Countable $number
- * @param array $replace
+ * @param \Countable|int|array $number
+ * @param array $replace
* @param string|null $locale
* @return string
*/
function trans_choice($key, $number, array $replace = [], $locale = null)
{
- return app('translator')->transChoice($key, $number, $replace, $locale);
+ return app('translator')->choice($key, $number, $replace, $locale);
}
}
@@ -899,14 +885,18 @@ if (! function_exists('__')) {
/**
* Translate the given message.
*
- * @param string $key
+ * @param string|null $key
* @param array $replace
* @param string|null $locale
* @return string|array|null
*/
- function __($key, $replace = [], $locale = null)
+ function __($key = null, $replace = [], $locale = null)
{
- return app('translator')->getFromJson($key, $replace, $locale);
+ if (is_null($key)) {
+ return $key;
+ }
+
+ return trans($key, $replace, $locale);
}
}
@@ -914,9 +904,9 @@ if (! function_exists('url')) {
/**
* Generate a url for the application.
*
- * @param string $path
- * @param mixed $parameters
- * @param bool|null $secure
+ * @param string|null $path
+ * @param mixed $parameters
+ * @param bool|null $secure
* @return \Illuminate\Contracts\Routing\UrlGenerator|string
*/
function url($path = null, $parameters = [], $secure = null)
@@ -956,8 +946,8 @@ if (! function_exists('view')) {
* Get the evaluated view contents for the given view.
*
* @param string|null $view
- * @param \Illuminate\Contracts\Support\Arrayable|array $data
- * @param array $mergeData
+ * @param \Illuminate\Contracts\Support\Arrayable|array $data
+ * @param array $mergeData
* @return \Illuminate\View\View|\Illuminate\Contracts\View\Factory
*/
function view($view = null, $data = [], $mergeData = [])
diff --git a/vendor/laravel/framework/src/Illuminate/Hashing/AbstractHasher.php b/vendor/laravel/framework/src/Illuminate/Hashing/AbstractHasher.php
index 01321b9b9..7ec087bee 100644
--- a/vendor/laravel/framework/src/Illuminate/Hashing/AbstractHasher.php
+++ b/vendor/laravel/framework/src/Illuminate/Hashing/AbstractHasher.php
@@ -7,7 +7,7 @@ abstract class AbstractHasher
/**
* Get information about the given hashed value.
*
- * @param string $hashedValue
+ * @param string $hashedValue
* @return array
*/
public function info($hashedValue)
diff --git a/vendor/laravel/framework/src/Illuminate/Hashing/Argon2IdHasher.php b/vendor/laravel/framework/src/Illuminate/Hashing/Argon2IdHasher.php
index 64345fb2f..0a36a3000 100644
--- a/vendor/laravel/framework/src/Illuminate/Hashing/Argon2IdHasher.php
+++ b/vendor/laravel/framework/src/Illuminate/Hashing/Argon2IdHasher.php
@@ -13,6 +13,8 @@ class Argon2IdHasher extends ArgonHasher
* @param string $hashedValue
* @param array $options
* @return bool
+ *
+ * @throws \RuntimeException
*/
public function check($value, $hashedValue, array $options = [])
{
diff --git a/vendor/laravel/framework/src/Illuminate/Hashing/ArgonHasher.php b/vendor/laravel/framework/src/Illuminate/Hashing/ArgonHasher.php
index 66b393004..41109c9b0 100644
--- a/vendor/laravel/framework/src/Illuminate/Hashing/ArgonHasher.php
+++ b/vendor/laravel/framework/src/Illuminate/Hashing/ArgonHasher.php
@@ -2,8 +2,8 @@
namespace Illuminate\Hashing;
-use RuntimeException;
use Illuminate\Contracts\Hashing\Hasher as HasherContract;
+use RuntimeException;
class ArgonHasher extends AbstractHasher implements HasherContract
{
@@ -60,13 +60,13 @@ class ArgonHasher extends AbstractHasher implements HasherContract
*/
public function make($value, array $options = [])
{
- $hash = password_hash($value, $this->algorithm(), [
+ $hash = @password_hash($value, $this->algorithm(), [
'memory_cost' => $this->memory($options),
'time_cost' => $this->time($options),
'threads' => $this->threads($options),
]);
- if ($hash === false) {
+ if (! is_string($hash)) {
throw new RuntimeException('Argon2 hashing not supported.');
}
@@ -90,6 +90,8 @@ class ArgonHasher extends AbstractHasher implements HasherContract
* @param string $hashedValue
* @param array $options
* @return bool
+ *
+ * @throws \RuntimeException
*/
public function check($value, $hashedValue, array $options = [])
{
diff --git a/vendor/laravel/framework/src/Illuminate/Hashing/BcryptHasher.php b/vendor/laravel/framework/src/Illuminate/Hashing/BcryptHasher.php
index c853915c2..26f928cb5 100755
--- a/vendor/laravel/framework/src/Illuminate/Hashing/BcryptHasher.php
+++ b/vendor/laravel/framework/src/Illuminate/Hashing/BcryptHasher.php
@@ -2,8 +2,8 @@
namespace Illuminate\Hashing;
-use RuntimeException;
use Illuminate\Contracts\Hashing\Hasher as HasherContract;
+use RuntimeException;
class BcryptHasher extends AbstractHasher implements HasherContract
{
@@ -37,7 +37,7 @@ class BcryptHasher extends AbstractHasher implements HasherContract
* Hash the given value.
*
* @param string $value
- * @param array $options
+ * @param array $options
* @return string
*
* @throws \RuntimeException
@@ -78,7 +78,7 @@ class BcryptHasher extends AbstractHasher implements HasherContract
* Check if the given hash has been hashed using the given options.
*
* @param string $hashedValue
- * @param array $options
+ * @param array $options
* @return bool
*/
public function needsRehash($hashedValue, array $options = [])
diff --git a/vendor/laravel/framework/src/Illuminate/Hashing/HashManager.php b/vendor/laravel/framework/src/Illuminate/Hashing/HashManager.php
index 4dbae34ca..977ef2229 100644
--- a/vendor/laravel/framework/src/Illuminate/Hashing/HashManager.php
+++ b/vendor/laravel/framework/src/Illuminate/Hashing/HashManager.php
@@ -2,8 +2,8 @@
namespace Illuminate\Hashing;
-use Illuminate\Support\Manager;
use Illuminate\Contracts\Hashing\Hasher;
+use Illuminate\Support\Manager;
class HashManager extends Manager implements Hasher
{
@@ -14,7 +14,7 @@ class HashManager extends Manager implements Hasher
*/
public function createBcryptDriver()
{
- return new BcryptHasher($this->app['config']['hashing.bcrypt'] ?? []);
+ return new BcryptHasher($this->config->get('hashing.bcrypt') ?? []);
}
/**
@@ -24,7 +24,7 @@ class HashManager extends Manager implements Hasher
*/
public function createArgonDriver()
{
- return new ArgonHasher($this->app['config']['hashing.argon'] ?? []);
+ return new ArgonHasher($this->config->get('hashing.argon') ?? []);
}
/**
@@ -34,7 +34,7 @@ class HashManager extends Manager implements Hasher
*/
public function createArgon2idDriver()
{
- return new Argon2IdHasher($this->app['config']['hashing.argon'] ?? []);
+ return new Argon2IdHasher($this->config->get('hashing.argon') ?? []);
}
/**
@@ -52,7 +52,7 @@ class HashManager extends Manager implements Hasher
* Hash the given value.
*
* @param string $value
- * @param array $options
+ * @param array $options
* @return string
*/
public function make($value, array $options = [])
@@ -65,7 +65,7 @@ class HashManager extends Manager implements Hasher
*
* @param string $value
* @param string $hashedValue
- * @param array $options
+ * @param array $options
* @return bool
*/
public function check($value, $hashedValue, array $options = [])
@@ -77,7 +77,7 @@ class HashManager extends Manager implements Hasher
* Check if the given hash has been hashed using the given options.
*
* @param string $hashedValue
- * @param array $options
+ * @param array $options
* @return bool
*/
public function needsRehash($hashedValue, array $options = [])
@@ -92,6 +92,6 @@ class HashManager extends Manager implements Hasher
*/
public function getDefaultDriver()
{
- return $this->app['config']['hashing.driver'] ?? 'bcrypt';
+ return $this->config->get('hashing.driver', 'bcrypt');
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Hashing/HashServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Hashing/HashServiceProvider.php
index 123b25fa8..2ed56a428 100755
--- a/vendor/laravel/framework/src/Illuminate/Hashing/HashServiceProvider.php
+++ b/vendor/laravel/framework/src/Illuminate/Hashing/HashServiceProvider.php
@@ -2,8 +2,8 @@
namespace Illuminate\Hashing;
-use Illuminate\Support\ServiceProvider;
use Illuminate\Contracts\Support\DeferrableProvider;
+use Illuminate\Support\ServiceProvider;
class HashServiceProvider extends ServiceProvider implements DeferrableProvider
{
diff --git a/vendor/laravel/framework/src/Illuminate/Hashing/composer.json b/vendor/laravel/framework/src/Illuminate/Hashing/composer.json
index 4da36baad..c264eb493 100755
--- a/vendor/laravel/framework/src/Illuminate/Hashing/composer.json
+++ b/vendor/laravel/framework/src/Illuminate/Hashing/composer.json
@@ -14,9 +14,9 @@
}
],
"require": {
- "php": "^7.1.3",
- "illuminate/contracts": "5.8.*",
- "illuminate/support": "5.8.*"
+ "php": "^7.2.5|^8.0",
+ "illuminate/contracts": "^7.0",
+ "illuminate/support": "^7.0"
},
"autoload": {
"psr-4": {
@@ -25,7 +25,7 @@
},
"extra": {
"branch-alias": {
- "dev-master": "5.8-dev"
+ "dev-master": "7.x-dev"
}
},
"config": {
diff --git a/vendor/laravel/framework/src/Illuminate/Http/Client/ConnectionException.php b/vendor/laravel/framework/src/Illuminate/Http/Client/ConnectionException.php
new file mode 100644
index 000000000..eac85dc71
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Http/Client/ConnectionException.php
@@ -0,0 +1,8 @@
+stubCallbacks = collect();
+ }
+
+ /**
+ * Create a new response instance for use during stubbing.
+ *
+ * @param array|string $body
+ * @param int $status
+ * @param array $headers
+ * @return \GuzzleHttp\Promise\PromiseInterface
+ */
+ public static function response($body = null, $status = 200, $headers = [])
+ {
+ if (is_array($body)) {
+ $body = json_encode($body);
+
+ $headers['Content-Type'] = 'application/json';
+ }
+
+ return promise_for(new Psr7Response($status, $headers, $body));
+ }
+
+ /**
+ * Get an invokable object that returns a sequence of responses in order for use during stubbing.
+ *
+ * @param array $responses
+ * @return \Illuminate\Http\Client\ResponseSequence
+ */
+ public function sequence(array $responses = [])
+ {
+ return $this->responseSequences[] = new ResponseSequence($responses);
+ }
+
+ /**
+ * Register a stub callable that will intercept requests and be able to return stub responses.
+ *
+ * @param callable|array $callback
+ * @return $this
+ */
+ public function fake($callback = null)
+ {
+ $this->record();
+
+ if (is_null($callback)) {
+ $callback = function () {
+ return static::response();
+ };
+ }
+
+ if (is_array($callback)) {
+ foreach ($callback as $url => $callable) {
+ $this->stubUrl($url, $callable);
+ }
+
+ return $this;
+ }
+
+ $this->stubCallbacks = $this->stubCallbacks->merge(collect([
+ $callback instanceof Closure
+ ? $callback
+ : function () use ($callback) {
+ return $callback;
+ },
+ ]));
+
+ return $this;
+ }
+
+ /**
+ * Register a response sequence for the given URL pattern.
+ *
+ * @param string $url
+ * @return \Illuminate\Http\Client\ResponseSequence
+ */
+ public function fakeSequence($url = '*')
+ {
+ return tap($this->sequence(), function ($sequence) use ($url) {
+ $this->fake([$url => $sequence]);
+ });
+ }
+
+ /**
+ * Stub the given URL using the given callback.
+ *
+ * @param string $url
+ * @param \Illuminate\Http\Client\Response|\GuzzleHttp\Promise\PromiseInterface|callable $callback
+ * @return $this
+ */
+ public function stubUrl($url, $callback)
+ {
+ return $this->fake(function ($request, $options) use ($url, $callback) {
+ if (! Str::is(Str::start($url, '*'), $request->url())) {
+ return;
+ }
+
+ return $callback instanceof Closure || $callback instanceof ResponseSequence
+ ? $callback($request, $options)
+ : $callback;
+ });
+ }
+
+ /**
+ * Begin recording request / response pairs.
+ *
+ * @return $this
+ */
+ protected function record()
+ {
+ $this->recording = true;
+
+ return $this;
+ }
+
+ /**
+ * Record a request response pair.
+ *
+ * @param \Illuminate\Http\Client\Request $request
+ * @param \Illuminate\Http\Client\Response $response
+ * @return void
+ */
+ public function recordRequestResponsePair($request, $response)
+ {
+ if ($this->recording) {
+ $this->recorded[] = [$request, $response];
+ }
+ }
+
+ /**
+ * Assert that a request / response pair was recorded matching a given truth test.
+ *
+ * @param callable $callback
+ * @return void
+ */
+ public function assertSent($callback)
+ {
+ PHPUnit::assertTrue(
+ $this->recorded($callback)->count() > 0,
+ 'An expected request was not recorded.'
+ );
+ }
+
+ /**
+ * Assert that a request / response pair was not recorded matching a given truth test.
+ *
+ * @param callable $callback
+ * @return void
+ */
+ public function assertNotSent($callback)
+ {
+ PHPUnit::assertFalse(
+ $this->recorded($callback)->count() > 0,
+ 'Unexpected request was recorded.'
+ );
+ }
+
+ /**
+ * Assert that no request / response pair was recorded.
+ *
+ * @return void
+ */
+ public function assertNothingSent()
+ {
+ PHPUnit::assertEmpty(
+ $this->recorded,
+ 'Requests were recorded.'
+ );
+ }
+
+ /**
+ * Assert how many requests have been recorded.
+ *
+ * @param int $count
+ * @return void
+ */
+ public function assertSentCount($count)
+ {
+ PHPUnit::assertCount($count, $this->recorded);
+ }
+
+ /**
+ * Assert that every created response sequence is empty.
+ *
+ * @return void
+ */
+ public function assertSequencesAreEmpty()
+ {
+ foreach ($this->responseSequences as $responseSequence) {
+ PHPUnit::assertTrue(
+ $responseSequence->isEmpty(),
+ 'Not all response sequences are empty.'
+ );
+ }
+ }
+
+ /**
+ * Get a collection of the request / response pairs matching the given truth test.
+ *
+ * @param callable $callback
+ * @return \Illuminate\Support\Collection
+ */
+ public function recorded($callback)
+ {
+ if (empty($this->recorded)) {
+ return collect();
+ }
+
+ $callback = $callback ?: function () {
+ return true;
+ };
+
+ return collect($this->recorded)->filter(function ($pair) use ($callback) {
+ return $callback($pair[0], $pair[1]);
+ });
+ }
+
+ /**
+ * Execute a method against a new pending request instance.
+ *
+ * @param string $method
+ * @param array $parameters
+ * @return mixed
+ */
+ public function __call($method, $parameters)
+ {
+ if (static::hasMacro($method)) {
+ return $this->macroCall($method, $parameters);
+ }
+
+ return tap(new PendingRequest($this), function ($request) {
+ $request->stub($this->stubCallbacks);
+ })->{$method}(...$parameters);
+ }
+}
diff --git a/vendor/laravel/framework/src/Illuminate/Http/Client/HttpClientException.php b/vendor/laravel/framework/src/Illuminate/Http/Client/HttpClientException.php
new file mode 100644
index 000000000..b15b8d30f
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Http/Client/HttpClientException.php
@@ -0,0 +1,10 @@
+factory = $factory;
+ $this->middleware = new Collection;
+
+ $this->asJson();
+
+ $this->options = [
+ 'http_errors' => false,
+ ];
+
+ $this->beforeSendingCallbacks = collect([function (Request $request, array $options) {
+ $this->cookies = $options['cookies'];
+ }]);
+ }
+
+ /**
+ * Set the base URL for the pending request.
+ *
+ * @param string $url
+ * @return $this
+ */
+ public function baseUrl(string $url)
+ {
+ $this->baseUrl = $url;
+
+ return $this;
+ }
+
+ /**
+ * Attach a raw body to the request.
+ *
+ * @param resource|string $content
+ * @param string $contentType
+ * @return $this
+ */
+ public function withBody($content, $contentType)
+ {
+ $this->bodyFormat('body');
+
+ $this->pendingBody = $content;
+
+ $this->contentType($contentType);
+
+ return $this;
+ }
+
+ /**
+ * Indicate the request contains JSON.
+ *
+ * @return $this
+ */
+ public function asJson()
+ {
+ return $this->bodyFormat('json')->contentType('application/json');
+ }
+
+ /**
+ * Indicate the request contains form parameters.
+ *
+ * @return $this
+ */
+ public function asForm()
+ {
+ return $this->bodyFormat('form_params')->contentType('application/x-www-form-urlencoded');
+ }
+
+ /**
+ * Attach a file to the request.
+ *
+ * @param string $name
+ * @param string $contents
+ * @param string|null $filename
+ * @param array $headers
+ * @return $this
+ */
+ public function attach($name, $contents, $filename = null, array $headers = [])
+ {
+ $this->asMultipart();
+
+ $this->pendingFiles[] = array_filter([
+ 'name' => $name,
+ 'contents' => $contents,
+ 'headers' => $headers,
+ 'filename' => $filename,
+ ]);
+
+ return $this;
+ }
+
+ /**
+ * Indicate the request is a multi-part form request.
+ *
+ * @return $this
+ */
+ public function asMultipart()
+ {
+ return $this->bodyFormat('multipart');
+ }
+
+ /**
+ * Specify the body format of the request.
+ *
+ * @param string $format
+ * @return $this
+ */
+ public function bodyFormat(string $format)
+ {
+ return tap($this, function ($request) use ($format) {
+ $this->bodyFormat = $format;
+ });
+ }
+
+ /**
+ * Specify the request's content type.
+ *
+ * @param string $contentType
+ * @return $this
+ */
+ public function contentType(string $contentType)
+ {
+ return $this->withHeaders(['Content-Type' => $contentType]);
+ }
+
+ /**
+ * Indicate that JSON should be returned by the server.
+ *
+ * @return $this
+ */
+ public function acceptJson()
+ {
+ return $this->accept('application/json');
+ }
+
+ /**
+ * Indicate the type of content that should be returned by the server.
+ *
+ * @param string $contentType
+ * @return $this
+ */
+ public function accept($contentType)
+ {
+ return $this->withHeaders(['Accept' => $contentType]);
+ }
+
+ /**
+ * Add the given headers to the request.
+ *
+ * @param array $headers
+ * @return $this
+ */
+ public function withHeaders(array $headers)
+ {
+ return tap($this, function ($request) use ($headers) {
+ return $this->options = array_merge_recursive($this->options, [
+ 'headers' => $headers,
+ ]);
+ });
+ }
+
+ /**
+ * Specify the basic authentication username and password for the request.
+ *
+ * @param string $username
+ * @param string $password
+ * @return $this
+ */
+ public function withBasicAuth(string $username, string $password)
+ {
+ return tap($this, function ($request) use ($username, $password) {
+ return $this->options['auth'] = [$username, $password];
+ });
+ }
+
+ /**
+ * Specify the digest authentication username and password for the request.
+ *
+ * @param string $username
+ * @param string $password
+ * @return $this
+ */
+ public function withDigestAuth($username, $password)
+ {
+ return tap($this, function ($request) use ($username, $password) {
+ return $this->options['auth'] = [$username, $password, 'digest'];
+ });
+ }
+
+ /**
+ * Specify an authorization token for the request.
+ *
+ * @param string $token
+ * @param string $type
+ * @return $this
+ */
+ public function withToken($token, $type = 'Bearer')
+ {
+ return tap($this, function ($request) use ($token, $type) {
+ return $this->options['headers']['Authorization'] = trim($type.' '.$token);
+ });
+ }
+
+ /**
+ * Specify the cookies that should be included with the request.
+ *
+ * @param array $cookies
+ * @param string $domain
+ * @return $this
+ */
+ public function withCookies(array $cookies, string $domain)
+ {
+ return tap($this, function ($request) use ($cookies, $domain) {
+ return $this->options = array_merge_recursive($this->options, [
+ 'cookies' => CookieJar::fromArray($cookies, $domain),
+ ]);
+ });
+ }
+
+ /**
+ * Indicate that redirects should not be followed.
+ *
+ * @return $this
+ */
+ public function withoutRedirecting()
+ {
+ return tap($this, function ($request) {
+ return $this->options['allow_redirects'] = false;
+ });
+ }
+
+ /**
+ * Indicate that TLS certificates should not be verified.
+ *
+ * @return $this
+ */
+ public function withoutVerifying()
+ {
+ return tap($this, function ($request) {
+ return $this->options['verify'] = false;
+ });
+ }
+
+ /**
+ * Specify the path where the body of the response should be stored.
+ *
+ * @param string|resource $to
+ * @return $this
+ */
+ public function sink($to)
+ {
+ return tap($this, function ($request) use ($to) {
+ return $this->options['sink'] = $to;
+ });
+ }
+
+ /**
+ * Specify the timeout (in seconds) for the request.
+ *
+ * @param int $seconds
+ * @return $this
+ */
+ public function timeout(int $seconds)
+ {
+ return tap($this, function () use ($seconds) {
+ $this->options['timeout'] = $seconds;
+ });
+ }
+
+ /**
+ * Specify the number of times the request should be attempted.
+ *
+ * @param int $times
+ * @param int $sleep
+ * @return $this
+ */
+ public function retry(int $times, int $sleep = 0)
+ {
+ $this->tries = $times;
+ $this->retryDelay = $sleep;
+
+ return $this;
+ }
+
+ /**
+ * Merge new options into the client.
+ *
+ * @param array $options
+ * @return $this
+ */
+ public function withOptions(array $options)
+ {
+ return tap($this, function ($request) use ($options) {
+ return $this->options = array_merge_recursive($this->options, $options);
+ });
+ }
+
+ /**
+ * Add new middleware the client handler stack.
+ *
+ * @param callable $middleware
+ * @return $this
+ */
+ public function withMiddleware(callable $middleware)
+ {
+ $this->middleware->push($middleware);
+
+ return $this;
+ }
+
+ /**
+ * Add a new "before sending" callback to the request.
+ *
+ * @param callable $callback
+ * @return $this
+ */
+ public function beforeSending($callback)
+ {
+ return tap($this, function () use ($callback) {
+ $this->beforeSendingCallbacks[] = $callback;
+ });
+ }
+
+ /**
+ * Issue a GET request to the given URL.
+ *
+ * @param string $url
+ * @param array|string|null $query
+ * @return \Illuminate\Http\Client\Response
+ */
+ public function get(string $url, $query = null)
+ {
+ return $this->send('GET', $url, [
+ 'query' => $query,
+ ]);
+ }
+
+ /**
+ * Issue a HEAD request to the given URL.
+ *
+ * @param string $url
+ * @param array|string|null $query
+ * @return \Illuminate\Http\Client\Response
+ */
+ public function head(string $url, $query = null)
+ {
+ return $this->send('HEAD', $url, [
+ 'query' => $query,
+ ]);
+ }
+
+ /**
+ * Issue a POST request to the given URL.
+ *
+ * @param string $url
+ * @param array $data
+ * @return \Illuminate\Http\Client\Response
+ */
+ public function post(string $url, array $data = [])
+ {
+ return $this->send('POST', $url, [
+ $this->bodyFormat => $data,
+ ]);
+ }
+
+ /**
+ * Issue a PATCH request to the given URL.
+ *
+ * @param string $url
+ * @param array $data
+ * @return \Illuminate\Http\Client\Response
+ */
+ public function patch($url, $data = [])
+ {
+ return $this->send('PATCH', $url, [
+ $this->bodyFormat => $data,
+ ]);
+ }
+
+ /**
+ * Issue a PUT request to the given URL.
+ *
+ * @param string $url
+ * @param array $data
+ * @return \Illuminate\Http\Client\Response
+ */
+ public function put($url, $data = [])
+ {
+ return $this->send('PUT', $url, [
+ $this->bodyFormat => $data,
+ ]);
+ }
+
+ /**
+ * Issue a DELETE request to the given URL.
+ *
+ * @param string $url
+ * @param array $data
+ * @return \Illuminate\Http\Client\Response
+ */
+ public function delete($url, $data = [])
+ {
+ return $this->send('DELETE', $url, empty($data) ? [] : [
+ $this->bodyFormat => $data,
+ ]);
+ }
+
+ /**
+ * Send the request to the given URL.
+ *
+ * @param string $method
+ * @param string $url
+ * @param array $options
+ * @return \Illuminate\Http\Client\Response
+ *
+ * @throws \Exception
+ */
+ public function send(string $method, string $url, array $options = [])
+ {
+ $url = ltrim(rtrim($this->baseUrl, '/').'/'.ltrim($url, '/'), '/');
+
+ if (isset($options[$this->bodyFormat])) {
+ if ($this->bodyFormat === 'multipart') {
+ $options[$this->bodyFormat] = $this->parseMultipartBodyFormat($options[$this->bodyFormat]);
+ } elseif ($this->bodyFormat === 'body') {
+ $options[$this->bodyFormat] = $this->pendingBody;
+ }
+
+ if (is_array($options[$this->bodyFormat])) {
+ $options[$this->bodyFormat] = array_merge(
+ $options[$this->bodyFormat], $this->pendingFiles
+ );
+ }
+ }
+
+ [$this->pendingBody, $this->pendingFiles] = [null, []];
+
+ return retry($this->tries ?? 1, function () use ($method, $url, $options) {
+ try {
+ $laravelData = $this->parseRequestData($method, $url, $options);
+
+ return tap(new Response($this->buildClient()->request($method, $url, $this->mergeOptions([
+ 'laravel_data' => $laravelData,
+ 'on_stats' => function ($transferStats) {
+ $this->transferStats = $transferStats;
+ },
+ ], $options))), function ($response) {
+ $response->cookies = $this->cookies;
+ $response->transferStats = $this->transferStats;
+
+ if ($this->tries > 1 && ! $response->successful()) {
+ $response->throw();
+ }
+ });
+ } catch (ConnectException $e) {
+ throw new ConnectionException($e->getMessage(), 0, $e);
+ }
+ }, $this->retryDelay ?? 100);
+ }
+
+ /**
+ * Parse multi-part form data.
+ *
+ * @param array $data
+ * @return array|array[]
+ */
+ protected function parseMultipartBodyFormat(array $data)
+ {
+ return collect($data)->map(function ($value, $key) {
+ return is_array($value) ? $value : ['name' => $key, 'contents' => $value];
+ })->values()->all();
+ }
+
+ /**
+ * Get the request data as an array so that we can attach it to the request for convenient assertions.
+ *
+ * @param string $method
+ * @param string $url
+ * @param array $options
+ * @return array
+ */
+ protected function parseRequestData($method, $url, array $options)
+ {
+ $laravelData = $options[$this->bodyFormat] ?? $options['query'] ?? [];
+
+ $urlString = Str::of($url);
+
+ if (empty($laravelData) && $method === 'GET' && $urlString->contains('?')) {
+ $laravelData = (string) $urlString->after('?');
+ }
+
+ if (is_string($laravelData)) {
+ parse_str($laravelData, $parsedData);
+
+ $laravelData = is_array($parsedData) ? $parsedData : [];
+ }
+
+ return $laravelData;
+ }
+
+ /**
+ * Build the Guzzle client.
+ *
+ * @return \GuzzleHttp\Client
+ */
+ public function buildClient()
+ {
+ return new Client([
+ 'handler' => $this->buildHandlerStack(),
+ 'cookies' => true,
+ ]);
+ }
+
+ /**
+ * Build the before sending handler stack.
+ *
+ * @return \GuzzleHttp\HandlerStack
+ */
+ public function buildHandlerStack()
+ {
+ return tap(HandlerStack::create(), function ($stack) {
+ $stack->push($this->buildBeforeSendingHandler());
+ $stack->push($this->buildRecorderHandler());
+ $stack->push($this->buildStubHandler());
+
+ $this->middleware->each(function ($middleware) use ($stack) {
+ $stack->push($middleware);
+ });
+ });
+ }
+
+ /**
+ * Build the before sending handler.
+ *
+ * @return \Closure
+ */
+ public function buildBeforeSendingHandler()
+ {
+ return function ($handler) {
+ return function ($request, $options) use ($handler) {
+ return $handler($this->runBeforeSendingCallbacks($request, $options), $options);
+ };
+ };
+ }
+
+ /**
+ * Build the recorder handler.
+ *
+ * @return \Closure
+ */
+ public function buildRecorderHandler()
+ {
+ return function ($handler) {
+ return function ($request, $options) use ($handler) {
+ $promise = $handler($this->runBeforeSendingCallbacks($request, $options), $options);
+
+ return $promise->then(function ($response) use ($request, $options) {
+ optional($this->factory)->recordRequestResponsePair(
+ (new Request($request))->withData($options['laravel_data']),
+ new Response($response)
+ );
+
+ return $response;
+ });
+ };
+ };
+ }
+
+ /**
+ * Build the stub handler.
+ *
+ * @return \Closure
+ */
+ public function buildStubHandler()
+ {
+ return function ($handler) {
+ return function ($request, $options) use ($handler) {
+ $response = ($this->stubCallbacks ?? collect())
+ ->map
+ ->__invoke((new Request($request))->withData($options['laravel_data']), $options)
+ ->filter()
+ ->first();
+
+ if (is_null($response)) {
+ return $handler($request, $options);
+ }
+
+ $response = is_array($response) ? Factory::response($response) : $response;
+
+ $sink = $options['sink'] ?? null;
+
+ if ($sink) {
+ $response->then($this->sinkStubHandler($sink));
+ }
+
+ return $response;
+ };
+ };
+ }
+
+ /**
+ * Get the sink stub handler callback.
+ *
+ * @param string $sink
+ * @return \Closure
+ */
+ protected function sinkStubHandler($sink)
+ {
+ return function ($response) use ($sink) {
+ $body = $response->getBody()->getContents();
+
+ if (is_string($sink)) {
+ file_put_contents($sink, $body);
+
+ return;
+ }
+
+ fwrite($sink, $body);
+ rewind($sink);
+ };
+ }
+
+ /**
+ * Execute the "before sending" callbacks.
+ *
+ * @param \GuzzleHttp\Psr7\RequestInterface $request
+ * @param array $options
+ * @return \Closure
+ */
+ public function runBeforeSendingCallbacks($request, array $options)
+ {
+ return tap($request, function ($request) use ($options) {
+ $this->beforeSendingCallbacks->each->__invoke(
+ (new Request($request))->withData($options['laravel_data']),
+ $options
+ );
+ });
+ }
+
+ /**
+ * Merge the given options with the current request options.
+ *
+ * @param array $options
+ * @return array
+ */
+ public function mergeOptions(...$options)
+ {
+ return array_merge_recursive($this->options, ...$options);
+ }
+
+ /**
+ * Register a stub callable that will intercept requests and be able to return stub responses.
+ *
+ * @param callable $callback
+ * @return $this
+ */
+ public function stub($callback)
+ {
+ $this->stubCallbacks = collect($callback);
+
+ return $this;
+ }
+}
diff --git a/vendor/laravel/framework/src/Illuminate/Http/Client/Request.php b/vendor/laravel/framework/src/Illuminate/Http/Client/Request.php
new file mode 100644
index 000000000..6cea5fb00
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Http/Client/Request.php
@@ -0,0 +1,305 @@
+request = $request;
+ }
+
+ /**
+ * Get the request method.
+ *
+ * @return string
+ */
+ public function method()
+ {
+ return $this->request->getMethod();
+ }
+
+ /**
+ * Get the URL of the request.
+ *
+ * @return string
+ */
+ public function url()
+ {
+ return (string) $this->request->getUri();
+ }
+
+ /**
+ * Determine if the request has a given header.
+ *
+ * @param string $key
+ * @param mixed $value
+ * @return bool
+ */
+ public function hasHeader($key, $value = null)
+ {
+ if (is_null($value)) {
+ return ! empty($this->request->getHeaders()[$key]);
+ }
+
+ $headers = $this->headers();
+
+ if (! Arr::has($headers, $key)) {
+ return false;
+ }
+
+ $value = is_array($value) ? $value : [$value];
+
+ return empty(array_diff($value, $headers[$key]));
+ }
+
+ /**
+ * Determine if the request has the given headers.
+ *
+ * @param array|string $headers
+ * @return bool
+ */
+ public function hasHeaders($headers)
+ {
+ if (is_string($headers)) {
+ $headers = [$headers => null];
+ }
+
+ foreach ($headers as $key => $value) {
+ if (! $this->hasHeader($key, $value)) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Get the values for the header with the given name.
+ *
+ * @param string $key
+ * @return array
+ */
+ public function header($key)
+ {
+ return Arr::get($this->headers(), $key, []);
+ }
+
+ /**
+ * Get the request headers.
+ *
+ * @return array
+ */
+ public function headers()
+ {
+ return collect($this->request->getHeaders())->mapWithKeys(function ($values, $header) {
+ return [$header => $values];
+ })->all();
+ }
+
+ /**
+ * Get the body of the request.
+ *
+ * @return string
+ */
+ public function body()
+ {
+ return (string) $this->request->getBody();
+ }
+
+ /**
+ * Determine if the request contains the given file.
+ *
+ * @param string $name
+ * @param string|null $value
+ * @param string|null $filename
+ * @return bool
+ */
+ public function hasFile($name, $value = null, $filename = null)
+ {
+ if (! $this->isMultipart()) {
+ return false;
+ }
+
+ return collect($this->data)->reject(function ($file) use ($name, $value, $filename) {
+ return $file['name'] != $name ||
+ ($value && $file['contents'] != $value) ||
+ ($filename && $file['filename'] != $filename);
+ })->count() > 0;
+ }
+
+ /**
+ * Get the request's data (form parameters or JSON).
+ *
+ * @return array
+ */
+ public function data()
+ {
+ if ($this->isForm()) {
+ return $this->parameters();
+ } elseif ($this->isJson()) {
+ return $this->json();
+ }
+
+ return $this->data ?? [];
+ }
+
+ /**
+ * Get the request's form parameters.
+ *
+ * @return array
+ */
+ protected function parameters()
+ {
+ if (! $this->data) {
+ parse_str($this->body(), $parameters);
+
+ $this->data = $parameters;
+ }
+
+ return $this->data;
+ }
+
+ /**
+ * Get the JSON decoded body of the request.
+ *
+ * @return array
+ */
+ protected function json()
+ {
+ if (! $this->data) {
+ $this->data = json_decode($this->body(), true);
+ }
+
+ return $this->data;
+ }
+
+ /**
+ * Determine if the request is simple form data.
+ *
+ * @return bool
+ */
+ public function isForm()
+ {
+ return $this->hasHeader('Content-Type', 'application/x-www-form-urlencoded');
+ }
+
+ /**
+ * Determine if the request is JSON.
+ *
+ * @return bool
+ */
+ public function isJson()
+ {
+ return $this->hasHeader('Content-Type') &&
+ Str::contains($this->header('Content-Type')[0], 'json');
+ }
+
+ /**
+ * Determine if the request is multipart.
+ *
+ * @return bool
+ */
+ public function isMultipart()
+ {
+ return $this->hasHeader('Content-Type') &&
+ Str::contains($this->header('Content-Type')[0], 'multipart');
+ }
+
+ /**
+ * Set the decoded data on the request.
+ *
+ * @param array $data
+ * @return $this
+ */
+ public function withData(array $data)
+ {
+ $this->data = $data;
+
+ return $this;
+ }
+
+ /**
+ * Get the underlying PSR compliant request instance.
+ *
+ * @return \Psr\Http\Message\RequestInterface
+ */
+ public function toPsrRequest()
+ {
+ return $this->request;
+ }
+
+ /**
+ * Determine if the given offset exists.
+ *
+ * @param string $offset
+ * @return bool
+ */
+ public function offsetExists($offset)
+ {
+ return isset($this->data()[$offset]);
+ }
+
+ /**
+ * Get the value for a given offset.
+ *
+ * @param string $offset
+ * @return mixed
+ */
+ public function offsetGet($offset)
+ {
+ return $this->data()[$offset];
+ }
+
+ /**
+ * Set the value at the given offset.
+ *
+ * @param string $offset
+ * @param mixed $value
+ * @return void
+ *
+ * @throws \LogicException
+ */
+ public function offsetSet($offset, $value)
+ {
+ throw new LogicException('Request data may not be mutated using array access.');
+ }
+
+ /**
+ * Unset the value at the given offset.
+ *
+ * @param string $offset
+ * @return void
+ *
+ * @throws \LogicException
+ */
+ public function offsetUnset($offset)
+ {
+ throw new LogicException('Request data may not be mutated using array access.');
+ }
+}
diff --git a/vendor/laravel/framework/src/Illuminate/Http/Client/RequestException.php b/vendor/laravel/framework/src/Illuminate/Http/Client/RequestException.php
new file mode 100644
index 000000000..09909db7e
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Http/Client/RequestException.php
@@ -0,0 +1,26 @@
+status()}.", $response->status());
+
+ $this->response = $response;
+ }
+}
diff --git a/vendor/laravel/framework/src/Illuminate/Http/Client/Response.php b/vendor/laravel/framework/src/Illuminate/Http/Client/Response.php
new file mode 100644
index 000000000..991705d96
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Http/Client/Response.php
@@ -0,0 +1,285 @@
+response = $response;
+ }
+
+ /**
+ * Get the body of the response.
+ *
+ * @return string
+ */
+ public function body()
+ {
+ return (string) $this->response->getBody();
+ }
+
+ /**
+ * Get the JSON decoded body of the response as an array or scalar value.
+ *
+ * @return mixed
+ */
+ public function json()
+ {
+ if (! $this->decoded) {
+ $this->decoded = json_decode($this->body(), true);
+ }
+
+ return $this->decoded;
+ }
+
+ /**
+ * Get the JSON decoded body of the response as an object.
+ *
+ * @return object
+ */
+ public function object()
+ {
+ return json_decode($this->body(), false);
+ }
+
+ /**
+ * Get a header from the response.
+ *
+ * @param string $header
+ * @return string
+ */
+ public function header(string $header)
+ {
+ return $this->response->getHeaderLine($header);
+ }
+
+ /**
+ * Get the headers from the response.
+ *
+ * @return array
+ */
+ public function headers()
+ {
+ return collect($this->response->getHeaders())->mapWithKeys(function ($v, $k) {
+ return [$k => $v];
+ })->all();
+ }
+
+ /**
+ * Get the status code of the response.
+ *
+ * @return int
+ */
+ public function status()
+ {
+ return (int) $this->response->getStatusCode();
+ }
+
+ /**
+ * Get the effective URI of the response.
+ *
+ * @return \Psr\Http\Message\UriInterface
+ */
+ public function effectiveUri()
+ {
+ return $this->transferStats->getEffectiveUri();
+ }
+
+ /**
+ * Determine if the request was successful.
+ *
+ * @return bool
+ */
+ public function successful()
+ {
+ return $this->status() >= 200 && $this->status() < 300;
+ }
+
+ /**
+ * Determine if the response code was "OK".
+ *
+ * @return bool
+ */
+ public function ok()
+ {
+ return $this->status() === 200;
+ }
+
+ /**
+ * Determine if the response was a redirect.
+ *
+ * @return bool
+ */
+ public function redirect()
+ {
+ return $this->status() >= 300 && $this->status() < 400;
+ }
+
+ /**
+ * Determine if the response indicates a client or server error occurred.
+ *
+ * @return bool
+ */
+ public function failed()
+ {
+ return $this->serverError() || $this->clientError();
+ }
+
+ /**
+ * Determine if the response indicates a client error occurred.
+ *
+ * @return bool
+ */
+ public function clientError()
+ {
+ return $this->status() >= 400 && $this->status() < 500;
+ }
+
+ /**
+ * Determine if the response indicates a server error occurred.
+ *
+ * @return bool
+ */
+ public function serverError()
+ {
+ return $this->status() >= 500;
+ }
+
+ /**
+ * Get the response cookies.
+ *
+ * @return \GuzzleHttp\Cookie\CookieJar
+ */
+ public function cookies()
+ {
+ return $this->cookies;
+ }
+
+ /**
+ * Get the underlying PSR response for the response.
+ *
+ * @return \Psr\Http\Message\ResponseInterface
+ */
+ public function toPsrResponse()
+ {
+ return $this->response;
+ }
+
+ /**
+ * Throw an exception if a server or client error occurred.
+ *
+ * @return $this
+ *
+ * @throws \Illuminate\Http\Client\RequestException
+ */
+ public function throw()
+ {
+ if ($this->serverError() || $this->clientError()) {
+ throw new RequestException($this);
+ }
+
+ return $this;
+ }
+
+ /**
+ * Determine if the given offset exists.
+ *
+ * @param string $offset
+ * @return bool
+ */
+ public function offsetExists($offset)
+ {
+ return isset($this->json()[$offset]);
+ }
+
+ /**
+ * Get the value for a given offset.
+ *
+ * @param string $offset
+ * @return mixed
+ */
+ public function offsetGet($offset)
+ {
+ return $this->json()[$offset];
+ }
+
+ /**
+ * Set the value at the given offset.
+ *
+ * @param string $offset
+ * @param mixed $value
+ * @return void
+ *
+ * @throws \LogicException
+ */
+ public function offsetSet($offset, $value)
+ {
+ throw new LogicException('Response data may not be mutated using array access.');
+ }
+
+ /**
+ * Unset the value at the given offset.
+ *
+ * @param string $offset
+ * @return void
+ *
+ * @throws \LogicException
+ */
+ public function offsetUnset($offset)
+ {
+ throw new LogicException('Response data may not be mutated using array access.');
+ }
+
+ /**
+ * Get the body of the response.
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ return $this->body();
+ }
+
+ /**
+ * Dynamically proxy other methods to the underlying response.
+ *
+ * @param string $method
+ * @param array $parameters
+ * @return mixed
+ */
+ public function __call($method, $parameters)
+ {
+ return static::hasMacro($method)
+ ? $this->macroCall($method, $parameters)
+ : $this->response->{$method}(...$parameters);
+ }
+}
diff --git a/vendor/laravel/framework/src/Illuminate/Http/Client/ResponseSequence.php b/vendor/laravel/framework/src/Illuminate/Http/Client/ResponseSequence.php
new file mode 100644
index 000000000..66d0ec6bb
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Http/Client/ResponseSequence.php
@@ -0,0 +1,153 @@
+responses = $responses;
+ }
+
+ /**
+ * Push a response to the sequence.
+ *
+ * @param string|array $body
+ * @param int $status
+ * @param array $headers
+ * @return $this
+ */
+ public function push($body = '', int $status = 200, array $headers = [])
+ {
+ $body = is_array($body) ? json_encode($body) : $body;
+
+ return $this->pushResponse(
+ Factory::response($body, $status, $headers)
+ );
+ }
+
+ /**
+ * Push a response with the given status code to the sequence.
+ *
+ * @param int $status
+ * @param array $headers
+ * @return $this
+ */
+ public function pushStatus(int $status, array $headers = [])
+ {
+ return $this->pushResponse(
+ Factory::response('', $status, $headers)
+ );
+ }
+
+ /**
+ * Push response with the contents of a file as the body to the sequence.
+ *
+ * @param string $filePath
+ * @param int $status
+ * @param array $headers
+ * @return $this
+ */
+ public function pushFile(string $filePath, int $status = 200, array $headers = [])
+ {
+ $string = file_get_contents($filePath);
+
+ return $this->pushResponse(
+ Factory::response($string, $status, $headers)
+ );
+ }
+
+ /**
+ * Push a response to the sequence.
+ *
+ * @param mixed $response
+ * @return $this
+ */
+ public function pushResponse($response)
+ {
+ $this->responses[] = $response;
+
+ return $this;
+ }
+
+ /**
+ * Make the sequence return a default response when it is empty.
+ *
+ * @param \GuzzleHttp\Promise\PromiseInterface|\Closure $response
+ * @return $this
+ */
+ public function whenEmpty($response)
+ {
+ $this->failWhenEmpty = false;
+ $this->emptyResponse = $response;
+
+ return $this;
+ }
+
+ /**
+ * Make the sequence return a default response when it is empty.
+ *
+ * @return $this
+ */
+ public function dontFailWhenEmpty()
+ {
+ return $this->whenEmpty(Factory::response());
+ }
+
+ /**
+ * Indicate that this sequence has depleted all of its responses.
+ *
+ * @return bool
+ */
+ public function isEmpty()
+ {
+ return count($this->responses) === 0;
+ }
+
+ /**
+ * Get the next response in the sequence.
+ *
+ * @return mixed
+ */
+ public function __invoke()
+ {
+ if ($this->failWhenEmpty && count($this->responses) === 0) {
+ throw new OutOfBoundsException('A request was made, but the response sequence is empty.');
+ }
+
+ if (! $this->failWhenEmpty && count($this->responses) === 0) {
+ return value($this->emptyResponse ?? Factory::response());
+ }
+
+ return array_shift($this->responses);
+ }
+}
diff --git a/vendor/laravel/framework/src/Illuminate/Http/Concerns/InteractsWithInput.php b/vendor/laravel/framework/src/Illuminate/Http/Concerns/InteractsWithInput.php
index 3b8762672..4550271b0 100644
--- a/vendor/laravel/framework/src/Illuminate/Http/Concerns/InteractsWithInput.php
+++ b/vendor/laravel/framework/src/Illuminate/Http/Concerns/InteractsWithInput.php
@@ -2,11 +2,11 @@
namespace Illuminate\Http\Concerns;
-use stdClass;
-use SplFileInfo;
+use Illuminate\Http\UploadedFile;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
-use Illuminate\Http\UploadedFile;
+use SplFileInfo;
+use stdClass;
trait InteractsWithInput
{
@@ -103,13 +103,23 @@ trait InteractsWithInput
$input = $this->all();
- foreach ($keys as $key) {
- if (Arr::has($input, $key)) {
- return true;
- }
+ return Arr::hasAny($input, $keys);
+ }
+
+ /**
+ * Apply the callback if the request contains the given input item key.
+ *
+ * @param string $key
+ * @param callable $callback
+ * @return $this|mixed
+ */
+ public function whenHas($key, callable $callback)
+ {
+ if ($this->has($key)) {
+ return $callback(data_get($this->all(), $key)) ?: $this;
}
- return false;
+ return $this;
}
/**
@@ -131,6 +141,25 @@ trait InteractsWithInput
return true;
}
+ /**
+ * Determine if the request contains an empty value for an input item.
+ *
+ * @param string|array $key
+ * @return bool
+ */
+ public function isNotFilled($key)
+ {
+ $keys = is_array($key) ? $key : func_get_args();
+
+ foreach ($keys as $value) {
+ if (! $this->isEmptyString($value)) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
/**
* Determine if the request contains a non-empty value for any of the given inputs.
*
@@ -150,6 +179,35 @@ trait InteractsWithInput
return false;
}
+ /**
+ * Apply the callback if the request contains a non-empty value for the given input item key.
+ *
+ * @param string $key
+ * @param callable $callback
+ * @return $this|mixed
+ */
+ public function whenFilled($key, callable $callback)
+ {
+ if ($this->filled($key)) {
+ return $callback(data_get($this->all(), $key)) ?: $this;
+ }
+
+ return $this;
+ }
+
+ /**
+ * Determine if the request is missing a given input item key.
+ *
+ * @param string|array $key
+ * @return bool
+ */
+ public function missing($key)
+ {
+ $keys = is_array($key) ? $key : func_get_args();
+
+ return ! $this->has($keys);
+ }
+
/**
* Determine if the given input key is an empty string for "has".
*
@@ -200,8 +258,8 @@ trait InteractsWithInput
* Retrieve an input item from the request.
*
* @param string|null $key
- * @param string|array|null $default
- * @return string|array|null
+ * @param mixed $default
+ * @return mixed
*/
public function input($key = null, $default = null)
{
@@ -210,6 +268,20 @@ trait InteractsWithInput
);
}
+ /**
+ * Retrieve input as a boolean value.
+ *
+ * Returns true when value is "1", "true", "on", and "yes". Otherwise, returns false.
+ *
+ * @param string|null $key
+ * @param bool $default
+ * @return bool
+ */
+ public function boolean($key = null, $default = false)
+ {
+ return filter_var($this->input($key, $default), FILTER_VALIDATE_BOOLEAN);
+ }
+
/**
* Get a subset containing the provided keys with values from the input data.
*
diff --git a/vendor/laravel/framework/src/Illuminate/Http/Exceptions/PostTooLargeException.php b/vendor/laravel/framework/src/Illuminate/Http/Exceptions/PostTooLargeException.php
index 640b8ec74..75f6cdde3 100644
--- a/vendor/laravel/framework/src/Illuminate/Http/Exceptions/PostTooLargeException.php
+++ b/vendor/laravel/framework/src/Illuminate/Http/Exceptions/PostTooLargeException.php
@@ -2,21 +2,21 @@
namespace Illuminate\Http\Exceptions;
-use Exception;
use Symfony\Component\HttpKernel\Exception\HttpException;
+use Throwable;
class PostTooLargeException extends HttpException
{
/**
- * PostTooLargeException constructor.
+ * Create a new "post too large" exception instance.
*
* @param string|null $message
- * @param \Exception|null $previous
+ * @param \Throwable|null $previous
* @param array $headers
* @param int $code
* @return void
*/
- public function __construct($message = null, Exception $previous = null, array $headers = [], $code = 0)
+ public function __construct($message = null, Throwable $previous = null, array $headers = [], $code = 0)
{
parent::__construct(413, $message, $previous, $headers, $code);
}
diff --git a/vendor/laravel/framework/src/Illuminate/Http/Exceptions/ThrottleRequestsException.php b/vendor/laravel/framework/src/Illuminate/Http/Exceptions/ThrottleRequestsException.php
index 4f8d60876..c09393174 100644
--- a/vendor/laravel/framework/src/Illuminate/Http/Exceptions/ThrottleRequestsException.php
+++ b/vendor/laravel/framework/src/Illuminate/Http/Exceptions/ThrottleRequestsException.php
@@ -2,22 +2,22 @@
namespace Illuminate\Http\Exceptions;
-use Exception;
-use Symfony\Component\HttpKernel\Exception\HttpException;
+use Symfony\Component\HttpKernel\Exception\TooManyRequestsHttpException;
+use Throwable;
-class ThrottleRequestsException extends HttpException
+class ThrottleRequestsException extends TooManyRequestsHttpException
{
/**
- * Create a new exception instance.
+ * Create a new throttle requests exception instance.
*
* @param string|null $message
- * @param \Exception|null $previous
+ * @param \Throwable|null $previous
* @param array $headers
* @param int $code
* @return void
*/
- public function __construct($message = null, Exception $previous = null, array $headers = [], $code = 0)
+ public function __construct($message = null, Throwable $previous = null, array $headers = [], $code = 0)
{
- parent::__construct(429, $message, $previous, $headers, $code);
+ parent::__construct(null, $message, $previous, $code, $headers);
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Http/JsonResponse.php b/vendor/laravel/framework/src/Illuminate/Http/JsonResponse.php
index 9baf417b0..9f87e6c31 100755
--- a/vendor/laravel/framework/src/Illuminate/Http/JsonResponse.php
+++ b/vendor/laravel/framework/src/Illuminate/Http/JsonResponse.php
@@ -2,11 +2,11 @@
namespace Illuminate\Http;
-use JsonSerializable;
-use InvalidArgumentException;
-use Illuminate\Support\Traits\Macroable;
-use Illuminate\Contracts\Support\Jsonable;
use Illuminate\Contracts\Support\Arrayable;
+use Illuminate\Contracts\Support\Jsonable;
+use Illuminate\Support\Traits\Macroable;
+use InvalidArgumentException;
+use JsonSerializable;
use Symfony\Component\HttpFoundation\JsonResponse as BaseJsonResponse;
class JsonResponse extends BaseJsonResponse
@@ -19,9 +19,9 @@ class JsonResponse extends BaseJsonResponse
* Constructor.
*
* @param mixed $data
- * @param int $status
+ * @param int $status
* @param array $headers
- * @param int $options
+ * @param int $options
* @return void
*/
public function __construct($data = null, $status = 200, $headers = [], $options = 0)
diff --git a/vendor/laravel/framework/src/Illuminate/Http/Middleware/SetCacheHeaders.php b/vendor/laravel/framework/src/Illuminate/Http/Middleware/SetCacheHeaders.php
index fe04fe6c2..b6d964bc2 100644
--- a/vendor/laravel/framework/src/Illuminate/Http/Middleware/SetCacheHeaders.php
+++ b/vendor/laravel/framework/src/Illuminate/Http/Middleware/SetCacheHeaders.php
@@ -3,6 +3,7 @@
namespace Illuminate\Http\Middleware;
use Closure;
+use Illuminate\Support\Carbon;
class SetCacheHeaders
{
@@ -32,6 +33,14 @@ class SetCacheHeaders
$options['etag'] = md5($response->getContent());
}
+ if (isset($options['last_modified'])) {
+ if (is_numeric($options['last_modified'])) {
+ $options['last_modified'] = Carbon::createFromTimestamp($options['last_modified']);
+ } else {
+ $options['last_modified'] = Carbon::parse($options['last_modified']);
+ }
+ }
+
$response->setCache($options);
$response->isNotModified($request);
diff --git a/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustHosts.php b/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustHosts.php
new file mode 100644
index 000000000..8b563151a
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustHosts.php
@@ -0,0 +1,73 @@
+app = $app;
+ }
+
+ /**
+ * Get the host patterns that should be trusted.
+ *
+ * @return array
+ */
+ abstract public function hosts();
+
+ /**
+ * Handle the incoming request.
+ *
+ * @param \Illuminate\Http\Request $request
+ * @param callable $next
+ * @return \Illuminate\Http\Response
+ */
+ public function handle(Request $request, $next)
+ {
+ if ($this->shouldSpecifyTrustedHosts()) {
+ Request::setTrustedHosts(array_filter($this->hosts()));
+ }
+
+ return $next($request);
+ }
+
+ /**
+ * Determine if the application should specify trusted hosts.
+ *
+ * @return bool
+ */
+ protected function shouldSpecifyTrustedHosts()
+ {
+ return config('app.env') !== 'local' &&
+ ! $this->app->runningUnitTests();
+ }
+
+ /**
+ * Get a regular expression matching the application URL and all of its subdomains.
+ *
+ * @return string|null
+ */
+ protected function allSubdomainsOfApplicationUrl()
+ {
+ if ($host = parse_url($this->app['config']->get('app.url'), PHP_URL_HOST)) {
+ return '^(.+\.)?'.preg_quote($host).'$';
+ }
+ }
+}
diff --git a/vendor/laravel/framework/src/Illuminate/Http/RedirectResponse.php b/vendor/laravel/framework/src/Illuminate/Http/RedirectResponse.php
index 1a7ec144a..7f256a399 100755
--- a/vendor/laravel/framework/src/Illuminate/Http/RedirectResponse.php
+++ b/vendor/laravel/framework/src/Illuminate/Http/RedirectResponse.php
@@ -2,13 +2,13 @@
namespace Illuminate\Http;
-use Illuminate\Support\Str;
-use Illuminate\Support\MessageBag;
-use Illuminate\Support\ViewErrorBag;
-use Illuminate\Support\Traits\Macroable;
-use Illuminate\Support\Traits\ForwardsCalls;
-use Illuminate\Session\Store as SessionStore;
use Illuminate\Contracts\Support\MessageProvider;
+use Illuminate\Session\Store as SessionStore;
+use Illuminate\Support\MessageBag;
+use Illuminate\Support\Str;
+use Illuminate\Support\Traits\ForwardsCalls;
+use Illuminate\Support\Traits\Macroable;
+use Illuminate\Support\ViewErrorBag;
use Symfony\Component\HttpFoundation\File\UploadedFile as SymfonyUploadedFile;
use Symfony\Component\HttpFoundation\RedirectResponse as BaseRedirectResponse;
@@ -145,6 +145,28 @@ class RedirectResponse extends BaseRedirectResponse
return $this;
}
+ /**
+ * Add a fragment identifier to the URL.
+ *
+ * @param string $fragment
+ * @return $this
+ */
+ public function withFragment($fragment)
+ {
+ return $this->withoutFragment()
+ ->setTargetUrl($this->getTargetUrl().'#'.Str::after($fragment, '#'));
+ }
+
+ /**
+ * Remove any fragment identifier from the response URL.
+ *
+ * @return $this
+ */
+ public function withoutFragment()
+ {
+ return $this->setTargetUrl(Str::before($this->getTargetUrl(), '#'));
+ }
+
/**
* Parse the given errors into an appropriate value.
*
diff --git a/vendor/laravel/framework/src/Illuminate/Http/Request.php b/vendor/laravel/framework/src/Illuminate/Http/Request.php
index 7c289341c..cf6b90cb1 100644
--- a/vendor/laravel/framework/src/Illuminate/Http/Request.php
+++ b/vendor/laravel/framework/src/Illuminate/Http/Request.php
@@ -2,16 +2,21 @@
namespace Illuminate\Http;
-use Closure;
use ArrayAccess;
-use RuntimeException;
+use Closure;
+use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
use Illuminate\Support\Traits\Macroable;
-use Illuminate\Contracts\Support\Arrayable;
+use RuntimeException;
use Symfony\Component\HttpFoundation\ParameterBag;
use Symfony\Component\HttpFoundation\Request as SymfonyRequest;
+/**
+ * @method array validate(array $rules, ...$params)
+ * @method array validateWithBag(string $errorBag, array $rules, ...$params)
+ * @method bool hasValidSignature(bool $absolute = true)
+ */
class Request extends SymfonyRequest implements Arrayable, ArrayAccess
{
use Concerns\InteractsWithContentTypes,
@@ -289,7 +294,7 @@ class Request extends SymfonyRequest implements Arrayable, ArrayAccess
/**
* Get the client user agent.
*
- * @return string
+ * @return string|null
*/
public function userAgent()
{
@@ -331,7 +336,7 @@ class Request extends SymfonyRequest implements Arrayable, ArrayAccess
* @param mixed $default
* @return mixed
*/
- public function get($key, $default = null)
+ public function get(string $key, $default = null)
{
return parent::get($key, $default);
}
@@ -340,7 +345,7 @@ class Request extends SymfonyRequest implements Arrayable, ArrayAccess
* Get the JSON payload for the request.
*
* @param string|null $key
- * @param mixed $default
+ * @param mixed $default
* @return \Symfony\Component\HttpFoundation\ParameterBag|mixed
*/
public function json($key = null, $default = null)
@@ -418,10 +423,6 @@ class Request extends SymfonyRequest implements Arrayable, ArrayAccess
*/
public static function createFromBase(SymfonyRequest $request)
{
- if ($request instanceof static) {
- return $request;
- }
-
$newRequest = (new static)->duplicate(
$request->query->all(), $request->request->all(), $request->attributes->all(),
$request->cookies->all(), $request->files->all(), $request->server->all()
@@ -521,8 +522,8 @@ class Request extends SymfonyRequest implements Arrayable, ArrayAccess
* Get the route handling the request.
*
* @param string|null $param
- * @param mixed $default
- * @return \Illuminate\Routing\Route|object|string
+ * @param mixed $default
+ * @return \Illuminate\Routing\Route|object|string|null
*/
public function route($param = null, $default = null)
{
diff --git a/vendor/laravel/framework/src/Illuminate/Http/Resources/CollectsResources.php b/vendor/laravel/framework/src/Illuminate/Http/Resources/CollectsResources.php
index 66e6a8b10..a5531f7a0 100644
--- a/vendor/laravel/framework/src/Illuminate/Http/Resources/CollectsResources.php
+++ b/vendor/laravel/framework/src/Illuminate/Http/Resources/CollectsResources.php
@@ -2,8 +2,9 @@
namespace Illuminate\Http\Resources;
-use Illuminate\Support\Str;
use Illuminate\Pagination\AbstractPaginator;
+use Illuminate\Support\Collection;
+use Illuminate\Support\Str;
trait CollectsResources
{
@@ -19,6 +20,10 @@ trait CollectsResources
return $resource;
}
+ if (is_array($resource)) {
+ $resource = new Collection($resource);
+ }
+
$collects = $this->collects();
$this->collection = $collects && ! $resource->first() instanceof $collects
diff --git a/vendor/laravel/framework/src/Illuminate/Http/Resources/ConditionallyLoadsAttributes.php b/vendor/laravel/framework/src/Illuminate/Http/Resources/ConditionallyLoadsAttributes.php
index 0f6e18899..5b8c8d082 100644
--- a/vendor/laravel/framework/src/Illuminate/Http/Resources/ConditionallyLoadsAttributes.php
+++ b/vendor/laravel/framework/src/Illuminate/Http/Resources/ConditionallyLoadsAttributes.php
@@ -144,6 +144,23 @@ trait ConditionallyLoadsAttributes
);
}
+ /**
+ * Retrieve an accessor when it has been appended.
+ *
+ * @param string $attribute
+ * @param mixed $value
+ * @param mixed $default
+ * @return \Illuminate\Http\Resources\MissingValue|mixed
+ */
+ protected function whenAppended($attribute, $value = null, $default = null)
+ {
+ if ($this->resource->hasAppended($attribute)) {
+ return func_num_args() >= 2 ? value($value) : $this->resource->$attribute;
+ }
+
+ return func_num_args() === 3 ? value($default) : new MissingValue;
+ }
+
/**
* Retrieve a relationship if it has been loaded.
*
diff --git a/vendor/laravel/framework/src/Illuminate/Http/Resources/DelegatesToResource.php b/vendor/laravel/framework/src/Illuminate/Http/Resources/DelegatesToResource.php
index 036a14310..495b7e3bf 100644
--- a/vendor/laravel/framework/src/Illuminate/Http/Resources/DelegatesToResource.php
+++ b/vendor/laravel/framework/src/Illuminate/Http/Resources/DelegatesToResource.php
@@ -33,11 +33,27 @@ trait DelegatesToResource
* Retrieve the model for a bound value.
*
* @param mixed $value
+ * @param string|null $field
* @return void
*
* @throws \Exception
*/
- public function resolveRouteBinding($value)
+ public function resolveRouteBinding($value, $field = null)
+ {
+ throw new Exception('Resources may not be implicitly resolved from route bindings.');
+ }
+
+ /**
+ * Retrieve the model for a bound value.
+ *
+ * @param string $childType
+ * @param mixed $value
+ * @param string|null $field
+ * @return void
+ *
+ * @throws \Exception
+ */
+ public function resolveChildRouteBinding($childType, $value, $field = null)
{
throw new Exception('Resources may not be implicitly resolved from route bindings.');
}
diff --git a/vendor/laravel/framework/src/Illuminate/Http/Resources/Json/JsonResource.php b/vendor/laravel/framework/src/Illuminate/Http/Resources/Json/JsonResource.php
index 1228c9bab..808aa234d 100644
--- a/vendor/laravel/framework/src/Illuminate/Http/Resources/Json/JsonResource.php
+++ b/vendor/laravel/framework/src/Illuminate/Http/Resources/Json/JsonResource.php
@@ -3,13 +3,14 @@
namespace Illuminate\Http\Resources\Json;
use ArrayAccess;
-use JsonSerializable;
use Illuminate\Container\Container;
-use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Contracts\Routing\UrlRoutable;
+use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Contracts\Support\Responsable;
-use Illuminate\Http\Resources\DelegatesToResource;
+use Illuminate\Database\Eloquent\JsonEncodingException;
use Illuminate\Http\Resources\ConditionallyLoadsAttributes;
+use Illuminate\Http\Resources\DelegatesToResource;
+use JsonSerializable;
class JsonResource implements ArrayAccess, JsonSerializable, Responsable, UrlRoutable
{
@@ -120,6 +121,25 @@ class JsonResource implements ArrayAccess, JsonSerializable, Responsable, UrlRou
: $this->resource->toArray();
}
+ /**
+ * Convert the model instance to JSON.
+ *
+ * @param int $options
+ * @return string
+ *
+ * @throws \Illuminate\Database\Eloquent\JsonEncodingException
+ */
+ public function toJson($options = 0)
+ {
+ $json = json_encode($this->jsonSerialize(), $options);
+
+ if (JSON_ERROR_NONE !== json_last_error()) {
+ throw JsonEncodingException::forResource($this, json_last_error_msg());
+ }
+
+ return $json;
+ }
+
/**
* Get any additional data that should be returned with the resource array.
*
diff --git a/vendor/laravel/framework/src/Illuminate/Http/Resources/Json/PaginatedResourceResponse.php b/vendor/laravel/framework/src/Illuminate/Http/Resources/Json/PaginatedResourceResponse.php
index 596a4cb05..5fb35ea07 100644
--- a/vendor/laravel/framework/src/Illuminate/Http/Resources/Json/PaginatedResourceResponse.php
+++ b/vendor/laravel/framework/src/Illuminate/Http/Resources/Json/PaginatedResourceResponse.php
@@ -25,7 +25,9 @@ class PaginatedResourceResponse extends ResourceResponse
),
$this->calculateStatus()
), function ($response) use ($request) {
- $response->original = $this->resource->resource->pluck('resource');
+ $response->original = $this->resource->resource->map(function ($item) {
+ return is_array($item) ? Arr::get($item, 'resource') : $item->resource;
+ });
$this->resource->withResponse($request, $response);
});
diff --git a/vendor/laravel/framework/src/Illuminate/Http/Resources/Json/Resource.php b/vendor/laravel/framework/src/Illuminate/Http/Resources/Json/Resource.php
deleted file mode 100644
index 49f674415..000000000
--- a/vendor/laravel/framework/src/Illuminate/Http/Resources/Json/Resource.php
+++ /dev/null
@@ -1,8 +0,0 @@
-resource = $this->collectResource($resource);
}
+ /**
+ * Indicate that all current query parameters should be appended to pagination links.
+ *
+ * @return $this
+ */
+ public function preserveQuery()
+ {
+ $this->preserveAllQueryParameters = true;
+
+ return $this;
+ }
+
+ /**
+ * Specify the query string parameters that should be present on pagination links.
+ *
+ * @param array $query
+ * @return $this
+ */
+ public function withQuery(array $query)
+ {
+ $this->preserveAllQueryParameters = false;
+
+ $this->queryParameters = $query;
+
+ return $this;
+ }
+
/**
* Return the count of items in the resource collection.
*
@@ -67,8 +108,27 @@ class ResourceCollection extends JsonResource implements Countable, IteratorAggr
*/
public function toResponse($request)
{
- return $this->resource instanceof AbstractPaginator
- ? (new PaginatedResourceResponse($this))->toResponse($request)
- : parent::toResponse($request);
+ if ($this->resource instanceof AbstractPaginator) {
+ return $this->preparePaginatedResponse($request);
+ }
+
+ return parent::toResponse($request);
+ }
+
+ /**
+ * Create a paginate-aware HTTP response.
+ *
+ * @param \Illuminate\Http\Request $request
+ * @return \Illuminate\Http\JsonResponse
+ */
+ protected function preparePaginatedResponse($request)
+ {
+ if ($this->preserveAllQueryParameters) {
+ $this->resource->appends($request->query());
+ } elseif (! is_null($this->queryParameters)) {
+ $this->resource->appends($this->queryParameters);
+ }
+
+ return (new PaginatedResourceResponse($this))->toResponse($request);
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Http/Resources/Json/ResourceResponse.php b/vendor/laravel/framework/src/Illuminate/Http/Resources/Json/ResourceResponse.php
index d3acb4ecc..2e9d326d5 100644
--- a/vendor/laravel/framework/src/Illuminate/Http/Resources/Json/ResourceResponse.php
+++ b/vendor/laravel/framework/src/Illuminate/Http/Resources/Json/ResourceResponse.php
@@ -2,9 +2,9 @@
namespace Illuminate\Http\Resources\Json;
-use Illuminate\Support\Collection;
-use Illuminate\Database\Eloquent\Model;
use Illuminate\Contracts\Support\Responsable;
+use Illuminate\Database\Eloquent\Model;
+use Illuminate\Support\Collection;
class ResourceResponse implements Responsable
{
diff --git a/vendor/laravel/framework/src/Illuminate/Http/Resources/MergeValue.php b/vendor/laravel/framework/src/Illuminate/Http/Resources/MergeValue.php
index 457017021..ee557e8f3 100644
--- a/vendor/laravel/framework/src/Illuminate/Http/Resources/MergeValue.php
+++ b/vendor/laravel/framework/src/Illuminate/Http/Resources/MergeValue.php
@@ -2,8 +2,8 @@
namespace Illuminate\Http\Resources;
-use JsonSerializable;
use Illuminate\Support\Collection;
+use JsonSerializable;
class MergeValue
{
diff --git a/vendor/laravel/framework/src/Illuminate/Http/Response.php b/vendor/laravel/framework/src/Illuminate/Http/Response.php
index d962dca1b..f8bc37899 100755
--- a/vendor/laravel/framework/src/Illuminate/Http/Response.php
+++ b/vendor/laravel/framework/src/Illuminate/Http/Response.php
@@ -3,19 +3,39 @@
namespace Illuminate\Http;
use ArrayObject;
-use JsonSerializable;
-use Illuminate\Support\Traits\Macroable;
-use Illuminate\Contracts\Support\Jsonable;
use Illuminate\Contracts\Support\Arrayable;
+use Illuminate\Contracts\Support\Jsonable;
use Illuminate\Contracts\Support\Renderable;
-use Symfony\Component\HttpFoundation\Response as BaseResponse;
+use Illuminate\Support\Traits\Macroable;
+use JsonSerializable;
+use Symfony\Component\HttpFoundation\Response as SymfonyResponse;
+use Symfony\Component\HttpFoundation\ResponseHeaderBag;
-class Response extends BaseResponse
+class Response extends SymfonyResponse
{
use ResponseTrait, Macroable {
Macroable::__call as macroCall;
}
+ /**
+ * Create a new HTTP response.
+ *
+ * @param mixed $content
+ * @param int $status
+ * @param array $headers
+ * @return void
+ *
+ * @throws \InvalidArgumentException
+ */
+ public function __construct($content = '', $status = 200, array $headers = [])
+ {
+ $this->headers = new ResponseHeaderBag($headers);
+
+ $this->setContent($content);
+ $this->setStatusCode($status);
+ $this->setProtocolVersion('1.0');
+ }
+
/**
* Set the content on the response.
*
@@ -65,7 +85,7 @@ class Response extends BaseResponse
/**
* Morph the given content into JSON.
*
- * @param mixed $content
+ * @param mixed $content
* @return string
*/
protected function morphToJson($content)
diff --git a/vendor/laravel/framework/src/Illuminate/Http/ResponseTrait.php b/vendor/laravel/framework/src/Illuminate/Http/ResponseTrait.php
index 21cd4c51f..46936fb6c 100644
--- a/vendor/laravel/framework/src/Illuminate/Http/ResponseTrait.php
+++ b/vendor/laravel/framework/src/Illuminate/Http/ResponseTrait.php
@@ -2,9 +2,9 @@
namespace Illuminate\Http;
-use Exception;
-use Symfony\Component\HttpFoundation\HeaderBag;
use Illuminate\Http\Exceptions\HttpResponseException;
+use Symfony\Component\HttpFoundation\HeaderBag;
+use Throwable;
trait ResponseTrait
{
@@ -18,7 +18,7 @@ trait ResponseTrait
/**
* The exception that triggered the error response (if applicable).
*
- * @var \Exception|null
+ * @var \Throwable|null
*/
public $exception;
@@ -59,7 +59,7 @@ trait ResponseTrait
*
* @param string $key
* @param array|string $values
- * @param bool $replace
+ * @param bool $replace
* @return $this
*/
public function header($key, $values, $replace = true)
@@ -96,7 +96,7 @@ trait ResponseTrait
*/
public function cookie($cookie)
{
- return call_user_func_array([$this, 'withCookie'], func_get_args());
+ return $this->withCookie(...func_get_args());
}
/**
@@ -108,7 +108,7 @@ trait ResponseTrait
public function withCookie($cookie)
{
if (is_string($cookie) && function_exists('cookie')) {
- $cookie = call_user_func_array('cookie', func_get_args());
+ $cookie = cookie(...func_get_args());
}
$this->headers->setCookie($cookie);
@@ -129,10 +129,10 @@ trait ResponseTrait
/**
* Set the exception to attach to the response.
*
- * @param \Exception $e
+ * @param \Throwable $e
* @return $this
*/
- public function withException(Exception $e)
+ public function withException(Throwable $e)
{
$this->exception = $e;
@@ -142,6 +142,8 @@ trait ResponseTrait
/**
* Throws the response in a HttpResponseException instance.
*
+ * @return void
+ *
* @throws \Illuminate\Http\Exceptions\HttpResponseException
*/
public function throwResponse()
diff --git a/vendor/laravel/framework/src/Illuminate/Http/Testing/File.php b/vendor/laravel/framework/src/Illuminate/Http/Testing/File.php
index 4b1140c76..c15282686 100644
--- a/vendor/laravel/framework/src/Illuminate/Http/Testing/File.php
+++ b/vendor/laravel/framework/src/Illuminate/Http/Testing/File.php
@@ -27,6 +27,13 @@ class File extends UploadedFile
*/
public $sizeToReport;
+ /**
+ * The MIME type to report.
+ *
+ * @var string|null
+ */
+ public $mimeTypeToReport;
+
/**
* Create a new file instance.
*
@@ -49,7 +56,7 @@ class File extends UploadedFile
* Create a new fake file.
*
* @param string $name
- * @param int $kilobytes
+ * @param string|int $kilobytes
* @return \Illuminate\Http\Testing\File
*/
public static function create($name, $kilobytes = 0)
@@ -57,6 +64,18 @@ class File extends UploadedFile
return (new FileFactory)->create($name, $kilobytes);
}
+ /**
+ * Create a new fake file with content.
+ *
+ * @param string $name
+ * @param string $content
+ * @return \Illuminate\Http\Testing\File
+ */
+ public static function createWithContent($name, $content)
+ {
+ return (new FileFactory)->createWithContent($name, $content);
+ }
+
/**
* Create a new fake image.
*
@@ -94,13 +113,26 @@ class File extends UploadedFile
}
/**
- * Get the MIME type for the file.
+ * Set the "MIME type" for the file.
+ *
+ * @param string $mimeType
+ * @return $this
+ */
+ public function mimeType($mimeType)
+ {
+ $this->mimeTypeToReport = $mimeType;
+
+ return $this;
+ }
+
+ /**
+ * Get the MIME type of the file.
*
* @return string
*/
public function getMimeType()
{
- return MimeType::from($this->name);
+ return $this->mimeTypeToReport ?: MimeType::from($this->name);
}
/**
diff --git a/vendor/laravel/framework/src/Illuminate/Http/Testing/FileFactory.php b/vendor/laravel/framework/src/Illuminate/Http/Testing/FileFactory.php
index c79617ebf..5b729ee1e 100644
--- a/vendor/laravel/framework/src/Illuminate/Http/Testing/FileFactory.php
+++ b/vendor/laravel/framework/src/Illuminate/Http/Testing/FileFactory.php
@@ -10,13 +10,37 @@ class FileFactory
* Create a new fake file.
*
* @param string $name
- * @param int $kilobytes
+ * @param string|int $kilobytes
+ * @param string|null $mimeType
* @return \Illuminate\Http\Testing\File
*/
- public function create($name, $kilobytes = 0)
+ public function create($name, $kilobytes = 0, $mimeType = null)
{
- return tap(new File($name, tmpfile()), function ($file) use ($kilobytes) {
+ if (is_string($kilobytes)) {
+ return $this->createWithContent($name, $kilobytes);
+ }
+
+ return tap(new File($name, tmpfile()), function ($file) use ($kilobytes, $mimeType) {
$file->sizeToReport = $kilobytes * 1024;
+ $file->mimeTypeToReport = $mimeType;
+ });
+ }
+
+ /**
+ * Create a new fake file with content.
+ *
+ * @param string $name
+ * @param string $content
+ * @return \Illuminate\Http\Testing\File
+ */
+ public function createWithContent($name, $content)
+ {
+ $tmpfile = tmpfile();
+
+ fwrite($tmpfile, $content);
+
+ return tap(new File($name, $tmpfile), function ($file) use ($tmpfile) {
+ $file->sizeToReport = fstat($tmpfile)['size'];
});
}
diff --git a/vendor/laravel/framework/src/Illuminate/Http/Testing/MimeType.php b/vendor/laravel/framework/src/Illuminate/Http/Testing/MimeType.php
index af1fc602c..aff03d4bb 100644
--- a/vendor/laravel/framework/src/Illuminate/Http/Testing/MimeType.php
+++ b/vendor/laravel/framework/src/Illuminate/Http/Testing/MimeType.php
@@ -2,782 +2,31 @@
namespace Illuminate\Http\Testing;
+use Illuminate\Support\Arr;
+use Symfony\Component\Mime\MimeTypes;
+
class MimeType
{
/**
- * An array of extension to MIME types.
+ * The mime types instance.
*
- * @var array
+ * @var \Symfony\Component\Mime\MimeTypes|null
*/
- protected static $mimes = [
- 'ez' => 'application/andrew-inset',
- 'aw' => 'application/applixware',
- 'atom' => 'application/atom+xml',
- 'atomcat' => 'application/atomcat+xml',
- 'atomsvc' => 'application/atomsvc+xml',
- 'ccxml' => 'application/ccxml+xml',
- 'cdmia' => 'application/cdmi-capability',
- 'cdmic' => 'application/cdmi-container',
- 'cdmid' => 'application/cdmi-domain',
- 'cdmio' => 'application/cdmi-object',
- 'cdmiq' => 'application/cdmi-queue',
- 'cu' => 'application/cu-seeme',
- 'davmount' => 'application/davmount+xml',
- 'dbk' => 'application/docbook+xml',
- 'dssc' => 'application/dssc+der',
- 'xdssc' => 'application/dssc+xml',
- 'ecma' => 'application/ecmascript',
- 'emma' => 'application/emma+xml',
- 'epub' => 'application/epub+zip',
- 'exi' => 'application/exi',
- 'pfr' => 'application/font-tdpfr',
- 'gml' => 'application/gml+xml',
- 'gpx' => 'application/gpx+xml',
- 'gxf' => 'application/gxf',
- 'stk' => 'application/hyperstudio',
- 'ink' => 'application/inkml+xml',
- 'ipfix' => 'application/ipfix',
- 'jar' => 'application/java-archive',
- 'ser' => 'application/java-serialized-object',
- 'class' => 'application/java-vm',
- 'js' => 'application/javascript',
- 'json' => 'application/json',
- 'jsonml' => 'application/jsonml+json',
- 'lostxml' => 'application/lost+xml',
- 'hqx' => 'application/mac-binhex40',
- 'cpt' => 'application/mac-compactpro',
- 'mads' => 'application/mads+xml',
- 'mrc' => 'application/marc',
- 'mrcx' => 'application/marcxml+xml',
- 'ma' => 'application/mathematica',
- 'mathml' => 'application/mathml+xml',
- 'mbox' => 'application/mbox',
- 'mscml' => 'application/mediaservercontrol+xml',
- 'metalink' => 'application/metalink+xml',
- 'meta4' => 'application/metalink4+xml',
- 'mets' => 'application/mets+xml',
- 'mods' => 'application/mods+xml',
- 'm21' => 'application/mp21',
- 'mp4s' => 'application/mp4',
- 'doc' => 'application/msword',
- 'mxf' => 'application/mxf',
- 'bin' => 'application/octet-stream',
- 'oda' => 'application/oda',
- 'opf' => 'application/oebps-package+xml',
- 'ogx' => 'application/ogg',
- 'omdoc' => 'application/omdoc+xml',
- 'onetoc' => 'application/onenote',
- 'oxps' => 'application/oxps',
- 'xer' => 'application/patch-ops-error+xml',
- 'pdf' => 'application/pdf',
- 'pgp' => 'application/pgp-encrypted',
- 'asc' => 'application/pgp-signature',
- 'prf' => 'application/pics-rules',
- 'p10' => 'application/pkcs10',
- 'p7m' => 'application/pkcs7-mime',
- 'p7s' => 'application/pkcs7-signature',
- 'p8' => 'application/pkcs8',
- 'ac' => 'application/pkix-attr-cert',
- 'cer' => 'application/pkix-cert',
- 'crl' => 'application/pkix-crl',
- 'pkipath' => 'application/pkix-pkipath',
- 'pki' => 'application/pkixcmp',
- 'pls' => 'application/pls+xml',
- 'ai' => 'application/postscript',
- 'cww' => 'application/prs.cww',
- 'pskcxml' => 'application/pskc+xml',
- 'rdf' => 'application/rdf+xml',
- 'rif' => 'application/reginfo+xml',
- 'rnc' => 'application/relax-ng-compact-syntax',
- 'rl' => 'application/resource-lists+xml',
- 'rld' => 'application/resource-lists-diff+xml',
- 'rs' => 'application/rls-services+xml',
- 'gbr' => 'application/rpki-ghostbusters',
- 'mft' => 'application/rpki-manifest',
- 'roa' => 'application/rpki-roa',
- 'rsd' => 'application/rsd+xml',
- 'rss' => 'application/rss+xml',
- 'sbml' => 'application/sbml+xml',
- 'scq' => 'application/scvp-cv-request',
- 'scs' => 'application/scvp-cv-response',
- 'spq' => 'application/scvp-vp-request',
- 'spp' => 'application/scvp-vp-response',
- 'sdp' => 'application/sdp',
- 'setpay' => 'application/set-payment-initiation',
- 'setreg' => 'application/set-registration-initiation',
- 'shf' => 'application/shf+xml',
- 'smi' => 'application/smil+xml',
- 'rq' => 'application/sparql-query',
- 'srx' => 'application/sparql-results+xml',
- 'gram' => 'application/srgs',
- 'grxml' => 'application/srgs+xml',
- 'sru' => 'application/sru+xml',
- 'ssdl' => 'application/ssdl+xml',
- 'ssml' => 'application/ssml+xml',
- 'tei' => 'application/tei+xml',
- 'tfi' => 'application/thraud+xml',
- 'tsd' => 'application/timestamped-data',
- 'plb' => 'application/vnd.3gpp.pic-bw-large',
- 'psb' => 'application/vnd.3gpp.pic-bw-small',
- 'pvb' => 'application/vnd.3gpp.pic-bw-var',
- 'tcap' => 'application/vnd.3gpp2.tcap',
- 'pwn' => 'application/vnd.3m.post-it-notes',
- 'aso' => 'application/vnd.accpac.simply.aso',
- 'imp' => 'application/vnd.accpac.simply.imp',
- 'acu' => 'application/vnd.acucobol',
- 'atc' => 'application/vnd.acucorp',
- 'air' => 'application/vnd.adobe.air-application-installer-package+zip',
- 'fcdt' => 'application/vnd.adobe.formscentral.fcdt',
- 'fxp' => 'application/vnd.adobe.fxp',
- 'xdp' => 'application/vnd.adobe.xdp+xml',
- 'xfdf' => 'application/vnd.adobe.xfdf',
- 'ahead' => 'application/vnd.ahead.space',
- 'azf' => 'application/vnd.airzip.filesecure.azf',
- 'azs' => 'application/vnd.airzip.filesecure.azs',
- 'azw' => 'application/vnd.amazon.ebook',
- 'acc' => 'application/vnd.americandynamics.acc',
- 'ami' => 'application/vnd.amiga.ami',
- 'apk' => 'application/vnd.android.package-archive',
- 'cii' => 'application/vnd.anser-web-certificate-issue-initiation',
- 'fti' => 'application/vnd.anser-web-funds-transfer-initiation',
- 'atx' => 'application/vnd.antix.game-component',
- 'mpkg' => 'application/vnd.apple.installer+xml',
- 'm3u8' => 'application/vnd.apple.mpegurl',
- 'swi' => 'application/vnd.aristanetworks.swi',
- 'iota' => 'application/vnd.astraea-software.iota',
- 'aep' => 'application/vnd.audiograph',
- 'mpm' => 'application/vnd.blueice.multipass',
- 'bmi' => 'application/vnd.bmi',
- 'rep' => 'application/vnd.businessobjects',
- 'cdxml' => 'application/vnd.chemdraw+xml',
- 'mmd' => 'application/vnd.chipnuts.karaoke-mmd',
- 'cdy' => 'application/vnd.cinderella',
- 'cla' => 'application/vnd.claymore',
- 'rp9' => 'application/vnd.cloanto.rp9',
- 'c4g' => 'application/vnd.clonk.c4group',
- 'c11amc' => 'application/vnd.cluetrust.cartomobile-config',
- 'c11amz' => 'application/vnd.cluetrust.cartomobile-config-pkg',
- 'csp' => 'application/vnd.commonspace',
- 'cdbcmsg' => 'application/vnd.contact.cmsg',
- 'cmc' => 'application/vnd.cosmocaller',
- 'clkx' => 'application/vnd.crick.clicker',
- 'clkk' => 'application/vnd.crick.clicker.keyboard',
- 'clkp' => 'application/vnd.crick.clicker.palette',
- 'clkt' => 'application/vnd.crick.clicker.template',
- 'clkw' => 'application/vnd.crick.clicker.wordbank',
- 'wbs' => 'application/vnd.criticaltools.wbs+xml',
- 'pml' => 'application/vnd.ctc-posml',
- 'ppd' => 'application/vnd.cups-ppd',
- 'car' => 'application/vnd.curl.car',
- 'pcurl' => 'application/vnd.curl.pcurl',
- 'dart' => 'application/vnd.dart',
- 'rdz' => 'application/vnd.data-vision.rdz',
- 'uvf' => 'application/vnd.dece.data',
- 'uvt' => 'application/vnd.dece.ttml+xml',
- 'uvx' => 'application/vnd.dece.unspecified',
- 'uvz' => 'application/vnd.dece.zip',
- 'fe_launch' => 'application/vnd.denovo.fcselayout-link',
- 'dna' => 'application/vnd.dna',
- 'mlp' => 'application/vnd.dolby.mlp',
- 'dpg' => 'application/vnd.dpgraph',
- 'dfac' => 'application/vnd.dreamfactory',
- 'kpxx' => 'application/vnd.ds-keypoint',
- 'ait' => 'application/vnd.dvb.ait',
- 'svc' => 'application/vnd.dvb.service',
- 'geo' => 'application/vnd.dynageo',
- 'mag' => 'application/vnd.ecowin.chart',
- 'nml' => 'application/vnd.enliven',
- 'esf' => 'application/vnd.epson.esf',
- 'msf' => 'application/vnd.epson.msf',
- 'qam' => 'application/vnd.epson.quickanime',
- 'slt' => 'application/vnd.epson.salt',
- 'ssf' => 'application/vnd.epson.ssf',
- 'es3' => 'application/vnd.eszigno3+xml',
- 'ez2' => 'application/vnd.ezpix-album',
- 'ez3' => 'application/vnd.ezpix-package',
- 'fdf' => 'application/vnd.fdf',
- 'mseed' => 'application/vnd.fdsn.mseed',
- 'seed' => 'application/vnd.fdsn.seed',
- 'gph' => 'application/vnd.flographit',
- 'ftc' => 'application/vnd.fluxtime.clip',
- 'fm' => 'application/vnd.framemaker',
- 'fnc' => 'application/vnd.frogans.fnc',
- 'ltf' => 'application/vnd.frogans.ltf',
- 'fsc' => 'application/vnd.fsc.weblaunch',
- 'oas' => 'application/vnd.fujitsu.oasys',
- 'oa2' => 'application/vnd.fujitsu.oasys2',
- 'oa3' => 'application/vnd.fujitsu.oasys3',
- 'fg5' => 'application/vnd.fujitsu.oasysgp',
- 'bh2' => 'application/vnd.fujitsu.oasysprs',
- 'ddd' => 'application/vnd.fujixerox.ddd',
- 'xdw' => 'application/vnd.fujixerox.docuworks',
- 'xbd' => 'application/vnd.fujixerox.docuworks.binder',
- 'fzs' => 'application/vnd.fuzzysheet',
- 'txd' => 'application/vnd.genomatix.tuxedo',
- 'ggb' => 'application/vnd.geogebra.file',
- 'ggt' => 'application/vnd.geogebra.tool',
- 'gex' => 'application/vnd.geometry-explorer',
- 'gxt' => 'application/vnd.geonext',
- 'g2w' => 'application/vnd.geoplan',
- 'g3w' => 'application/vnd.geospace',
- 'gmx' => 'application/vnd.gmx',
- 'kml' => 'application/vnd.google-earth.kml+xml',
- 'kmz' => 'application/vnd.google-earth.kmz',
- 'gqf' => 'application/vnd.grafeq',
- 'gac' => 'application/vnd.groove-account',
- 'ghf' => 'application/vnd.groove-help',
- 'gim' => 'application/vnd.groove-identity-message',
- 'grv' => 'application/vnd.groove-injector',
- 'gtm' => 'application/vnd.groove-tool-message',
- 'tpl' => 'application/vnd.groove-tool-template',
- 'vcg' => 'application/vnd.groove-vcard',
- 'hal' => 'application/vnd.hal+xml',
- 'zmm' => 'application/vnd.handheld-entertainment+xml',
- 'hbci' => 'application/vnd.hbci',
- 'les' => 'application/vnd.hhe.lesson-player',
- 'hpgl' => 'application/vnd.hp-hpgl',
- 'hpid' => 'application/vnd.hp-hpid',
- 'hps' => 'application/vnd.hp-hps',
- 'jlt' => 'application/vnd.hp-jlyt',
- 'pcl' => 'application/vnd.hp-pcl',
- 'pclxl' => 'application/vnd.hp-pclxl',
- 'sfd-hdstx' => 'application/vnd.hydrostatix.sof-data',
- 'mpy' => 'application/vnd.ibm.minipay',
- 'afp' => 'application/vnd.ibm.modcap',
- 'irm' => 'application/vnd.ibm.rights-management',
- 'sc' => 'application/vnd.ibm.secure-container',
- 'icc' => 'application/vnd.iccprofile',
- 'igl' => 'application/vnd.igloader',
- 'ivp' => 'application/vnd.immervision-ivp',
- 'ivu' => 'application/vnd.immervision-ivu',
- 'igm' => 'application/vnd.insors.igm',
- 'xpw' => 'application/vnd.intercon.formnet',
- 'i2g' => 'application/vnd.intergeo',
- 'qbo' => 'application/vnd.intu.qbo',
- 'qfx' => 'application/vnd.intu.qfx',
- 'rcprofile' => 'application/vnd.ipunplugged.rcprofile',
- 'irp' => 'application/vnd.irepository.package+xml',
- 'xpr' => 'application/vnd.is-xpr',
- 'fcs' => 'application/vnd.isac.fcs',
- 'jam' => 'application/vnd.jam',
- 'rms' => 'application/vnd.jcp.javame.midlet-rms',
- 'jisp' => 'application/vnd.jisp',
- 'joda' => 'application/vnd.joost.joda-archive',
- 'ktz' => 'application/vnd.kahootz',
- 'karbon' => 'application/vnd.kde.karbon',
- 'chrt' => 'application/vnd.kde.kchart',
- 'kfo' => 'application/vnd.kde.kformula',
- 'flw' => 'application/vnd.kde.kivio',
- 'kon' => 'application/vnd.kde.kontour',
- 'kpr' => 'application/vnd.kde.kpresenter',
- 'ksp' => 'application/vnd.kde.kspread',
- 'kwd' => 'application/vnd.kde.kword',
- 'htke' => 'application/vnd.kenameaapp',
- 'kia' => 'application/vnd.kidspiration',
- 'kne' => 'application/vnd.kinar',
- 'skp' => 'application/vnd.koan',
- 'sse' => 'application/vnd.kodak-descriptor',
- 'lasxml' => 'application/vnd.las.las+xml',
- 'lbd' => 'application/vnd.llamagraphics.life-balance.desktop',
- 'lbe' => 'application/vnd.llamagraphics.life-balance.exchange+xml',
- '123' => 'application/vnd.lotus-1-2-3',
- 'apr' => 'application/vnd.lotus-approach',
- 'pre' => 'application/vnd.lotus-freelance',
- 'nsf' => 'application/vnd.lotus-notes',
- 'org' => 'application/vnd.lotus-organizer',
- 'scm' => 'application/vnd.lotus-screencam',
- 'lwp' => 'application/vnd.lotus-wordpro',
- 'portpkg' => 'application/vnd.macports.portpkg',
- 'mcd' => 'application/vnd.mcd',
- 'mc1' => 'application/vnd.medcalcdata',
- 'cdkey' => 'application/vnd.mediastation.cdkey',
- 'mwf' => 'application/vnd.mfer',
- 'mfm' => 'application/vnd.mfmp',
- 'flo' => 'application/vnd.micrografx.flo',
- 'igx' => 'application/vnd.micrografx.igx',
- 'mif' => 'application/vnd.mif',
- 'daf' => 'application/vnd.mobius.daf',
- 'dis' => 'application/vnd.mobius.dis',
- 'mbk' => 'application/vnd.mobius.mbk',
- 'mqy' => 'application/vnd.mobius.mqy',
- 'msl' => 'application/vnd.mobius.msl',
- 'plc' => 'application/vnd.mobius.plc',
- 'txf' => 'application/vnd.mobius.txf',
- 'mpn' => 'application/vnd.mophun.application',
- 'mpc' => 'application/vnd.mophun.certificate',
- 'xul' => 'application/vnd.mozilla.xul+xml',
- 'cil' => 'application/vnd.ms-artgalry',
- 'cab' => 'application/vnd.ms-cab-compressed',
- 'xls' => 'application/vnd.ms-excel',
- 'xlam' => 'application/vnd.ms-excel.addin.macroenabled.12',
- 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroenabled.12',
- 'xlsm' => 'application/vnd.ms-excel.sheet.macroenabled.12',
- 'xltm' => 'application/vnd.ms-excel.template.macroenabled.12',
- 'eot' => 'application/vnd.ms-fontobject',
- 'chm' => 'application/vnd.ms-htmlhelp',
- 'ims' => 'application/vnd.ms-ims',
- 'lrm' => 'application/vnd.ms-lrm',
- 'thmx' => 'application/vnd.ms-officetheme',
- 'cat' => 'application/vnd.ms-pki.seccat',
- 'stl' => 'application/vnd.ms-pki.stl',
- 'ppt' => 'application/vnd.ms-powerpoint',
- 'ppam' => 'application/vnd.ms-powerpoint.addin.macroenabled.12',
- 'pptm' => 'application/vnd.ms-powerpoint.presentation.macroenabled.12',
- 'sldm' => 'application/vnd.ms-powerpoint.slide.macroenabled.12',
- 'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroenabled.12',
- 'potm' => 'application/vnd.ms-powerpoint.template.macroenabled.12',
- 'mpp' => 'application/vnd.ms-project',
- 'docm' => 'application/vnd.ms-word.document.macroenabled.12',
- 'dotm' => 'application/vnd.ms-word.template.macroenabled.12',
- 'wps' => 'application/vnd.ms-works',
- 'wpl' => 'application/vnd.ms-wpl',
- 'xps' => 'application/vnd.ms-xpsdocument',
- 'mseq' => 'application/vnd.mseq',
- 'mus' => 'application/vnd.musician',
- 'msty' => 'application/vnd.muvee.style',
- 'taglet' => 'application/vnd.mynfc',
- 'nlu' => 'application/vnd.neurolanguage.nlu',
- 'ntf' => 'application/vnd.nitf',
- 'nnd' => 'application/vnd.noblenet-directory',
- 'nns' => 'application/vnd.noblenet-sealer',
- 'nnw' => 'application/vnd.noblenet-web',
- 'ngdat' => 'application/vnd.nokia.n-gage.data',
- 'n-gage' => 'application/vnd.nokia.n-gage.symbian.install',
- 'rpst' => 'application/vnd.nokia.radio-preset',
- 'rpss' => 'application/vnd.nokia.radio-presets',
- 'edm' => 'application/vnd.novadigm.edm',
- 'edx' => 'application/vnd.novadigm.edx',
- 'ext' => 'application/vnd.novadigm.ext',
- 'odc' => 'application/vnd.oasis.opendocument.chart',
- 'otc' => 'application/vnd.oasis.opendocument.chart-template',
- 'odb' => 'application/vnd.oasis.opendocument.database',
- 'odf' => 'application/vnd.oasis.opendocument.formula',
- 'odft' => 'application/vnd.oasis.opendocument.formula-template',
- 'odg' => 'application/vnd.oasis.opendocument.graphics',
- 'otg' => 'application/vnd.oasis.opendocument.graphics-template',
- 'odi' => 'application/vnd.oasis.opendocument.image',
- 'oti' => 'application/vnd.oasis.opendocument.image-template',
- 'odp' => 'application/vnd.oasis.opendocument.presentation',
- 'otp' => 'application/vnd.oasis.opendocument.presentation-template',
- 'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
- 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template',
- 'odt' => 'application/vnd.oasis.opendocument.text',
- 'odm' => 'application/vnd.oasis.opendocument.text-master',
- 'ott' => 'application/vnd.oasis.opendocument.text-template',
- 'oth' => 'application/vnd.oasis.opendocument.text-web',
- 'xo' => 'application/vnd.olpc-sugar',
- 'dd2' => 'application/vnd.oma.dd2+xml',
- 'oxt' => 'application/vnd.openofficeorg.extension',
- 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
- 'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide',
- 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
- 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template',
- 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
- 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
- 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
- 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
- 'mgp' => 'application/vnd.osgeo.mapguide.package',
- 'dp' => 'application/vnd.osgi.dp',
- 'esa' => 'application/vnd.osgi.subsystem',
- 'pdb' => 'application/vnd.palm',
- 'paw' => 'application/vnd.pawaafile',
- 'str' => 'application/vnd.pg.format',
- 'ei6' => 'application/vnd.pg.osasli',
- 'efif' => 'application/vnd.picsel',
- 'wg' => 'application/vnd.pmi.widget',
- 'plf' => 'application/vnd.pocketlearn',
- 'pbd' => 'application/vnd.powerbuilder6',
- 'box' => 'application/vnd.previewsystems.box',
- 'mgz' => 'application/vnd.proteus.magazine',
- 'qps' => 'application/vnd.publishare-delta-tree',
- 'ptid' => 'application/vnd.pvi.ptid1',
- 'qxd' => 'application/vnd.quark.quarkxpress',
- 'bed' => 'application/vnd.realvnc.bed',
- 'mxl' => 'application/vnd.recordare.musicxml',
- 'musicxml' => 'application/vnd.recordare.musicxml+xml',
- 'cryptonote' => 'application/vnd.rig.cryptonote',
- 'cod' => 'application/vnd.rim.cod',
- 'rm' => 'application/vnd.rn-realmedia',
- 'rmvb' => 'application/vnd.rn-realmedia-vbr',
- 'link66' => 'application/vnd.route66.link66+xml',
- 'st' => 'application/vnd.sailingtracker.track',
- 'see' => 'application/vnd.seemail',
- 'sema' => 'application/vnd.sema',
- 'semd' => 'application/vnd.semd',
- 'semf' => 'application/vnd.semf',
- 'ifm' => 'application/vnd.shana.informed.formdata',
- 'itp' => 'application/vnd.shana.informed.formtemplate',
- 'iif' => 'application/vnd.shana.informed.interchange',
- 'ipk' => 'application/vnd.shana.informed.package',
- 'twd' => 'application/vnd.simtech-mindmapper',
- 'mmf' => 'application/vnd.smaf',
- 'teacher' => 'application/vnd.smart.teacher',
- 'sdkm' => 'application/vnd.solent.sdkm+xml',
- 'dxp' => 'application/vnd.spotfire.dxp',
- 'sfs' => 'application/vnd.spotfire.sfs',
- 'sdc' => 'application/vnd.stardivision.calc',
- 'sda' => 'application/vnd.stardivision.draw',
- 'sdd' => 'application/vnd.stardivision.impress',
- 'smf' => 'application/vnd.stardivision.math',
- 'sdw' => 'application/vnd.stardivision.writer',
- 'sgl' => 'application/vnd.stardivision.writer-global',
- 'smzip' => 'application/vnd.stepmania.package',
- 'sm' => 'application/vnd.stepmania.stepchart',
- 'sxc' => 'application/vnd.sun.xml.calc',
- 'stc' => 'application/vnd.sun.xml.calc.template',
- 'sxd' => 'application/vnd.sun.xml.draw',
- 'std' => 'application/vnd.sun.xml.draw.template',
- 'sxi' => 'application/vnd.sun.xml.impress',
- 'sti' => 'application/vnd.sun.xml.impress.template',
- 'sxm' => 'application/vnd.sun.xml.math',
- 'sxw' => 'application/vnd.sun.xml.writer',
- 'sxg' => 'application/vnd.sun.xml.writer.global',
- 'stw' => 'application/vnd.sun.xml.writer.template',
- 'sus' => 'application/vnd.sus-calendar',
- 'svd' => 'application/vnd.svd',
- 'sis' => 'application/vnd.symbian.install',
- 'xsm' => 'application/vnd.syncml+xml',
- 'bdm' => 'application/vnd.syncml.dm+wbxml',
- 'xdm' => 'application/vnd.syncml.dm+xml',
- 'tao' => 'application/vnd.tao.intent-module-archive',
- 'pcap' => 'application/vnd.tcpdump.pcap',
- 'tmo' => 'application/vnd.tmobile-livetv',
- 'tpt' => 'application/vnd.trid.tpt',
- 'mxs' => 'application/vnd.triscape.mxs',
- 'tra' => 'application/vnd.trueapp',
- 'ufd' => 'application/vnd.ufdl',
- 'utz' => 'application/vnd.uiq.theme',
- 'umj' => 'application/vnd.umajin',
- 'unityweb' => 'application/vnd.unity',
- 'uoml' => 'application/vnd.uoml+xml',
- 'vcx' => 'application/vnd.vcx',
- 'vsd' => 'application/vnd.visio',
- 'vis' => 'application/vnd.visionary',
- 'vsf' => 'application/vnd.vsf',
- 'wbxml' => 'application/vnd.wap.wbxml',
- 'wmlc' => 'application/vnd.wap.wmlc',
- 'wmlsc' => 'application/vnd.wap.wmlscriptc',
- 'wtb' => 'application/vnd.webturbo',
- 'nbp' => 'application/vnd.wolfram.player',
- 'wpd' => 'application/vnd.wordperfect',
- 'wqd' => 'application/vnd.wqd',
- 'stf' => 'application/vnd.wt.stf',
- 'xar' => 'application/vnd.xara',
- 'xfdl' => 'application/vnd.xfdl',
- 'hvd' => 'application/vnd.yamaha.hv-dic',
- 'hvs' => 'application/vnd.yamaha.hv-script',
- 'hvp' => 'application/vnd.yamaha.hv-voice',
- 'osf' => 'application/vnd.yamaha.openscoreformat',
- 'osfpvg' => 'application/vnd.yamaha.openscoreformat.osfpvg+xml',
- 'saf' => 'application/vnd.yamaha.smaf-audio',
- 'spf' => 'application/vnd.yamaha.smaf-phrase',
- 'cmp' => 'application/vnd.yellowriver-custom-menu',
- 'zir' => 'application/vnd.zul',
- 'zaz' => 'application/vnd.zzazz.deck+xml',
- 'vxml' => 'application/voicexml+xml',
- 'wgt' => 'application/widget',
- 'hlp' => 'application/winhlp',
- 'wsdl' => 'application/wsdl+xml',
- 'wspolicy' => 'application/wspolicy+xml',
- '7z' => 'application/x-7z-compressed',
- 'abw' => 'application/x-abiword',
- 'ace' => 'application/x-ace-compressed',
- 'dmg' => 'application/x-apple-diskimage',
- 'aab' => 'application/x-authorware-bin',
- 'aam' => 'application/x-authorware-map',
- 'aas' => 'application/x-authorware-seg',
- 'bcpio' => 'application/x-bcpio',
- 'torrent' => 'application/x-bittorrent',
- 'blb' => 'application/x-blorb',
- 'bz' => 'application/x-bzip',
- 'bz2' => 'application/x-bzip2',
- 'cbr' => 'application/x-cbr',
- 'vcd' => 'application/x-cdlink',
- 'cfs' => 'application/x-cfs-compressed',
- 'chat' => 'application/x-chat',
- 'pgn' => 'application/x-chess-pgn',
- 'nsc' => 'application/x-conference',
- 'cpio' => 'application/x-cpio',
- 'csh' => 'application/x-csh',
- 'deb' => 'application/x-debian-package',
- 'dgc' => 'application/x-dgc-compressed',
- 'dir' => 'application/x-director',
- 'wad' => 'application/x-doom',
- 'ncx' => 'application/x-dtbncx+xml',
- 'dtb' => 'application/x-dtbook+xml',
- 'res' => 'application/x-dtbresource+xml',
- 'dvi' => 'application/x-dvi',
- 'evy' => 'application/x-envoy',
- 'eva' => 'application/x-eva',
- 'bdf' => 'application/x-font-bdf',
- 'gsf' => 'application/x-font-ghostscript',
- 'psf' => 'application/x-font-linux-psf',
- 'otf' => 'application/x-font-otf',
- 'pcf' => 'application/x-font-pcf',
- 'snf' => 'application/x-font-snf',
- 'ttf' => 'application/x-font-ttf',
- 'pfa' => 'application/x-font-type1',
- 'woff' => 'application/x-font-woff',
- 'arc' => 'application/x-freearc',
- 'spl' => 'application/x-futuresplash',
- 'gca' => 'application/x-gca-compressed',
- 'ulx' => 'application/x-glulx',
- 'gnumeric' => 'application/x-gnumeric',
- 'gramps' => 'application/x-gramps-xml',
- 'gtar' => 'application/x-gtar',
- 'hdf' => 'application/x-hdf',
- 'install' => 'application/x-install-instructions',
- 'iso' => 'application/x-iso9660-image',
- 'jnlp' => 'application/x-java-jnlp-file',
- 'latex' => 'application/x-latex',
- 'lzh' => 'application/x-lzh-compressed',
- 'mie' => 'application/x-mie',
- 'prc' => 'application/x-mobipocket-ebook',
- 'application' => 'application/x-ms-application',
- 'lnk' => 'application/x-ms-shortcut',
- 'wmd' => 'application/x-ms-wmd',
- 'wmz' => 'application/x-ms-wmz',
- 'xbap' => 'application/x-ms-xbap',
- 'mdb' => 'application/x-msaccess',
- 'obd' => 'application/x-msbinder',
- 'crd' => 'application/x-mscardfile',
- 'clp' => 'application/x-msclip',
- 'exe' => 'application/x-msdownload',
- 'mvb' => 'application/x-msmediaview',
- 'wmf' => 'application/x-msmetafile',
- 'mny' => 'application/x-msmoney',
- 'pub' => 'application/x-mspublisher',
- 'scd' => 'application/x-msschedule',
- 'trm' => 'application/x-msterminal',
- 'wri' => 'application/x-mswrite',
- 'nc' => 'application/x-netcdf',
- 'nzb' => 'application/x-nzb',
- 'p12' => 'application/x-pkcs12',
- 'p7b' => 'application/x-pkcs7-certificates',
- 'p7r' => 'application/x-pkcs7-certreqresp',
- 'rar' => 'application/x-rar',
- 'ris' => 'application/x-research-info-systems',
- 'sh' => 'application/x-sh',
- 'shar' => 'application/x-shar',
- 'swf' => 'application/x-shockwave-flash',
- 'xap' => 'application/x-silverlight-app',
- 'sql' => 'application/x-sql',
- 'sit' => 'application/x-stuffit',
- 'sitx' => 'application/x-stuffitx',
- 'srt' => 'application/x-subrip',
- 'sv4cpio' => 'application/x-sv4cpio',
- 'sv4crc' => 'application/x-sv4crc',
- 't3' => 'application/x-t3vm-image',
- 'gam' => 'application/x-tads',
- 'tar' => 'application/x-tar',
- 'tcl' => 'application/x-tcl',
- 'tex' => 'application/x-tex',
- 'tfm' => 'application/x-tex-tfm',
- 'texinfo' => 'application/x-texinfo',
- 'obj' => 'application/x-tgif',
- 'ustar' => 'application/x-ustar',
- 'src' => 'application/x-wais-source',
- 'der' => 'application/x-x509-ca-cert',
- 'fig' => 'application/x-xfig',
- 'xlf' => 'application/x-xliff+xml',
- 'xpi' => 'application/x-xpinstall',
- 'xz' => 'application/x-xz',
- 'z1' => 'application/x-zmachine',
- 'xaml' => 'application/xaml+xml',
- 'xdf' => 'application/xcap-diff+xml',
- 'xenc' => 'application/xenc+xml',
- 'xhtml' => 'application/xhtml+xml',
- 'xml' => 'application/xml',
- 'dtd' => 'application/xml-dtd',
- 'xop' => 'application/xop+xml',
- 'xpl' => 'application/xproc+xml',
- 'xslt' => 'application/xslt+xml',
- 'xspf' => 'application/xspf+xml',
- 'mxml' => 'application/xv+xml',
- 'yang' => 'application/yang',
- 'yin' => 'application/yin+xml',
- 'zip' => 'application/zip',
- 'adp' => 'audio/adpcm',
- 'au' => 'audio/basic',
- 'mid' => 'audio/midi',
- 'mp3' => 'audio/mpeg',
- 'mp4a' => 'audio/mp4',
- 'mpga' => 'audio/mpeg',
- 'oga' => 'audio/ogg',
- 's3m' => 'audio/s3m',
- 'sil' => 'audio/silk',
- 'uva' => 'audio/vnd.dece.audio',
- 'eol' => 'audio/vnd.digital-winds',
- 'dra' => 'audio/vnd.dra',
- 'dts' => 'audio/vnd.dts',
- 'dtshd' => 'audio/vnd.dts.hd',
- 'lvp' => 'audio/vnd.lucent.voice',
- 'pya' => 'audio/vnd.ms-playready.media.pya',
- 'ecelp4800' => 'audio/vnd.nuera.ecelp4800',
- 'ecelp7470' => 'audio/vnd.nuera.ecelp7470',
- 'ecelp9600' => 'audio/vnd.nuera.ecelp9600',
- 'rip' => 'audio/vnd.rip',
- 'weba' => 'audio/webm',
- 'aac' => 'audio/x-aac',
- 'aif' => 'audio/x-aiff',
- 'caf' => 'audio/x-caf',
- 'flac' => 'audio/x-flac',
- 'mka' => 'audio/x-matroska',
- 'm3u' => 'audio/x-mpegurl',
- 'wax' => 'audio/x-ms-wax',
- 'wma' => 'audio/x-ms-wma',
- 'ram' => 'audio/x-pn-realaudio',
- 'rmp' => 'audio/x-pn-realaudio-plugin',
- 'wav' => 'audio/x-wav',
- 'xm' => 'audio/xm',
- 'cdx' => 'chemical/x-cdx',
- 'cif' => 'chemical/x-cif',
- 'cmdf' => 'chemical/x-cmdf',
- 'cml' => 'chemical/x-cml',
- 'csml' => 'chemical/x-csml',
- 'xyz' => 'chemical/x-xyz',
- 'bmp' => 'image/bmp',
- 'cgm' => 'image/cgm',
- 'g3' => 'image/g3fax',
- 'gif' => 'image/gif',
- 'ief' => 'image/ief',
- 'jpg' => 'image/jpeg',
- 'jpeg' => 'image/jpeg',
- 'ktx' => 'image/ktx',
- 'png' => 'image/png',
- 'btif' => 'image/prs.btif',
- 'sgi' => 'image/sgi',
- 'svg' => 'image/svg+xml',
- 'tiff' => 'image/tiff',
- 'psd' => 'image/vnd.adobe.photoshop',
- 'uvi' => 'image/vnd.dece.graphic',
- 'djvu' => 'image/vnd.djvu',
- 'dwg' => 'image/vnd.dwg',
- 'dxf' => 'image/vnd.dxf',
- 'fbs' => 'image/vnd.fastbidsheet',
- 'fpx' => 'image/vnd.fpx',
- 'fst' => 'image/vnd.fst',
- 'mmr' => 'image/vnd.fujixerox.edmics-mmr',
- 'rlc' => 'image/vnd.fujixerox.edmics-rlc',
- 'mdi' => 'image/vnd.ms-modi',
- 'wdp' => 'image/vnd.ms-photo',
- 'npx' => 'image/vnd.net-fpx',
- 'wbmp' => 'image/vnd.wap.wbmp',
- 'xif' => 'image/vnd.xiff',
- 'webp' => 'image/webp',
- '3ds' => 'image/x-3ds',
- 'ras' => 'image/x-cmu-raster',
- 'cmx' => 'image/x-cmx',
- 'fh' => 'image/x-freehand',
- 'ico' => 'image/x-icon',
- 'sid' => 'image/x-mrsid-image',
- 'pcx' => 'image/x-pcx',
- 'pic' => 'image/x-pict',
- 'pnm' => 'image/x-portable-anymap',
- 'pbm' => 'image/x-portable-bitmap',
- 'pgm' => 'image/x-portable-graymap',
- 'ppm' => 'image/x-portable-pixmap',
- 'rgb' => 'image/x-rgb',
- 'tga' => 'image/x-tga',
- 'xbm' => 'image/x-xbitmap',
- 'xpm' => 'image/x-xpixmap',
- 'xwd' => 'image/x-xwindowdump',
- 'eml' => 'message/rfc822',
- 'igs' => 'model/iges',
- 'msh' => 'model/mesh',
- 'dae' => 'model/vnd.collada+xml',
- 'dwf' => 'model/vnd.dwf',
- 'gdl' => 'model/vnd.gdl',
- 'gtw' => 'model/vnd.gtw',
- 'mts' => 'model/vnd.mts',
- 'vtu' => 'model/vnd.vtu',
- 'wrl' => 'model/vrml',
- 'x3db' => 'model/x3d+binary',
- 'x3dv' => 'model/x3d+vrml',
- 'x3d' => 'model/x3d+xml',
- 'appcache' => 'text/cache-manifest',
- 'ics' => 'text/calendar',
- 'css' => 'text/css',
- 'csv' => 'text/csv',
- 'html' => 'text/html',
- 'n3' => 'text/n3',
- 'txt' => 'text/plain',
- 'dsc' => 'text/prs.lines.tag',
- 'rtx' => 'text/richtext',
- 'rtf' => 'text/rtf',
- 'sgml' => 'text/sgml',
- 'tsv' => 'text/tab-separated-values',
- 't' => 'text/troff',
- 'ttl' => 'text/turtle',
- 'uri' => 'text/uri-list',
- 'vcard' => 'text/vcard',
- 'curl' => 'text/vnd.curl',
- 'dcurl' => 'text/vnd.curl.dcurl',
- 'scurl' => 'text/vnd.curl.scurl',
- 'mcurl' => 'text/vnd.curl.mcurl',
- 'sub' => 'text/vnd.dvb.subtitle',
- 'fly' => 'text/vnd.fly',
- 'flx' => 'text/vnd.fmi.flexstor',
- 'gv' => 'text/vnd.graphviz',
- '3dml' => 'text/vnd.in3d.3dml',
- 'spot' => 'text/vnd.in3d.spot',
- 'jad' => 'text/vnd.sun.j2me.app-descriptor',
- 'wml' => 'text/vnd.wap.wml',
- 'wmls' => 'text/vnd.wap.wmlscript',
- 's' => 'text/x-asm',
- 'c' => 'text/x-c',
- 'f' => 'text/x-fortran',
- 'p' => 'text/x-pascal',
- 'java' => 'text/x-java-source',
- 'opml' => 'text/x-opml',
- 'nfo' => 'text/x-nfo',
- 'etx' => 'text/x-setext',
- 'sfv' => 'text/x-sfv',
- 'uu' => 'text/x-uuencode',
- 'vcs' => 'text/x-vcalendar',
- 'vcf' => 'text/x-vcard',
- '3gp' => 'video/3gpp',
- '3g2' => 'video/3gpp2',
- 'h261' => 'video/h261',
- 'h263' => 'video/h263',
- 'h264' => 'video/h264',
- 'jpgv' => 'video/jpeg',
- 'jpm' => 'video/jpm',
- 'mj2' => 'video/mj2',
- 'mp4' => 'video/mp4',
- 'mpeg' => 'video/mpeg',
- 'ogv' => 'video/ogg',
- 'mov' => 'video/quicktime',
- 'qt' => 'video/quicktime',
- 'uvh' => 'video/vnd.dece.hd',
- 'uvm' => 'video/vnd.dece.mobile',
- 'uvp' => 'video/vnd.dece.pd',
- 'uvs' => 'video/vnd.dece.sd',
- 'uvv' => 'video/vnd.dece.video',
- 'dvb' => 'video/vnd.dvb.file',
- 'fvt' => 'video/vnd.fvt',
- 'mxu' => 'video/vnd.mpegurl',
- 'pyv' => 'video/vnd.ms-playready.media.pyv',
- 'uvu' => 'video/vnd.uvvu.mp4',
- 'viv' => 'video/vnd.vivo',
- 'webm' => 'video/webm',
- 'f4v' => 'video/x-f4v',
- 'fli' => 'video/x-fli',
- 'flv' => 'video/x-flv',
- 'm4v' => 'video/x-m4v',
- 'mkv' => 'video/x-matroska',
- 'mng' => 'video/x-mng',
- 'asf' => 'video/x-ms-asf',
- 'vob' => 'video/x-ms-vob',
- 'wm' => 'video/x-ms-wm',
- 'wmv' => 'video/x-ms-wmv',
- 'wmx' => 'video/x-ms-wmx',
- 'wvx' => 'video/x-ms-wvx',
- 'avi' => 'video/x-msvideo',
- 'movie' => 'video/x-sgi-movie',
- 'smv' => 'video/x-smv',
- 'ice' => 'x-conference/x-cooltalk',
- ];
+ private static $mime;
+
+ /**
+ * Get the mime types instance.
+ *
+ * @return \Symfony\Component\Mime\MimeTypesInterface
+ */
+ public static function getMimeTypes()
+ {
+ if (self::$mime === null) {
+ self::$mime = new MimeTypes();
+ }
+
+ return self::$mime;
+ }
/**
* Get the MIME type for a file based on the file's extension.
@@ -789,18 +38,18 @@ class MimeType
{
$extension = pathinfo($filename, PATHINFO_EXTENSION);
- return self::getMimeTypeFromExtension($extension);
+ return self::get($extension);
}
/**
* Get the MIME type for a given extension or return all mimes.
*
- * @param string|null $extension
- * @return string|array
+ * @param string $extension
+ * @return string
*/
- public static function get($extension = null)
+ public static function get($extension)
{
- return $extension ? self::getMimeTypeFromExtension($extension) : self::$mimes;
+ return Arr::first(self::getMimeTypes()->getMimeTypes($extension)) ?? 'application/octet-stream';
}
/**
@@ -811,17 +60,6 @@ class MimeType
*/
public static function search($mimeType)
{
- return array_search($mimeType, self::$mimes) ?: null;
- }
-
- /**
- * Get the MIME type for a given extension.
- *
- * @param string $extension
- * @return string
- */
- protected static function getMimeTypeFromExtension($extension)
- {
- return self::$mimes[$extension] ?? 'application/octet-stream';
+ return Arr::first(self::getMimeTypes()->getExtensions($mimeType));
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Http/UploadedFile.php b/vendor/laravel/framework/src/Illuminate/Http/UploadedFile.php
index 7962209b4..4e9f6f65b 100644
--- a/vendor/laravel/framework/src/Illuminate/Http/UploadedFile.php
+++ b/vendor/laravel/framework/src/Illuminate/Http/UploadedFile.php
@@ -2,11 +2,12 @@
namespace Illuminate\Http;
-use Illuminate\Support\Arr;
use Illuminate\Container\Container;
-use Illuminate\Support\Traits\Macroable;
-use Illuminate\Contracts\Filesystem\FileNotFoundException;
use Illuminate\Contracts\Filesystem\Factory as FilesystemFactory;
+use Illuminate\Contracts\Filesystem\FileNotFoundException;
+use Illuminate\Http\Testing\FileFactory;
+use Illuminate\Support\Arr;
+use Illuminate\Support\Traits\Macroable;
use Symfony\Component\HttpFoundation\File\UploadedFile as SymfonyUploadedFile;
class UploadedFile extends SymfonyUploadedFile
@@ -20,7 +21,7 @@ class UploadedFile extends SymfonyUploadedFile
*/
public static function fake()
{
- return new Testing\FileFactory;
+ return new FileFactory;
}
/**
@@ -97,7 +98,7 @@ class UploadedFile extends SymfonyUploadedFile
public function get()
{
if (! $this->isValid()) {
- throw new FileNotFoundException("File does not exist at path {$this->getPathname()}");
+ throw new FileNotFoundException("File does not exist at path {$this->getPathname()}.");
}
return file_get_contents($this->getPathname());
@@ -117,7 +118,7 @@ class UploadedFile extends SymfonyUploadedFile
* Create a new file instance from a base instance.
*
* @param \Symfony\Component\HttpFoundation\File\UploadedFile $file
- * @param bool $test
+ * @param bool $test
* @return static
*/
public static function createFromBase(SymfonyUploadedFile $file, $test = false)
diff --git a/vendor/laravel/framework/src/Illuminate/Http/composer.json b/vendor/laravel/framework/src/Illuminate/Http/composer.json
index eb9ba2107..c85bcc734 100755
--- a/vendor/laravel/framework/src/Illuminate/Http/composer.json
+++ b/vendor/laravel/framework/src/Illuminate/Http/composer.json
@@ -14,12 +14,13 @@
}
],
"require": {
- "php": "^7.1.3",
+ "php": "^7.2.5|^8.0",
"ext-json": "*",
- "illuminate/session": "5.8.*",
- "illuminate/support": "5.8.*",
- "symfony/http-foundation": "^4.2",
- "symfony/http-kernel": "^4.2"
+ "illuminate/session": "^7.0",
+ "illuminate/support": "^7.0",
+ "symfony/http-foundation": "^5.0",
+ "symfony/http-kernel": "^5.0",
+ "symfony/mime": "^5.0"
},
"autoload": {
"psr-4": {
@@ -27,11 +28,12 @@
}
},
"suggest": {
- "ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image()."
+ "ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image().",
+ "guzzlehttp/guzzle": "Required to use the HTTP Client (^6.3.1|^7.0.1)."
},
"extra": {
"branch-alias": {
- "dev-master": "5.8-dev"
+ "dev-master": "7.x-dev"
}
},
"config": {
diff --git a/vendor/laravel/framework/src/Illuminate/Log/LogManager.php b/vendor/laravel/framework/src/Illuminate/Log/LogManager.php
index 13b5f89fc..ab9bf51a1 100644
--- a/vendor/laravel/framework/src/Illuminate/Log/LogManager.php
+++ b/vendor/laravel/framework/src/Illuminate/Log/LogManager.php
@@ -3,19 +3,20 @@
namespace Illuminate\Log;
use Closure;
-use Throwable;
use Illuminate\Support\Str;
-use Psr\Log\LoggerInterface;
use InvalidArgumentException;
-use Monolog\Logger as Monolog;
-use Monolog\Handler\StreamHandler;
-use Monolog\Handler\SyslogHandler;
use Monolog\Formatter\LineFormatter;
use Monolog\Handler\ErrorLogHandler;
+use Monolog\Handler\FormattableHandlerInterface;
use Monolog\Handler\HandlerInterface;
use Monolog\Handler\RotatingFileHandler;
use Monolog\Handler\SlackWebhookHandler;
+use Monolog\Handler\StreamHandler;
+use Monolog\Handler\SyslogHandler;
use Monolog\Handler\WhatFailureGroupHandler;
+use Monolog\Logger as Monolog;
+use Psr\Log\LoggerInterface;
+use Throwable;
class LogManager implements LoggerInterface
{
@@ -42,6 +43,13 @@ class LogManager implements LoggerInterface
*/
protected $customCreators = [];
+ /**
+ * The standard date format to use when writing logs.
+ *
+ * @var string
+ */
+ protected $dateFormat = 'Y-m-d H:i:s';
+
/**
* Create a new Log manager instance.
*
@@ -72,7 +80,7 @@ class LogManager implements LoggerInterface
* Get a log channel instance.
*
* @param string|null $channel
- * @return mixed
+ * @return \Psr\Log\LoggerInterface
*/
public function channel($channel = null)
{
@@ -83,13 +91,21 @@ class LogManager implements LoggerInterface
* Get a log driver instance.
*
* @param string|null $driver
- * @return mixed
+ * @return \Psr\Log\LoggerInterface
*/
public function driver($driver = null)
{
return $this->get($driver ?? $this->getDefaultDriver());
}
+ /**
+ * @return array
+ */
+ public function getChannels()
+ {
+ return $this->channels;
+ }
+
/**
* Attempt to get the log from the local cache.
*
@@ -147,9 +163,17 @@ class LogManager implements LoggerInterface
*/
protected function createEmergencyLogger()
{
- return new Logger(new Monolog('laravel', $this->prepareHandlers([new StreamHandler(
- $this->app->storagePath().'/logs/laravel.log', $this->level(['level' => 'debug'])
- )])), $this->app['events']);
+ $config = $this->configurationFor('emergency');
+
+ $handler = new StreamHandler(
+ $config['path'] ?? $this->app->storagePath().'/logs/laravel.log',
+ $this->level(['level' => 'debug'])
+ );
+
+ return new Logger(
+ new Monolog('laravel', $this->prepareHandlers([$handler])),
+ $this->app['events']
+ );
}
/**
@@ -365,9 +389,17 @@ class LogManager implements LoggerInterface
*/
protected function prepareHandler(HandlerInterface $handler, array $config = [])
{
- if (! isset($config['formatter'])) {
+ $isHandlerFormattable = false;
+
+ if (Monolog::API === 1) {
+ $isHandlerFormattable = true;
+ } elseif (Monolog::API === 2 && $handler instanceof FormattableHandlerInterface) {
+ $isHandlerFormattable = true;
+ }
+
+ if ($isHandlerFormattable && ! isset($config['formatter'])) {
$handler->setFormatter($this->formatter());
- } elseif ($config['formatter'] !== 'default') {
+ } elseif ($isHandlerFormattable && $config['formatter'] !== 'default') {
$handler->setFormatter($this->app->make($config['formatter'], $config['formatter_with'] ?? []));
}
@@ -381,7 +413,7 @@ class LogManager implements LoggerInterface
*/
protected function formatter()
{
- return tap(new LineFormatter(null, null, true, true), function ($formatter) {
+ return tap(new LineFormatter(null, $this->dateFormat, true, true), function ($formatter) {
$formatter->includeStacktraces();
});
}
@@ -431,7 +463,7 @@ class LogManager implements LoggerInterface
/**
* Register a custom driver creator Closure.
*
- * @param string $driver
+ * @param string $driver
* @param \Closure $callback
* @return $this
*/
@@ -442,6 +474,21 @@ class LogManager implements LoggerInterface
return $this;
}
+ /**
+ * Unset the given channel instance.
+ *
+ * @param string|null $driver
+ * @return $this
+ */
+ public function forgetChannel($driver = null)
+ {
+ $driver = $driver ?? $this->getDefaultDriver();
+
+ if (isset($this->channels[$driver])) {
+ unset($this->channels[$driver]);
+ }
+ }
+
/**
* System is unusable.
*
diff --git a/vendor/laravel/framework/src/Illuminate/Log/LogServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Log/LogServiceProvider.php
index cd0739211..ebe545305 100644
--- a/vendor/laravel/framework/src/Illuminate/Log/LogServiceProvider.php
+++ b/vendor/laravel/framework/src/Illuminate/Log/LogServiceProvider.php
@@ -13,8 +13,8 @@ class LogServiceProvider extends ServiceProvider
*/
public function register()
{
- $this->app->singleton('log', function () {
- return new LogManager($this->app);
+ $this->app->singleton('log', function ($app) {
+ return new LogManager($app);
});
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Log/Logger.php b/vendor/laravel/framework/src/Illuminate/Log/Logger.php
index 6d5fdca2f..e5a8de628 100755
--- a/vendor/laravel/framework/src/Illuminate/Log/Logger.php
+++ b/vendor/laravel/framework/src/Illuminate/Log/Logger.php
@@ -3,12 +3,12 @@
namespace Illuminate\Log;
use Closure;
-use RuntimeException;
-use Psr\Log\LoggerInterface;
-use Illuminate\Log\Events\MessageLogged;
-use Illuminate\Contracts\Support\Jsonable;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Contracts\Support\Arrayable;
+use Illuminate\Contracts\Support\Jsonable;
+use Illuminate\Log\Events\MessageLogged;
+use Psr\Log\LoggerInterface;
+use RuntimeException;
class Logger implements LoggerInterface
{
@@ -171,9 +171,9 @@ class Logger implements LoggerInterface
*/
protected function writeLog($level, $message, $context)
{
- $this->fireLogEvent($level, $message = $this->formatMessage($message), $context);
+ $this->logger->{$level}($message = $this->formatMessage($message), $context);
- $this->logger->{$level}($message, $context);
+ $this->fireLogEvent($level, $message, $context);
}
/**
@@ -198,7 +198,7 @@ class Logger implements LoggerInterface
*
* @param string $level
* @param string $message
- * @param array $context
+ * @param array $context
* @return void
*/
protected function fireLogEvent($level, $message, array $context = [])
diff --git a/vendor/laravel/framework/src/Illuminate/Log/composer.json b/vendor/laravel/framework/src/Illuminate/Log/composer.json
index 578cf5d9f..53ebba890 100755
--- a/vendor/laravel/framework/src/Illuminate/Log/composer.json
+++ b/vendor/laravel/framework/src/Illuminate/Log/composer.json
@@ -14,10 +14,10 @@
}
],
"require": {
- "php": "^7.1.3",
- "illuminate/contracts": "5.8.*",
- "illuminate/support": "5.8.*",
- "monolog/monolog": "^1.12"
+ "php": "^7.2.5|^8.0",
+ "illuminate/contracts": "^7.0",
+ "illuminate/support": "^7.0",
+ "monolog/monolog": "^2.0"
},
"autoload": {
"psr-4": {
@@ -26,7 +26,7 @@
},
"extra": {
"branch-alias": {
- "dev-master": "5.8-dev"
+ "dev-master": "7.x-dev"
}
},
"config": {
diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Events/MessageSending.php b/vendor/laravel/framework/src/Illuminate/Mail/Events/MessageSending.php
index cff45213b..bf5bccfdf 100644
--- a/vendor/laravel/framework/src/Illuminate/Mail/Events/MessageSending.php
+++ b/vendor/laravel/framework/src/Illuminate/Mail/Events/MessageSending.php
@@ -21,7 +21,7 @@ class MessageSending
/**
* Create a new event instance.
*
- * @param \Swift_Message $message
+ * @param \Swift_Message $message
* @param array $data
* @return void
*/
diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Events/MessageSent.php b/vendor/laravel/framework/src/Illuminate/Mail/Events/MessageSent.php
index 9dee09c2f..64aef9431 100644
--- a/vendor/laravel/framework/src/Illuminate/Mail/Events/MessageSent.php
+++ b/vendor/laravel/framework/src/Illuminate/Mail/Events/MessageSent.php
@@ -2,6 +2,8 @@
namespace Illuminate\Mail\Events;
+use Swift_Attachment;
+
class MessageSent
{
/**
@@ -30,4 +32,43 @@ class MessageSent
$this->data = $data;
$this->message = $message;
}
+
+ /**
+ * Get the serializable representation of the object.
+ *
+ * @return array
+ */
+ public function __serialize()
+ {
+ $hasAttachments = collect($this->message->getChildren())
+ ->whereInstanceOf(Swift_Attachment::class)
+ ->isNotEmpty();
+
+ return $hasAttachments ? [
+ 'message' => base64_encode(serialize($this->message)),
+ 'data' => base64_encode(serialize($this->data)),
+ 'hasAttachments' => true,
+ ] : [
+ 'message' => $this->message,
+ 'data' => $this->data,
+ 'hasAttachments' => false,
+ ];
+ }
+
+ /**
+ * Marshal the object from its serialized data.
+ *
+ * @param array $data
+ * @return void
+ */
+ public function __unserialize(array $data)
+ {
+ if (isset($data['hasAttachments']) && $data['hasAttachments'] === true) {
+ $this->message = unserialize(base64_decode($data['message']));
+ $this->data = unserialize(base64_decode($data['data']));
+ } else {
+ $this->message = $data['message'];
+ $this->data = $data['data'];
+ }
+ }
}
diff --git a/vendor/laravel/framework/src/Illuminate/Mail/MailManager.php b/vendor/laravel/framework/src/Illuminate/Mail/MailManager.php
new file mode 100644
index 000000000..4c70e9a12
--- /dev/null
+++ b/vendor/laravel/framework/src/Illuminate/Mail/MailManager.php
@@ -0,0 +1,468 @@
+app = $app;
+ }
+
+ /**
+ * Get a mailer instance by name.
+ *
+ * @param string|null $name
+ * @return \Illuminate\Mail\Mailer
+ */
+ public function mailer($name = null)
+ {
+ $name = $name ?: $this->getDefaultDriver();
+
+ return $this->mailers[$name] = $this->get($name);
+ }
+
+ /**
+ * Get a mailer driver instance.
+ *
+ * @param string|null $driver
+ * @return \Illuminate\Mail\Mailer
+ */
+ public function driver($driver = null)
+ {
+ return $this->mailer($driver);
+ }
+
+ /**
+ * Attempt to get the mailer from the local cache.
+ *
+ * @param string $name
+ * @return \Illuminate\Mail\Mailer
+ */
+ protected function get($name)
+ {
+ return $this->mailers[$name] ?? $this->resolve($name);
+ }
+
+ /**
+ * Resolve the given mailer.
+ *
+ * @param string $name
+ * @return \Illuminate\Mail\Mailer
+ *
+ * @throws \InvalidArgumentException
+ */
+ protected function resolve($name)
+ {
+ $config = $this->getConfig($name);
+
+ if (is_null($config)) {
+ throw new InvalidArgumentException("Mailer [{$name}] is not defined.");
+ }
+
+ // Once we have created the mailer instance we will set a container instance
+ // on the mailer. This allows us to resolve mailer classes via containers
+ // for maximum testability on said classes instead of passing Closures.
+ $mailer = new Mailer(
+ $name,
+ $this->app['view'],
+ $this->createSwiftMailer($config),
+ $this->app['events']
+ );
+
+ if ($this->app->bound('queue')) {
+ $mailer->setQueue($this->app['queue']);
+ }
+
+ // Next we will set all of the global addresses on this mailer, which allows
+ // for easy unification of all "from" addresses as well as easy debugging
+ // of sent messages since these will be sent to a single email address.
+ foreach (['from', 'reply_to', 'to', 'return_path'] as $type) {
+ $this->setGlobalAddress($mailer, $config, $type);
+ }
+
+ return $mailer;
+ }
+
+ /**
+ * Create the SwiftMailer instance for the given configuration.
+ *
+ * @param array $config
+ * @return \Swift_Mailer
+ */
+ protected function createSwiftMailer(array $config)
+ {
+ if ($config['domain'] ?? false) {
+ Swift_DependencyContainer::getInstance()
+ ->register('mime.idgenerator.idright')
+ ->asValue($config['domain']);
+ }
+
+ return new Swift_Mailer($this->createTransport($config));
+ }
+
+ /**
+ * Create a new transport instance.
+ *
+ * @param array $config
+ * @return \Swift_Transport
+ */
+ public function createTransport(array $config)
+ {
+ // Here we will check if the "transport" key exists and if it doesn't we will
+ // assume an application is still using the legacy mail configuration file
+ // format and use the "mail.driver" configuration option instead for BC.
+ $transport = $config['transport'] ?? $this->app['config']['mail.driver'];
+
+ if (isset($this->customCreators[$transport])) {
+ return call_user_func($this->customCreators[$transport], $config);
+ }
+
+ if (trim($transport) === '' || ! method_exists($this, $method = 'create'.ucfirst($transport).'Transport')) {
+ throw new InvalidArgumentException("Unsupported mail transport [{$transport}].");
+ }
+
+ return $this->{$method}($config);
+ }
+
+ /**
+ * Create an instance of the SMTP Swift Transport driver.
+ *
+ * @param array $config
+ * @return \Swift_SmtpTransport
+ */
+ protected function createSmtpTransport(array $config)
+ {
+ // The Swift SMTP transport instance will allow us to use any SMTP backend
+ // for delivering mail such as Sendgrid, Amazon SES, or a custom server
+ // a developer has available. We will just pass this configured host.
+ $transport = new SmtpTransport(
+ $config['host'],
+ $config['port']
+ );
+
+ if (! empty($config['encryption'])) {
+ $transport->setEncryption($config['encryption']);
+ }
+
+ // Once we have the transport we will check for the presence of a username
+ // and password. If we have it we will set the credentials on the Swift
+ // transporter instance so that we'll properly authenticate delivery.
+ if (isset($config['username'])) {
+ $transport->setUsername($config['username']);
+
+ $transport->setPassword($config['password']);
+ }
+
+ return $this->configureSmtpTransport($transport, $config);
+ }
+
+ /**
+ * Configure the additional SMTP driver options.
+ *
+ * @param \Swift_SmtpTransport $transport
+ * @param array $config
+ * @return \Swift_SmtpTransport
+ */
+ protected function configureSmtpTransport($transport, array $config)
+ {
+ if (isset($config['stream'])) {
+ $transport->setStreamOptions($config['stream']);
+ }
+
+ if (isset($config['source_ip'])) {
+ $transport->setSourceIp($config['source_ip']);
+ }
+
+ if (isset($config['local_domain'])) {
+ $transport->setLocalDomain($config['local_domain']);
+ }
+
+ if (isset($config['timeout'])) {
+ $transport->setTimeout($config['timeout']);
+ }
+
+ if (isset($config['auth_mode'])) {
+ $transport->setAuthMode($config['auth_mode']);
+ }
+
+ return $transport;
+ }
+
+ /**
+ * Create an instance of the Sendmail Swift Transport driver.
+ *
+ * @param array $config
+ * @return \Swift_SendmailTransport
+ */
+ protected function createSendmailTransport(array $config)
+ {
+ return new SendmailTransport(
+ $config['path'] ?? $this->app['config']->get('mail.sendmail')
+ );
+ }
+
+ /**
+ * Create an instance of the Amazon SES Swift Transport driver.
+ *
+ * @param array $config
+ * @return \Illuminate\Mail\Transport\SesTransport
+ */
+ protected function createSesTransport(array $config)
+ {
+ if (! isset($config['secret'])) {
+ $config = array_merge($this->app['config']->get('services.ses', []), [
+ 'version' => 'latest', 'service' => 'email',
+ ]);
+ }
+
+ $config = Arr::except($config, ['transport']);
+
+ return new SesTransport(
+ new SesClient($this->addSesCredentials($config)),
+ $config['options'] ?? []
+ );
+ }
+
+ /**
+ * Add the SES credentials to the configuration array.
+ *
+ * @param array $config
+ * @return array
+ */
+ protected function addSesCredentials(array $config)
+ {
+ if (! empty($config['key']) && ! empty($config['secret'])) {
+ $config['credentials'] = Arr::only($config, ['key', 'secret', 'token']);
+ }
+
+ return $config;
+ }
+
+ /**
+ * Create an instance of the Mail Swift Transport driver.
+ *
+ * @return \Swift_SendmailTransport
+ */
+ protected function createMailTransport()
+ {
+ return new SendmailTransport;
+ }
+
+ /**
+ * Create an instance of the Mailgun Swift Transport driver.
+ *
+ * @param array $config
+ * @return \Illuminate\Mail\Transport\MailgunTransport
+ */
+ protected function createMailgunTransport(array $config)
+ {
+ if (! isset($config['secret'])) {
+ $config = $this->app['config']->get('services.mailgun', []);
+ }
+
+ return new MailgunTransport(
+ $this->guzzle($config),
+ $config['secret'],
+ $config['domain'],
+ $config['endpoint'] ?? null
+ );
+ }
+
+ /**
+ * Create an instance of the Postmark Swift Transport driver.
+ *
+ * @param array $config
+ * @return \Swift_Transport
+ */
+ protected function createPostmarkTransport(array $config)
+ {
+ return tap(new PostmarkTransport(
+ $config['token'] ?? $this->app['config']->get('services.postmark.token')
+ ), function ($transport) {
+ $transport->registerPlugin(new ThrowExceptionOnFailurePlugin());
+ });
+ }
+
+ /**
+ * Create an instance of the Log Swift Transport driver.
+ *
+ * @param array $config
+ * @return \Illuminate\Mail\Transport\LogTransport
+ */
+ protected function createLogTransport(array $config)
+ {
+ $logger = $this->app->make(LoggerInterface::class);
+
+ if ($logger instanceof LogManager) {
+ $logger = $logger->channel(
+ $config['channel'] ?? $this->app['config']->get('mail.log_channel')
+ );
+ }
+
+ return new LogTransport($logger);
+ }
+
+ /**
+ * Create an instance of the Array Swift Transport Driver.
+ *
+ * @return \Illuminate\Mail\Transport\ArrayTransport
+ */
+ protected function createArrayTransport()
+ {
+ return new ArrayTransport;
+ }
+
+ /**
+ * Get a fresh Guzzle HTTP client instance.
+ *
+ * @param array $config
+ * @return \GuzzleHttp\Client
+ */
+ protected function guzzle(array $config)
+ {
+ return new HttpClient(Arr::add(
+ $config['guzzle'] ?? [],
+ 'connect_timeout',
+ 60
+ ));
+ }
+
+ /**
+ * Set a global address on the mailer by type.
+ *
+ * @param \Illuminate\Mail\Mailer $mailer
+ * @param array $config
+ * @param string $type
+ * @return void
+ */
+ protected function setGlobalAddress($mailer, array $config, string $type)
+ {
+ $address = Arr::get($config, $type, $this->app['config']['mail.'.$type]);
+
+ if (is_array($address) && isset($address['address'])) {
+ $mailer->{'always'.Str::studly($type)}($address['address'], $address['name']);
+ }
+ }
+
+ /**
+ * Get the mail connection configuration.
+ *
+ * @param string $name
+ * @return array
+ */
+ protected function getConfig(string $name)
+ {
+ // Here we will check if the "driver" key exists and if it does we will use
+ // the entire mail configuration file as the "driver" config in order to
+ // provide "BC" for any Laravel <= 6.x style mail configuration files.
+ return $this->app['config']['mail.driver']
+ ? $this->app['config']['mail']
+ : $this->app['config']["mail.mailers.{$name}"];
+ }
+
+ /**
+ * Get the default mail driver name.
+ *
+ * @return string
+ */
+ public function getDefaultDriver()
+ {
+ // Here we will check if the "driver" key exists and if it does we will use
+ // that as the default driver in order to provide support for old styles
+ // of the Laravel mail configuration file for backwards compatibility.
+ return $this->app['config']['mail.driver'] ??
+ $this->app['config']['mail.default'];
+ }
+
+ /**
+ * Set the default mail driver name.
+ *
+ * @param string $name
+ * @return void
+ */
+ public function setDefaultDriver(string $name)
+ {
+ if ($this->app['config']['mail.driver']) {
+ $this->app['config']['mail.driver'] = $name;
+ }
+
+ $this->app['config']['mail.default'] = $name;
+ }
+
+ /**
+ * Register a custom transport creator Closure.
+ *
+ * @param string $driver
+ * @param \Closure $callback
+ * @return $this
+ */
+ public function extend($driver, Closure $callback)
+ {
+ $this->customCreators[$driver] = $callback;
+
+ return $this;
+ }
+
+ /**
+ * Dynamically call the default driver instance.
+ *
+ * @param string $method
+ * @param array $parameters
+ * @return mixed
+ */
+ public function __call($method, $parameters)
+ {
+ return $this->mailer()->$method(...$parameters);
+ }
+}
diff --git a/vendor/laravel/framework/src/Illuminate/Mail/MailServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Mail/MailServiceProvider.php
index 0f9e0feb9..d4f4682d9 100755
--- a/vendor/laravel/framework/src/Illuminate/Mail/MailServiceProvider.php
+++ b/vendor/laravel/framework/src/Illuminate/Mail/MailServiceProvider.php
@@ -2,12 +2,8 @@
namespace Illuminate\Mail;
-use Swift_Mailer;
-use Illuminate\Support\Arr;
-use Illuminate\Support\Str;
-use Swift_DependencyContainer;
-use Illuminate\Support\ServiceProvider;
use Illuminate\Contracts\Support\DeferrableProvider;
+use Illuminate\Support\ServiceProvider;
class MailServiceProvider extends ServiceProvider implements DeferrableProvider
{
@@ -18,7 +14,6 @@ class MailServiceProvider extends ServiceProvider implements DeferrableProvider
*/
public function register()
{
- $this->registerSwiftMailer();
$this->registerIlluminateMailer();
$this->registerMarkdownRenderer();
}
@@ -30,82 +25,12 @@ class MailServiceProvider extends ServiceProvider implements DeferrableProvider
*/
protected function registerIlluminateMailer()
{
- $this->app->singleton('mailer', function () {
- $config = $this->app->make('config')->get('mail');
-
- // Once we have create the mailer instance, we will set a container instance
- // on the mailer. This allows us to resolve mailer classes via containers
- // for maximum testability on said classes instead of passing Closures.
- $mailer = new Mailer(
- $this->app['view'],
- $this->app['swift.mailer'],
- $this->app['events']
- );
-
- if ($this->app->bound('queue')) {
- $mailer->setQueue($this->app['queue']);
- }
-
- // Next we will set all of the global addresses on this mailer, which allows
- // for easy unification of all "from" addresses as well as easy debugging
- // of sent messages since they get be sent into a single email address.
- foreach (['from', 'reply_to', 'to'] as $type) {
- $this->setGlobalAddress($mailer, $config, $type);
- }
-
- return $mailer;
+ $this->app->singleton('mail.manager', function ($app) {
+ return new MailManager($app);
});
- }
- /**
- * Set a global address on the mailer by type.
- *
- * @param \Illuminate\Mail\Mailer $mailer
- * @param array $config
- * @param string $type
- * @return void
- */
- protected function setGlobalAddress($mailer, array $config, $type)
- {
- $address = Arr::get($config, $type);
-
- if (is_array($address) && isset($address['address'])) {
- $mailer->{'always'.Str::studly($type)}($address['address'], $address['name']);
- }
- }
-
- /**
- * Register the Swift Mailer instance.
- *
- * @return void
- */
- public function registerSwiftMailer()
- {
- $this->registerSwiftTransport();
-
- // Once we have the transporter registered, we will register the actual Swift
- // mailer instance, passing in the transport instances, which allows us to
- // override this transporter instances during app start-up if necessary.
- $this->app->singleton('swift.mailer', function () {
- if ($domain = $this->app->make('config')->get('mail.domain')) {
- Swift_DependencyContainer::getInstance()
- ->register('mime.idgenerator.idright')
- ->asValue($domain);
- }
-
- return new Swift_Mailer($this->app['swift.transport']->driver());
- });
- }
-
- /**
- * Register the Swift Transport instance.
- *
- * @return void
- */
- protected function registerSwiftTransport()
- {
- $this->app->singleton('swift.transport', function () {
- return new TransportManager($this->app);
+ $this->app->bind('mailer', function ($app) {
+ return $app->make('mail.manager')->mailer();
});
}
@@ -122,10 +47,10 @@ class MailServiceProvider extends ServiceProvider implements DeferrableProvider
], 'laravel-mail');
}
- $this->app->singleton(Markdown::class, function () {
- $config = $this->app->make('config');
+ $this->app->singleton(Markdown::class, function ($app) {
+ $config = $app->make('config');
- return new Markdown($this->app->make('view'), [
+ return new Markdown($app->make('view'), [
'theme' => $config->get('mail.markdown.theme', 'default'),
'paths' => $config->get('mail.markdown.paths', []),
]);
@@ -140,7 +65,9 @@ class MailServiceProvider extends ServiceProvider implements DeferrableProvider
public function provides()
{
return [
- 'mailer', 'swift.mailer', 'swift.transport', Markdown::class,
+ 'mail.manager',
+ 'mailer',
+ Markdown::class,
];
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Mailable.php b/vendor/laravel/framework/src/Illuminate/Mail/Mailable.php
index e5bebd5b7..6876ba487 100644
--- a/vendor/laravel/framework/src/Illuminate/Mail/Mailable.php
+++ b/vendor/laravel/framework/src/Illuminate/Mail/Mailable.php
@@ -2,19 +2,19 @@
namespace Illuminate\Mail;
-use ReflectionClass;
-use ReflectionProperty;
-use Illuminate\Support\Str;
+use Illuminate\Container\Container;
+use Illuminate\Contracts\Filesystem\Factory as FilesystemFactory;
+use Illuminate\Contracts\Mail\Factory as MailFactory;
+use Illuminate\Contracts\Mail\Mailable as MailableContract;
+use Illuminate\Contracts\Queue\Factory as Queue;
+use Illuminate\Contracts\Support\Renderable;
use Illuminate\Support\Collection;
use Illuminate\Support\HtmlString;
-use Illuminate\Container\Container;
-use Illuminate\Support\Traits\Localizable;
-use Illuminate\Contracts\Support\Renderable;
+use Illuminate\Support\Str;
use Illuminate\Support\Traits\ForwardsCalls;
-use Illuminate\Contracts\Queue\Factory as Queue;
-use Illuminate\Contracts\Mail\Mailer as MailerContract;
-use Illuminate\Contracts\Mail\Mailable as MailableContract;
-use Illuminate\Contracts\Filesystem\Factory as FilesystemFactory;
+use Illuminate\Support\Traits\Localizable;
+use ReflectionClass;
+use ReflectionProperty;
class Mailable implements MailableContract, Renderable
{
@@ -132,6 +132,20 @@ class Mailable implements MailableContract, Renderable
*/
public $callbacks = [];
+ /**
+ * The name of the theme that should be used when formatting the message.
+ *
+ * @var string|null
+ */
+ public $theme;
+
+ /**
+ * The name of the mailer that should send the message.
+ *
+ * @var string
+ */
+ public $mailer;
+
/**
* The callback that should be invoked while building the view data.
*
@@ -142,14 +156,18 @@ class Mailable implements MailableContract, Renderable
/**
* Send the message using the given mailer.
*
- * @param \Illuminate\Contracts\Mail\Mailer $mailer
+ * @param \Illuminate\Contracts\Mail\Factory|\Illuminate\Contracts\Mail\Mailer $mailer
* @return void
*/
- public function send(MailerContract $mailer)
+ public function send($mailer)
{
return $this->withLocale($this->locale, function () use ($mailer) {
Container::getInstance()->call([$this, 'build']);
+ $mailer = $mailer instanceof MailFactory
+ ? $mailer->mailer($this->mailer)
+ : $mailer;
+
return $mailer->send($this->buildView(), $this->buildViewData(), function ($message) {
$this->buildFrom($message)
->buildRecipients($message)
@@ -177,7 +195,7 @@ class Mailable implements MailableContract, Renderable
$queueName = property_exists($this, 'queue') ? $this->queue : null;
return $queue->connection($connection)->pushOn(
- $queueName ?: null, new SendQueuedMailable($this)
+ $queueName ?: null, $this->newQueuedJob()
);
}
@@ -195,14 +213,24 @@ class Mailable implements MailableContract, Renderable
$queueName = property_exists($this, 'queue') ? $this->queue : null;
return $queue->connection($connection)->laterOn(
- $queueName ?: null, $delay, new SendQueuedMailable($this)
+ $queueName ?: null, $delay, $this->newQueuedJob()
);
}
+ /**
+ * Make the queued mailable job instance.
+ *
+ * @return mixed
+ */
+ protected function newQueuedJob()
+ {
+ return new SendQueuedMailable($this);
+ }
+
/**
* Render the mailable into a view.
*
- * @return \Illuminate\View\View
+ * @return string
*
* @throws \ReflectionException
*/
@@ -613,6 +641,12 @@ class Mailable implements MailableContract, Renderable
protected function normalizeRecipient($recipient)
{
if (is_array($recipient)) {
+ if (array_values($recipient) === $recipient) {
+ return (object) array_map(function ($email) {
+ return compact('email');
+ }, $recipient);
+ }
+
return (object) $recipient;
} elseif (is_string($recipient)) {
return (object) ['email' => $recipient];
@@ -724,7 +758,7 @@ class Mailable implements MailableContract, Renderable
* Set the view data for the message.
*
* @param string|array $key
- * @param mixed $value
+ * @param mixed $value
* @return $this
*/
public function with($key, $value = null)
@@ -747,7 +781,10 @@ class Mailable implements MailableContract, Renderable
*/
public function attach($file, array $options = [])
{
- $this->attachments[] = compact('file', 'options');
+ $this->attachments = collect($this->attachments)
+ ->push(compact('file', 'options'))
+ ->unique('file')
+ ->all();
return $this;
}
@@ -776,12 +813,14 @@ class Mailable implements MailableContract, Renderable
*/
public function attachFromStorageDisk($disk, $path, $name = null, array $options = [])
{
- $this->diskAttachments[] = [
+ $this->diskAttachments = collect($this->diskAttachments)->push([
'disk' => $disk,
'path' => $path,
'name' => $name ?? basename($path),
'options' => $options,
- ];
+ ])->unique(function ($file) {
+ return $file['name'].$file['disk'].$file['path'];
+ })->all();
return $this;
}
@@ -796,7 +835,24 @@ class Mailable implements MailableContract, Renderable
*/
public function attachData($data, $name, array $options = [])
{
- $this->rawAttachments[] = compact('data', 'name', 'options');
+ $this->rawAttachments = collect($this->rawAttachments)
+ ->push(compact('data', 'name', 'options'))
+ ->unique(function ($file) {
+ return $file['name'].$file['data'];
+ })->all();
+
+ return $this;
+ }
+
+ /**
+ * Set the name of the mailer that should send the message.
+ *
+ * @param string $mailer
+ * @return $this
+ */
+ public function mailer($mailer)
+ {
+ $this->mailer = $mailer;
return $this;
}
@@ -825,11 +881,30 @@ class Mailable implements MailableContract, Renderable
static::$viewDataCallback = $callback;
}
+ /**
+ * Apply the callback's message changes if the given "value" is true.
+ *
+ * @param mixed $value
+ * @param callable $callback
+ * @param mixed $default
+ * @return mixed|$this
+ */
+ public function when($value, $callback, $default = null)
+ {
+ if ($value) {
+ return $callback($this, $value) ?: $this;
+ } elseif ($default) {
+ return $default($this, $value) ?: $this;
+ }
+
+ return $this;
+ }
+
/**
* Dynamically bind parameters to the message.
*
* @param string $method
- * @param array $parameters
+ * @param array $parameters
* @return $this
*
* @throws \BadMethodCallException
diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php b/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php
index a088d3f8f..84e14b4a7 100755
--- a/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php
+++ b/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php
@@ -2,23 +2,32 @@
namespace Illuminate\Mail;
-use Swift_Mailer;
-use InvalidArgumentException;
-use Illuminate\Support\HtmlString;
-use Illuminate\Contracts\View\Factory;
-use Illuminate\Support\Traits\Macroable;
-use Illuminate\Contracts\Support\Htmlable;
use Illuminate\Contracts\Events\Dispatcher;
-use Illuminate\Contracts\Queue\ShouldQueue;
-use Illuminate\Contracts\Mail\Mailer as MailerContract;
-use Illuminate\Contracts\Queue\Factory as QueueContract;
use Illuminate\Contracts\Mail\Mailable as MailableContract;
+use Illuminate\Contracts\Mail\Mailer as MailerContract;
use Illuminate\Contracts\Mail\MailQueue as MailQueueContract;
+use Illuminate\Contracts\Queue\Factory as QueueContract;
+use Illuminate\Contracts\Queue\ShouldQueue;
+use Illuminate\Contracts\Support\Htmlable;
+use Illuminate\Contracts\View\Factory;
+use Illuminate\Mail\Events\MessageSending;
+use Illuminate\Mail\Events\MessageSent;
+use Illuminate\Support\HtmlString;
+use Illuminate\Support\Traits\Macroable;
+use InvalidArgumentException;
+use Swift_Mailer;
class Mailer implements MailerContract, MailQueueContract
{
use Macroable;
+ /**
+ * The name that is configured for the mailer.
+ *
+ * @var string
+ */
+ protected $name;
+
/**
* The view factory instance.
*
@@ -54,6 +63,13 @@ class Mailer implements MailerContract, MailQueueContract
*/
protected $replyTo;
+ /**
+ * The global return path address.
+ *
+ * @var array
+ */
+ protected $returnPath;
+
/**
* The global to address and name.
*
@@ -78,13 +94,15 @@ class Mailer implements MailerContract, MailQueueContract
/**
* Create a new Mailer instance.
*
+ * @param string $name
* @param \Illuminate\Contracts\View\Factory $views
* @param \Swift_Mailer $swift
* @param \Illuminate\Contracts\Events\Dispatcher|null $events
* @return void
*/
- public function __construct(Factory $views, Swift_Mailer $swift, Dispatcher $events = null)
+ public function __construct(string $name, Factory $views, Swift_Mailer $swift, Dispatcher $events = null)
{
+ $this->name = $name;
$this->views = $views;
$this->swift = $swift;
$this->events = $events;
@@ -114,6 +132,17 @@ class Mailer implements MailerContract, MailQueueContract
$this->replyTo = compact('address', 'name');
}
+ /**
+ * Set the global return path address.
+ *
+ * @param string $address
+ * @return void
+ */
+ public function alwaysReturnPath($address)
+ {
+ $this->returnPath = compact('address');
+ }
+
/**
* Set the global to address and name.
*
@@ -218,7 +247,7 @@ class Mailer implements MailerContract, MailQueueContract
/**
* Send a new message using a view.
*
- * @param string|array|\Illuminate\Contracts\Mail\Mailable $view
+ * @param \Illuminate\Contracts\Mail\Mailable|string|array $view
* @param array $data
* @param \Closure|string|null $callback
* @return void
@@ -239,7 +268,7 @@ class Mailer implements MailerContract, MailQueueContract
// Once we have retrieved the view content for the e-mail we will set the body
// of this message using the HTML type, which will provide a simple wrapper
// to creating view based emails that are able to receive arrays of data.
- call_user_func($callback, $message);
+ $callback($message);
$this->addContent($message, $view, $plain, $raw, $data);
@@ -271,8 +300,8 @@ class Mailer implements MailerContract, MailQueueContract
protected function sendMailable(MailableContract $mailable)
{
return $mailable instanceof ShouldQueue
- ? $mailable->queue($this->queue)
- : $mailable->send($this);
+ ? $mailable->mailer($this->name)->queue($this->queue)
+ : $mailable->mailer($this->name)->send($this);
}
/**
@@ -329,7 +358,7 @@ class Mailer implements MailerContract, MailQueueContract
if (isset($plain)) {
$method = isset($view) ? 'addPart' : 'setBody';
- $message->$method($this->renderView($plain, $data), 'text/plain');
+ $message->$method($this->renderView($plain, $data) ?: ' ', 'text/plain');
}
if (isset($raw)) {
@@ -369,7 +398,7 @@ class Mailer implements MailerContract, MailQueueContract
/**
* Queue a new e-mail message for sending.
*
- * @param \Illuminate\Contracts\Mail\Mailable $view
+ * @param \Illuminate\Contracts\Mail\Mailable|string|array $view
* @param string|null $queue
* @return mixed
*
@@ -385,7 +414,7 @@ class Mailer implements MailerContract, MailQueueContract
$view->onQueue($queue);
}
- return $view->queue($this->queue);
+ return $view->mailer($this->name)->queue($this->queue);
}
/**
@@ -430,7 +459,9 @@ class Mailer implements MailerContract, MailQueueContract
throw new InvalidArgumentException('Only mailables may be queued.');
}
- return $view->later($delay, is_null($queue) ? $this->queue : $queue);
+ return $view->mailer($this->name)->later(
+ $delay, is_null($queue) ? $this->queue : $queue
+ );
}
/**
@@ -469,6 +500,10 @@ class Mailer implements MailerContract, MailQueueContract
$message->replyTo($this->replyTo['address'], $this->replyTo['name']);
}
+ if (! empty($this->returnPath['address'])) {
+ $message->returnPath($this->returnPath['address']);
+ }
+
return $message;
}
@@ -480,6 +515,8 @@ class Mailer implements MailerContract, MailQueueContract
*/
protected function sendSwiftMessage($message)
{
+ $this->failedRecipients = [];
+
try {
return $this->swift->send($message, $this->failedRecipients);
} finally {
@@ -501,7 +538,7 @@ class Mailer implements MailerContract, MailQueueContract
}
return $this->events->until(
- new Events\MessageSending($message, $data)
+ new MessageSending($message, $data)
) !== false;
}
@@ -516,7 +553,7 @@ class Mailer implements MailerContract, MailQueueContract
{
if ($this->events) {
$this->events->dispatch(
- new Events\MessageSent($message->getSwiftMessage(), $data)
+ new MessageSent($message->getSwiftMessage(), $data)
);
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Markdown.php b/vendor/laravel/framework/src/Illuminate/Mail/Markdown.php
index d25c59937..65b6bdeb9 100644
--- a/vendor/laravel/framework/src/Illuminate/Mail/Markdown.php
+++ b/vendor/laravel/framework/src/Illuminate/Mail/Markdown.php
@@ -2,9 +2,12 @@
namespace Illuminate\Mail;
-use Parsedown;
-use Illuminate\Support\HtmlString;
use Illuminate\Contracts\View\Factory as ViewFactory;
+use Illuminate\Support\HtmlString;
+use Illuminate\Support\Str;
+use League\CommonMark\CommonMarkConverter;
+use League\CommonMark\Environment;
+use League\CommonMark\Extension\Table\TableExtension;
use TijsVerkoyen\CssToInlineStyles\CssToInlineStyles;
class Markdown
@@ -60,8 +63,12 @@ class Markdown
'mail', $this->htmlComponentPaths()
)->make($view, $data)->render();
+ $theme = Str::contains($this->theme, '::')
+ ? $this->theme
+ : 'mail::themes.'.$this->theme;
+
return new HtmlString(($inliner ?: new CssToInlineStyles)->convert(
- $contents, $this->view->make('mail::themes.'.$this->theme)->render()
+ $contents, $this->view->make($theme, $data)->render()
));
}
@@ -93,9 +100,15 @@ class Markdown
*/
public static function parse($text)
{
- $parsedown = new Parsedown;
+ $environment = Environment::createCommonMarkEnvironment();
- return new HtmlString($parsedown->text($text));
+ $environment->addExtension(new TableExtension);
+
+ $converter = new CommonMarkConverter([
+ 'allow_unsafe_links' => false,
+ ], $environment);
+
+ return new HtmlString($converter->convertToHtml($text));
}
/**
diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Message.php b/vendor/laravel/framework/src/Illuminate/Mail/Message.php
index 94c9dce22..d701fba9f 100755
--- a/vendor/laravel/framework/src/Illuminate/Mail/Message.php
+++ b/vendor/laravel/framework/src/Illuminate/Mail/Message.php
@@ -2,9 +2,9 @@
namespace Illuminate\Mail;
-use Swift_Image;
-use Swift_Attachment;
use Illuminate\Support\Traits\ForwardsCalls;
+use Swift_Attachment;
+use Swift_Image;
/**
* @mixin \Swift_Message
diff --git a/vendor/laravel/framework/src/Illuminate/Mail/PendingMail.php b/vendor/laravel/framework/src/Illuminate/Mail/PendingMail.php
index 017ccb976..d040f7906 100644
--- a/vendor/laravel/framework/src/Illuminate/Mail/PendingMail.php
+++ b/vendor/laravel/framework/src/Illuminate/Mail/PendingMail.php
@@ -2,10 +2,9 @@
namespace Illuminate\Mail;
-use Illuminate\Contracts\Queue\ShouldQueue;
+use Illuminate\Contracts\Mail\Mailable as MailableContract;
use Illuminate\Contracts\Mail\Mailer as MailerContract;
use Illuminate\Contracts\Translation\HasLocalePreference;
-use Illuminate\Contracts\Mail\Mailable as MailableContract;
class PendingMail
{
@@ -115,23 +114,19 @@ class PendingMail
* Send a new mailable message instance.
*
* @param \Illuminate\Contracts\Mail\Mailable $mailable
- *
* @return mixed
*/
public function send(MailableContract $mailable)
{
- if ($mailable instanceof ShouldQueue) {
- return $this->queue($mailable);
- }
-
return $this->mailer->send($this->fill($mailable));
}
/**
* Send a mailable message immediately.
*
- * @param \Illuminate\Contracts\Mail\Mailable $mailable;
+ * @param \Illuminate\Contracts\Mail\Mailable $mailable
* @return mixed
+ * @deprecated Use send() instead.
*/
public function sendNow(MailableContract $mailable)
{
@@ -141,25 +136,19 @@ class PendingMail
/**
* Push the given mailable onto the queue.
*
- * @param \Illuminate\Contracts\Mail\Mailable $mailable;
+ * @param \Illuminate\Contracts\Mail\Mailable $mailable
* @return mixed
*/
public function queue(MailableContract $mailable)
{
- $mailable = $this->fill($mailable);
-
- if (isset($mailable->delay)) {
- return $this->mailer->later($mailable->delay, $mailable);
- }
-
- return $this->mailer->queue($mailable);
+ return $this->mailer->queue($this->fill($mailable));
}
/**
* Deliver the queued message after the given delay.
*
* @param \DateTimeInterface|\DateInterval|int $delay
- * @param \Illuminate\Contracts\Mail\Mailable $mailable;
+ * @param \Illuminate\Contracts\Mail\Mailable $mailable
* @return mixed
*/
public function later($delay, MailableContract $mailable)
@@ -170,14 +159,17 @@ class PendingMail
/**
* Populate the mailable with the addresses.
*
- * @param \Illuminate\Contracts\Mail\Mailable $mailable;
+ * @param \Illuminate\Contracts\Mail\Mailable $mailable
* @return \Illuminate\Mail\Mailable
*/
protected function fill(MailableContract $mailable)
{
- return $mailable->to($this->to)
- ->cc($this->cc)
- ->bcc($this->bcc)
- ->locale($this->locale);
+ return tap($mailable->to($this->to)
+ ->cc($this->cc)
+ ->bcc($this->bcc), function (MailableContract $mailable) {
+ if ($this->locale) {
+ $mailable->locale($this->locale);
+ }
+ });
}
}
diff --git a/vendor/laravel/framework/src/Illuminate/Mail/SendQueuedMailable.php b/vendor/laravel/framework/src/Illuminate/Mail/SendQueuedMailable.php
index 8ab68f46d..0747a884a 100644
--- a/vendor/laravel/framework/src/Illuminate/Mail/SendQueuedMailable.php
+++ b/vendor/laravel/framework/src/Illuminate/Mail/SendQueuedMailable.php
@@ -2,7 +2,7 @@
namespace Illuminate\Mail;
-use Illuminate\Contracts\Mail\Mailer as MailerContract;
+use Illuminate\Contracts\Mail\Factory as MailFactory;
use Illuminate\Contracts\Mail\Mailable as MailableContract;
class SendQueuedMailable
@@ -44,12 +44,12 @@ class SendQueuedMailable
/**
* Handle the queued job.
*
- * @param \Illuminate\Contracts\Mail\Mailer $mailer
+ * @param \Illuminate\Contracts\Mail\Factory $factory
* @return void
*/
- public function handle(MailerContract $mailer)
+ public function handle(MailFactory $factory)
{
- $this->mailable->send($mailer);
+ $this->mailable->send($factory);
}
/**
@@ -65,7 +65,7 @@ class SendQueuedMailable
/**
* Call the failed method on the mailable instance.
*
- * @param \Exception $e
+ * @param \Throwable $e
* @return void
*/
public function failed($e)
diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Transport/ArrayTransport.php b/vendor/laravel/framework/src/Illuminate/Mail/Transport/ArrayTransport.php
index 766af833c..fbedec956 100644
--- a/vendor/laravel/framework/src/Illuminate/Mail/Transport/ArrayTransport.php
+++ b/vendor/laravel/framework/src/Illuminate/Mail/Transport/ArrayTransport.php
@@ -2,8 +2,8 @@
namespace Illuminate\Mail\Transport;
-use Swift_Mime_SimpleMessage;
use Illuminate\Support\Collection;
+use Swift_Mime_SimpleMessage;
class ArrayTransport extends Transport
{
diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Transport/LogTransport.php b/vendor/laravel/framework/src/Illuminate/Mail/Transport/LogTransport.php
index fb796d57f..43a2faa20 100644
--- a/vendor/laravel/framework/src/Illuminate/Mail/Transport/LogTransport.php
+++ b/vendor/laravel/framework/src/Illuminate/Mail/Transport/LogTransport.php
@@ -43,7 +43,7 @@ class LogTransport extends Transport
/**
* Get a loggable string out of a Swiftmailer entity.
*
- * @param \Swift_Mime_SimpleMimeEntity $entity
+ * @param \Swift_Mime_SimpleMimeEntity $entity
* @return string
*/
protected function getMimeEntityString(Swift_Mime_SimpleMimeEntity $entity)
diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Transport/MailgunTransport.php b/vendor/laravel/framework/src/Illuminate/Mail/Transport/MailgunTransport.php
index 5026cbb5e..195c00032 100644
--- a/vendor/laravel/framework/src/Illuminate/Mail/Transport/MailgunTransport.php
+++ b/vendor/laravel/framework/src/Illuminate/Mail/Transport/MailgunTransport.php
@@ -2,8 +2,8 @@
namespace Illuminate\Mail\Transport;
-use Swift_Mime_SimpleMessage;
use GuzzleHttp\ClientInterface;
+use Swift_Mime_SimpleMessage;
class MailgunTransport extends Transport
{
@@ -62,6 +62,8 @@ class MailgunTransport extends Transport
$to = $this->getTo($message);
+ $bcc = $message->getBcc();
+
$message->setBcc([]);
$response = $this->client->request(
@@ -74,6 +76,8 @@ class MailgunTransport extends Transport
'X-Mailgun-Message-ID', $this->getMessageId($response)
);
+ $message->setBcc($bcc);
+
$this->sendPerformed($message);
return $this->numberOfRecipients($message);
diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Transport/MandrillTransport.php b/vendor/laravel/framework/src/Illuminate/Mail/Transport/MandrillTransport.php
deleted file mode 100644
index e8e6ae168..000000000
--- a/vendor/laravel/framework/src/Illuminate/Mail/Transport/MandrillTransport.php
+++ /dev/null
@@ -1,105 +0,0 @@
-key = $key;
- $this->client = $client;
- }
-
- /**
- * {@inheritdoc}
- */
- public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null)
- {
- $this->beforeSendPerformed($message);
-
- $this->client->request('POST', 'https://mandrillapp.com/api/1.0/messages/send-raw.json', [
- 'form_params' => [
- 'key' => $this->key,
- 'to' => $this->getTo($message),
- 'raw_message' => $message->toString(),
- 'async' => true,
- ],
- ]);
-
- $this->sendPerformed($message);
-
- return $this->numberOfRecipients($message);
- }
-
- /**
- * Get all the addresses this message should be sent to.
- *
- * Note that Mandrill still respects CC, BCC headers in raw message itself.
- *
- * @param \Swift_Mime_SimpleMessage $message
- * @return array
- */
- protected function getTo(Swift_Mime_SimpleMessage $message)
- {
- $to = [];
-
- if ($message->getTo()) {
- $to = array_merge($to, array_keys($message->getTo()));
- }
-
- if ($message->getCc()) {
- $to = array_merge($to, array_keys($message->getCc()));
- }
-
- if ($message->getBcc()) {
- $to = array_merge($to, array_keys($message->getBcc()));
- }
-
- return $to;
- }
-
- /**
- * Get the API key being used by the transport.
- *
- * @return string
- */
- public function getKey()
- {
- return $this->key;
- }
-
- /**
- * Set the API key being used by the transport.
- *
- * @param string $key
- * @return string
- */
- public function setKey($key)
- {
- return $this->key = $key;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Transport/SparkPostTransport.php b/vendor/laravel/framework/src/Illuminate/Mail/Transport/SparkPostTransport.php
deleted file mode 100644
index a2358f1d8..000000000
--- a/vendor/laravel/framework/src/Illuminate/Mail/Transport/SparkPostTransport.php
+++ /dev/null
@@ -1,169 +0,0 @@
-key = $key;
- $this->client = $client;
- $this->options = $options;
- }
-
- /**
- * {@inheritdoc}
- */
- public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null)
- {
- $this->beforeSendPerformed($message);
-
- $recipients = $this->getRecipients($message);
-
- $message->setBcc([]);
-
- $response = $this->client->request('POST', $this->getEndpoint(), [
- 'headers' => [
- 'Authorization' => $this->key,
- ],
- 'json' => array_merge([
- 'recipients' => $recipients,
- 'content' => [
- 'email_rfc822' => $message->toString(),
- ],
- ], $this->options),
- ]);
-
- $message->getHeaders()->addTextHeader(
- 'X-SparkPost-Transmission-ID', $this->getTransmissionId($response)
- );
-
- $this->sendPerformed($message);
-
- return $this->numberOfRecipients($message);
- }
-
- /**
- * Get all the addresses this message should be sent to.
- *
- * Note that SparkPost still respects CC, BCC headers in raw message itself.
- *
- * @param \Swift_Mime_SimpleMessage $message
- * @return array
- */
- protected function getRecipients(Swift_Mime_SimpleMessage $message)
- {
- $recipients = [];
-
- foreach ((array) $message->getTo() as $email => $name) {
- $recipients[] = ['address' => compact('name', 'email')];
- }
-
- foreach ((array) $message->getCc() as $email => $name) {
- $recipients[] = ['address' => compact('name', 'email')];
- }
-
- foreach ((array) $message->getBcc() as $email => $name) {
- $recipients[] = ['address' => compact('name', 'email')];
- }
-
- return $recipients;
- }
-
- /**
- * Get the transmission ID from the response.
- *
- * @param \GuzzleHttp\Psr7\Response $response
- * @return string
- */
- protected function getTransmissionId($response)
- {
- return object_get(
- json_decode($response->getBody()->getContents()), 'results.id'
- );
- }
-
- /**
- * Get the API key being used by the transport.
- *
- * @return string
- */
- public function getKey()
- {
- return $this->key;
- }
-
- /**
- * Set the API key being used by the transport.
- *
- * @param string $key
- * @return string
- */
- public function setKey($key)
- {
- return $this->key = $key;
- }
-
- /**
- * Get the SparkPost API endpoint.
- *
- * @return string
- */
- public function getEndpoint()
- {
- return $this->getOptions()['endpoint'] ?? 'https://api.sparkpost.com/api/v1/transmissions';
- }
-
- /**
- * Get the transmission options being used by the transport.
- *
- * @return array
- */
- public function getOptions()
- {
- return $this->options;
- }
-
- /**
- * Set the transmission options being used by the transport.
- *
- * @param array $options
- * @return array
- */
- public function setOptions(array $options)
- {
- return $this->options = $options;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Transport/Transport.php b/vendor/laravel/framework/src/Illuminate/Mail/Transport/Transport.php
index bc2574997..b26bff3ff 100644
--- a/vendor/laravel/framework/src/Illuminate/Mail/Transport/Transport.php
+++ b/vendor/laravel/framework/src/Illuminate/Mail/Transport/Transport.php
@@ -2,10 +2,10 @@
namespace Illuminate\Mail\Transport;
-use Swift_Transport;
+use Swift_Events_EventListener;
use Swift_Events_SendEvent;
use Swift_Mime_SimpleMessage;
-use Swift_Events_EventListener;
+use Swift_Transport;
abstract class Transport implements Swift_Transport
{
diff --git a/vendor/laravel/framework/src/Illuminate/Mail/TransportManager.php b/vendor/laravel/framework/src/Illuminate/Mail/TransportManager.php
deleted file mode 100644
index 206727c0c..000000000
--- a/vendor/laravel/framework/src/Illuminate/Mail/TransportManager.php
+++ /dev/null
@@ -1,245 +0,0 @@
-app->make('config')->get('mail');
-
- // The Swift SMTP transport instance will allow us to use any SMTP backend
- // for delivering mail such as Sendgrid, Amazon SES, or a custom server
- // a developer has available. We will just pass this configured host.
- $transport = new SmtpTransport($config['host'], $config['port']);
-
- if (isset($config['encryption'])) {
- $transport->setEncryption($config['encryption']);
- }
-
- // Once we have the transport we will check for the presence of a username
- // and password. If we have it we will set the credentials on the Swift
- // transporter instance so that we'll properly authenticate delivery.
- if (isset($config['username'])) {
- $transport->setUsername($config['username']);
-
- $transport->setPassword($config['password']);
- }
-
- return $this->configureSmtpDriver($transport, $config);
- }
-
- /**
- * Configure the additional SMTP driver options.
- *
- * @param \Swift_SmtpTransport $transport
- * @param array $config
- * @return \Swift_SmtpTransport
- */
- protected function configureSmtpDriver($transport, $config)
- {
- if (isset($config['stream'])) {
- $transport->setStreamOptions($config['stream']);
- }
-
- if (isset($config['source_ip'])) {
- $transport->setSourceIp($config['source_ip']);
- }
-
- if (isset($config['local_domain'])) {
- $transport->setLocalDomain($config['local_domain']);
- }
-
- return $transport;
- }
-
- /**
- * Create an instance of the Sendmail Swift Transport driver.
- *
- * @return \Swift_SendmailTransport
- */
- protected function createSendmailDriver()
- {
- return new SendmailTransport($this->app['config']['mail']['sendmail']);
- }
-
- /**
- * Create an instance of the Amazon SES Swift Transport driver.
- *
- * @return \Illuminate\Mail\Transport\SesTransport
- */
- protected function createSesDriver()
- {
- $config = array_merge($this->app['config']->get('services.ses', []), [
- 'version' => 'latest', 'service' => 'email',
- ]);
-
- return new SesTransport(
- new SesClient($this->addSesCredentials($config)),
- $config['options'] ?? []
- );
- }
-
- /**
- * Add the SES credentials to the configuration array.
- *
- * @param array $config
- * @return array
- */
- protected function addSesCredentials(array $config)
- {
- if (! empty($config['key']) && ! empty($config['secret'])) {
- $config['credentials'] = Arr::only($config, ['key', 'secret', 'token']);
- }
-
- return $config;
- }
-
- /**
- * Create an instance of the Mail Swift Transport driver.
- *
- * @return \Swift_SendmailTransport
- */
- protected function createMailDriver()
- {
- return new SendmailTransport;
- }
-
- /**
- * Create an instance of the Mailgun Swift Transport driver.
- *
- * @return \Illuminate\Mail\Transport\MailgunTransport
- */
- protected function createMailgunDriver()
- {
- $config = $this->app['config']->get('services.mailgun', []);
-
- return new MailgunTransport(
- $this->guzzle($config),
- $config['secret'],
- $config['domain'],
- $config['endpoint'] ?? null
- );
- }
-
- /**
- * Create an instance of the Mandrill Swift Transport driver.
- *
- * @return \Illuminate\Mail\Transport\MandrillTransport
- */
- protected function createMandrillDriver()
- {
- $config = $this->app['config']->get('services.mandrill', []);
-
- return new MandrillTransport(
- $this->guzzle($config), $config['secret']
- );
- }
-
- /**
- * Create an instance of the SparkPost Swift Transport driver.
- *
- * @return \Illuminate\Mail\Transport\SparkPostTransport
- */
- protected function createSparkPostDriver()
- {
- $config = $this->app['config']->get('services.sparkpost', []);
-
- return new SparkPostTransport(
- $this->guzzle($config), $config['secret'], $config['options'] ?? []
- );
- }
-
- /**
- * Create an instance of the Postmark Swift Transport driver.
- *
- * @return \Swift_Transport
- */
- protected function createPostmarkDriver()
- {
- return new PostmarkTransport(
- $this->app['config']->get('services.postmark.token')
- );
- }
-
- /**
- * Create an instance of the Log Swift Transport driver.
- *
- * @return \Illuminate\Mail\Transport\LogTransport
- */
- protected function createLogDriver()
- {
- $logger = $this->app->make(LoggerInterface::class);
-
- if ($logger instanceof LogManager) {
- $logger = $logger->channel($this->app['config']['mail.log_channel']);
- }
-
- return new LogTransport($logger);
- }
-
- /**
- * Create an instance of the Array Swift Transport Driver.
- *
- * @return \Illuminate\Mail\Transport\ArrayTransport
- */
- protected function createArrayDriver()
- {
- return new ArrayTransport;
- }
-
- /**
- * Get a fresh Guzzle HTTP client instance.
- *
- * @param array $config
- * @return \GuzzleHttp\Client
- */
- protected function guzzle($config)
- {
- return new HttpClient(Arr::add(
- $config['guzzle'] ?? [], 'connect_timeout', 60
- ));
- }
-
- /**
- * Get the default mail driver name.
- *
- * @return string
- */
- public function getDefaultDriver()
- {
- return $this->app['config']['mail.driver'];
- }
-
- /**
- * Set the default mail driver name.
- *
- * @param string $name
- * @return void
- */
- public function setDefaultDriver($name)
- {
- $this->app['config']['mail.driver'] = $name;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Mail/composer.json b/vendor/laravel/framework/src/Illuminate/Mail/composer.json
index c04704a12..0eb541fac 100755
--- a/vendor/laravel/framework/src/Illuminate/Mail/composer.json
+++ b/vendor/laravel/framework/src/Illuminate/Mail/composer.json
@@ -14,15 +14,15 @@
}
],
"require": {
- "php": "^7.1.3",
+ "php": "^7.2.5|^8.0",
"ext-json": "*",
- "erusev/parsedown": "^1.7",
- "illuminate/container": "5.8.*",
- "illuminate/contracts": "5.8.*",
- "illuminate/support": "5.8.*",
+ "illuminate/container": "^7.0",
+ "illuminate/contracts": "^7.0",
+ "illuminate/support": "^7.0",
+ "league/commonmark": "^1.3",
"psr/log": "^1.0",
"swiftmailer/swiftmailer": "^6.0",
- "tijsverkoyen/css-to-inline-styles": "^2.2.1"
+ "tijsverkoyen/css-to-inline-styles": "^2.2.2"
},
"autoload": {
"psr-4": {
@@ -31,12 +31,12 @@
},
"extra": {
"branch-alias": {
- "dev-master": "5.8-dev"
+ "dev-master": "7.x-dev"
}
},
"suggest": {
- "aws/aws-sdk-php": "Required to use the SES mail driver (^3.0).",
- "guzzlehttp/guzzle": "Required to use the Mailgun and Mandrill mail drivers (^6.0).",
+ "aws/aws-sdk-php": "Required to use the SES mail driver (^3.155).",
+ "guzzlehttp/guzzle": "Required to use the Mailgun mail driver (^6.3.1|^7.0.1).",
"wildbit/swiftmailer-postmark": "Required to use Postmark mail driver (^3.0)."
},
"config": {
diff --git a/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/button.blade.php b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/button.blade.php
index 512c1d8c7..e74fe55a7 100644
--- a/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/button.blade.php
+++ b/vendor/laravel/framework/src/Illuminate/Mail/resources/views/html/button.blade.php
@@ -1,19 +1,19 @@