[更新]gitignore
5
.gitignore
vendored
@@ -1 +1,4 @@
|
||||
**/.idea
|
||||
**/.idea
|
||||
**/vendor
|
||||
**/.env
|
||||
**/node_modules
|
||||
10989
.idea/workspace.xml
generated
@@ -1,48 +0,0 @@
|
||||
name: run-tests
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
php: [8.3, 8.2, 8.1]
|
||||
laravel: [11.*, 10.*]
|
||||
stability: [prefer-stable]
|
||||
include:
|
||||
- laravel: 11.*
|
||||
testbench: 9.*
|
||||
- laravel: 10.*
|
||||
testbench: 8.*
|
||||
exclude:
|
||||
- laravel: 11.*
|
||||
php: 8.1
|
||||
|
||||
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
|
||||
coverage: none
|
||||
|
||||
- name: Setup problem matchers
|
||||
run: |
|
||||
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
|
||||
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
|
||||
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
|
||||
|
||||
- name: Execute tests
|
||||
run: vendor/bin/phpunit
|
||||
@@ -1,5 +0,0 @@
|
||||
/vendor
|
||||
composer.lock
|
||||
.idea
|
||||
.phpunit.result.cache
|
||||
.DS_Store
|
||||
@@ -1,11 +0,0 @@
|
||||
<?php
|
||||
|
||||
$finder = PhpCsFixer\Finder::create()
|
||||
->exclude('vendor')
|
||||
->in(__DIR__);
|
||||
|
||||
$config = new PhpCsFixer\Config();
|
||||
return $config->setRules([
|
||||
'@PSR12' => true,
|
||||
])
|
||||
->setFinder($finder);
|
||||
21
vendor/anourvalar/eloquent-serialize/LICENSE
vendored
@@ -1,21 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019 AnourValar
|
||||
|
||||
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.
|
||||
31
vendor/anourvalar/eloquent-serialize/README.md
vendored
@@ -1,31 +0,0 @@
|
||||
# Serialization for Eloquent's QueryBuilder
|
||||
Supports: Laravel 6 - Laravel 11
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
composer require anourvalar/eloquent-serialize
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
### Serialize
|
||||
```php
|
||||
$package = \EloquentSerialize::serialize(
|
||||
\App\User::query()
|
||||
->with('userPhones')
|
||||
->where('id', '>', '10')
|
||||
->limit(20)
|
||||
);
|
||||
```
|
||||
|
||||
|
||||
### Unserialize
|
||||
```php
|
||||
$builder = \EloquentSerialize::unserialize($package);
|
||||
|
||||
foreach ($builder->get() as $item) {
|
||||
// ...
|
||||
}
|
||||
```
|
||||
@@ -1,33 +0,0 @@
|
||||
{
|
||||
"name": "anourvalar/eloquent-serialize",
|
||||
"description": "Laravel Query Builder (Eloquent) serialization",
|
||||
"keywords": ["laravel", "query", "builder", "querybuilder", "anourvalar", "serialize", "serialization", "eloquent", "serializable", "job", "queue", "copy"],
|
||||
"homepage": "https://github.com/AnourValar/eloquent-serialize",
|
||||
"license": "MIT",
|
||||
"require": {
|
||||
"php": "^7.4|^8.0",
|
||||
"laravel/framework": "^8.0|^9.0|^10.0|^11.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^9.5|^10.5",
|
||||
"orchestra/testbench": "^6.0|^7.0|^8.0|^9.0",
|
||||
"laravel/legacy-factories": "^1.1",
|
||||
"phpstan/phpstan": "^1.10",
|
||||
"friendsofphp/php-cs-fixer": "^3.26",
|
||||
"squizlabs/php_codesniffer": "^3.7",
|
||||
"psalm/plugin-laravel": "^2.8"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {"AnourValar\\EloquentSerialize\\": "src/"}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {"AnourValar\\EloquentSerialize\\Tests\\": "tests/"}
|
||||
},
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"aliases": {
|
||||
"EloquentSerialize": "AnourValar\\EloquentSerialize\\Facades\\EloquentSerializeFacade"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
37
vendor/anourvalar/eloquent-serialize/phpcs.xml
vendored
@@ -1,37 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- @see https://pear.php.net/manual/en/package.php.php-codesniffer.annotated-ruleset.php -->
|
||||
<ruleset name="PHPCS Rules">
|
||||
|
||||
<description>PHPCS ruleset</description>
|
||||
|
||||
<file>src</file>
|
||||
<file>tests</file>
|
||||
<exclude-pattern>src/resources</exclude-pattern>
|
||||
|
||||
<!-- Show progress of the run -->
|
||||
<arg value= "p"/>
|
||||
|
||||
<!-- Show sniff codes in all reports -->
|
||||
<arg value= "s"/>
|
||||
|
||||
<!-- Our base rule: set to PSR12 -->
|
||||
<rule ref="PSR12">
|
||||
<exclude name="PSR12.Operators.OperatorSpacing.NoSpaceBefore"/>
|
||||
<exclude name="PSR12.Operators.OperatorSpacing.NoSpaceAfter"/>
|
||||
<exclude name="PSR12.Traits.UseDeclaration.MultipleImport"/>
|
||||
<exclude name="Generic.Files.LineLength.TooLong"/>
|
||||
<exclude name="PSR2.Methods.FunctionClosingBrace.SpacingBeforeClose"/>
|
||||
<exclude name="PSR12.Classes.OpeningBraceSpace.Found"/>
|
||||
<exclude name="Squiz.WhiteSpace.ControlStructureSpacing.SpacingAfterOpen"/>
|
||||
<exclude name="Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose"/>
|
||||
</rule>
|
||||
|
||||
<rule ref="PSR1.Methods.CamelCapsMethodName.NotCamelCaps">
|
||||
<exclude-pattern>tests/</exclude-pattern>
|
||||
</rule>
|
||||
|
||||
<rule ref="Internal.NoCodeFound">
|
||||
<exclude-pattern>tests/</exclude-pattern>
|
||||
</rule>
|
||||
|
||||
</ruleset>
|
||||
@@ -1,30 +0,0 @@
|
||||
parameters:
|
||||
|
||||
paths:
|
||||
- src
|
||||
- tests
|
||||
|
||||
# The level 9 is the highest level
|
||||
level: 5
|
||||
|
||||
ignoreErrors:
|
||||
- '#Access to protected property#'
|
||||
- '#should return#'
|
||||
- '#Call to an undefined static method#'
|
||||
- '#Call to an undefined method#'
|
||||
- '#Call to static method#'
|
||||
- '#Parameter \#1 \$callback of method Illuminate\\Database\\Eloquent\\Pending#'
|
||||
- '#Property Illuminate\\Database\\Query\\Builder\:\:\$groupLimit \(array\)#'
|
||||
|
||||
excludePaths:
|
||||
|
||||
checkFunctionNameCase: true
|
||||
checkInternalClassCaseSensitivity: true
|
||||
checkAlwaysTrueInstanceof: true
|
||||
reportMaybesInMethodSignatures: true
|
||||
reportStaticMethodSignatures: true
|
||||
checkUninitializedProperties: true
|
||||
checkDynamicProperties: true
|
||||
reportAlwaysTrueInLastCondition: true
|
||||
reportWrongPhpDocTypeInVarTag: true
|
||||
checkMissingCallableSignature: true
|
||||
26
vendor/anourvalar/eloquent-serialize/phpunit.xml
vendored
@@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
bootstrap="vendor/autoload.php"
|
||||
backupGlobals="false"
|
||||
colors="true"
|
||||
processIsolation="true"
|
||||
stopOnFailure="true"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
|
||||
cacheDirectory=".phpunit.cache"
|
||||
backupStaticProperties="false"
|
||||
>
|
||||
<testsuites>
|
||||
<testsuite name="EloquentSerialize">
|
||||
<directory>tests</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<php>
|
||||
<env name="DB_CONNECTION" value="testing"/>
|
||||
</php>
|
||||
<source>
|
||||
<include>
|
||||
<directory suffix=".php">src/</directory>
|
||||
</include>
|
||||
</source>
|
||||
</phpunit>
|
||||
@@ -1,29 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
bootstrap="vendor/autoload.php"
|
||||
backupGlobals="false"
|
||||
backupStaticAttributes="false"
|
||||
colors="true"
|
||||
verbose="true"
|
||||
convertErrorsToExceptions="true"
|
||||
convertNoticesToExceptions="true"
|
||||
convertWarningsToExceptions="true"
|
||||
processIsolation="true"
|
||||
stopOnFailure="true"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
|
||||
>
|
||||
<coverage>
|
||||
<include>
|
||||
<directory suffix=".php">src/</directory>
|
||||
</include>
|
||||
</coverage>
|
||||
<testsuites>
|
||||
<testsuite name="EloquentSerialize">
|
||||
<directory>tests</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<php>
|
||||
<env name="DB_CONNECTION" value="testing"/>
|
||||
</php>
|
||||
</phpunit>
|
||||
47
vendor/anourvalar/eloquent-serialize/psalm.xml
vendored
@@ -1,47 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<psalm
|
||||
errorLevel="7"
|
||||
resolveFromConfigFile="true"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="https://getpsalm.org/schema/config"
|
||||
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
|
||||
findUnusedBaselineEntry="true"
|
||||
findUnusedCode="true"
|
||||
findUnusedPsalmSuppress="true"
|
||||
findUnusedVariablesAndParams="true"
|
||||
>
|
||||
<projectFiles>
|
||||
<directory name="src"/>
|
||||
<directory name="tests"/>
|
||||
<ignoreFiles>
|
||||
<directory name="vendor"/>
|
||||
<directory name="tests/factories/"/>
|
||||
<directory name="tests/Models/"/>
|
||||
</ignoreFiles>
|
||||
</projectFiles>
|
||||
<plugins>
|
||||
<pluginClass class="Psalm\LaravelPlugin\Plugin"/>
|
||||
</plugins>
|
||||
|
||||
<issueHandlers>
|
||||
<ForbiddenCode errorLevel="error" />
|
||||
<UnusedClosureParam errorLevel="suppress" />
|
||||
<PossiblyUnusedMethod errorLevel="suppress" />
|
||||
<UnusedClass errorLevel="suppress" />
|
||||
<PossiblyUnusedParam errorLevel="suppress" />
|
||||
<PossiblyUnusedProperty errorLevel="suppress" />
|
||||
<PossiblyUnusedReturnValue errorLevel="suppress" />
|
||||
<MissingTemplateParam errorLevel="suppress" />
|
||||
<UnsupportedPropertyReferenceUsage errorLevel="suppress" />
|
||||
<InaccessibleProperty errorLevel="suppress" />
|
||||
<MissingDependency errorLevel="suppress" />
|
||||
<UnusedMethod errorLevel="suppress" />
|
||||
</issueHandlers>
|
||||
|
||||
<forbiddenFunctions>
|
||||
<function name="var_dump" />
|
||||
<function name="dd" />
|
||||
<function name="dump" />
|
||||
<function name="print_r" />
|
||||
</forbiddenFunctions>
|
||||
</psalm>
|
||||
@@ -1,20 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace AnourValar\EloquentSerialize\Facades;
|
||||
|
||||
use Illuminate\Support\Facades\Facade;
|
||||
|
||||
/**
|
||||
* @method static string serialize(\Illuminate\Database\Eloquent\Builder $builder)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder unserialize(mixed $package)
|
||||
*/
|
||||
class EloquentSerializeFacade extends Facade
|
||||
{
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
protected static function getFacadeAccessor()
|
||||
{
|
||||
return \AnourValar\EloquentSerialize\Service::class;
|
||||
}
|
||||
}
|
||||
@@ -1,147 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace AnourValar\EloquentSerialize\Grammars;
|
||||
|
||||
trait EloquentBuilderGrammar
|
||||
{
|
||||
/**
|
||||
* Serialize state for \Illuminate\Database\Eloquent\Builder
|
||||
*
|
||||
* @param \Illuminate\Database\Eloquent\Builder $builder
|
||||
* @return array
|
||||
*/
|
||||
protected function packEloquentBuilder(\Illuminate\Database\Eloquent\Builder $builder): array
|
||||
{
|
||||
return [
|
||||
'with' => $this->getEagers($builder), // preloaded ("eager") relations
|
||||
'removed_scopes' => $builder->removedScopes(), // global scopes
|
||||
'casts' => $builder->getModel()->getCasts(),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Unserialize state for \Illuminate\Database\Eloquent\Builder
|
||||
*
|
||||
* @param array $data
|
||||
* @param \Illuminate\Database\Eloquent\Builder $builder
|
||||
* @return void
|
||||
*/
|
||||
protected function unpackEloquentBuilder(array $data, \Illuminate\Database\Eloquent\Builder &$builder): void
|
||||
{
|
||||
// Preloaded ("eager") relations
|
||||
$this->setEagers($builder, $data['with']);
|
||||
|
||||
// Global scopes
|
||||
if ($data['removed_scopes']) {
|
||||
$builder->withoutGlobalScopes($data['removed_scopes']);
|
||||
}
|
||||
|
||||
// Casts
|
||||
if (method_exists($builder->getModel(), 'mergeCasts')) { // old versions support
|
||||
$builder->getModel()->mergeCasts($data['casts']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Illuminate\Database\Eloquent\Builder $builder
|
||||
* @return array
|
||||
*/
|
||||
private function getEagers(\Illuminate\Database\Eloquent\Builder $builder): array
|
||||
{
|
||||
$result = [];
|
||||
|
||||
foreach ($builder->getEagerLoads() as $name => $value) {
|
||||
$relation = $builder;
|
||||
foreach (explode('.', $name) as $part) {
|
||||
$relation = $relation->getRelation($part); // get a relation without "constraints"
|
||||
}
|
||||
$referenceRelation = clone $relation;
|
||||
|
||||
$value($relation); // apply closure
|
||||
$result[$name] = [
|
||||
'query' => $this->packQueryBuilder($relation->getQuery()->getQuery()),
|
||||
'eloquent' => $this->packEloquentBuilder($relation->getQuery()),
|
||||
'extra' => $relation->exportExtraParametersForSerialize(),
|
||||
];
|
||||
|
||||
$relation->getQuery()->getModel()->newInstance()->with($name)->getEagerLoads()[$name]($referenceRelation);
|
||||
$this->cleanStaticConstraints($result[$name]['query'], $this->packQueryBuilder($referenceRelation->getQuery()->getQuery()));
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Illuminate\Database\Eloquent\Builder $builder
|
||||
* @param array $eagers
|
||||
* @return void
|
||||
*/
|
||||
private function setEagers(\Illuminate\Database\Eloquent\Builder $builder, array $eagers): void
|
||||
{
|
||||
foreach ($eagers as &$value) {
|
||||
$value = function ($query) use ($value) {
|
||||
if (isset($value['extra'])) {
|
||||
$query->importExtraParametersForSerialize($value['extra']);
|
||||
}
|
||||
|
||||
// Input argument may be different depends on context
|
||||
while (! ($query instanceof \Illuminate\Database\Eloquent\Builder)) {
|
||||
$query = $query->getQuery();
|
||||
}
|
||||
if (isset($value['eloquent'])) {
|
||||
$this->unpackEloquentBuilder($value['eloquent'], $query);
|
||||
}
|
||||
|
||||
// Input argument may be different depends on context
|
||||
while (! ($query instanceof \Illuminate\Database\Query\Builder)) {
|
||||
$query = $query->getQuery();
|
||||
}
|
||||
|
||||
$this->unpackQueryBuilder(isset($value['query']) ? $value['query'] : $value, $query);
|
||||
};
|
||||
}
|
||||
unset($value);
|
||||
|
||||
$builder->setEagerLoads($eagers);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $packedQueryBuilder
|
||||
* @param array $packedReferenceQueryBuilder
|
||||
* @return void
|
||||
*/
|
||||
private function cleanStaticConstraints(array &$packedQueryBuilder, array $packedReferenceQueryBuilder): void
|
||||
{
|
||||
$properties = [
|
||||
'aggregate', 'columns', 'distinct', 'wheres', 'groups', 'havings', 'orders', 'limit', 'offset', 'unions',
|
||||
'unionLimit', 'unionOffset', 'unionOrders', 'joins', 'groupLimit',
|
||||
];
|
||||
|
||||
foreach ($properties as $property) {
|
||||
if (! is_array($packedQueryBuilder[$property] ?? null)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach ($packedQueryBuilder[$property] as $key => $item) {
|
||||
if (in_array($item, (array) ($packedReferenceQueryBuilder[$property] ?? null), true)) {
|
||||
unset($packedQueryBuilder[$property][$key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($packedQueryBuilder['bindings'] as $binding => $data) {
|
||||
if (! is_array($data)) {
|
||||
continue; // just in case ;)
|
||||
}
|
||||
|
||||
foreach ($data as $key => $value) {
|
||||
if (
|
||||
isset($packedReferenceQueryBuilder['bindings'][$binding][$key])
|
||||
&& $packedReferenceQueryBuilder['bindings'][$binding][$key] === $value
|
||||
) {
|
||||
unset($packedQueryBuilder['bindings'][$binding][$key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace AnourValar\EloquentSerialize\Grammars;
|
||||
|
||||
trait ModelGrammar
|
||||
{
|
||||
/**
|
||||
* Pack
|
||||
*
|
||||
* @param \Illuminate\Database\Eloquent\Builder $builder
|
||||
* @return \AnourValar\EloquentSerialize\Package
|
||||
*/
|
||||
protected function pack(\Illuminate\Database\Eloquent\Builder $builder): \AnourValar\EloquentSerialize\Package
|
||||
{
|
||||
$this->setup();
|
||||
|
||||
return new \AnourValar\EloquentSerialize\Package([
|
||||
'model' => get_class($builder->getModel()),
|
||||
'connection' => $builder->getModel()->getConnectionName(),
|
||||
'eloquent' => $this->packEloquentBuilder($builder),
|
||||
'query' => $this->packQueryBuilder($builder->getQuery()),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unpack
|
||||
*
|
||||
* @param \AnourValar\EloquentSerialize\Package $package
|
||||
* @return \Illuminate\Database\Eloquent\Builder
|
||||
*/
|
||||
protected function unpack(\AnourValar\EloquentSerialize\Package $package): \Illuminate\Database\Eloquent\Builder
|
||||
{
|
||||
$this->setup();
|
||||
|
||||
$builder = $package->get('model');
|
||||
$builder = $builder::on($package->get('connection'));
|
||||
|
||||
$this->unpackEloquentBuilder($package->get('eloquent'), $builder);
|
||||
$this->unpackQueryBuilder($package->get('query'), $builder->getQuery());
|
||||
|
||||
return $builder;
|
||||
}
|
||||
|
||||
/**
|
||||
* init
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function setup(): void
|
||||
{
|
||||
\Illuminate\Database\Eloquent\Relations\Relation::macro('importExtraParametersForSerialize', function (array $params) {
|
||||
foreach ($params as $key => $value) {
|
||||
$this->$key = $value;
|
||||
}
|
||||
});
|
||||
|
||||
\Illuminate\Database\Eloquent\Relations\Relation::macro('exportExtraParametersForSerialize', function () {
|
||||
if ($this instanceof \Illuminate\Database\Eloquent\Relations\MorphTo) {
|
||||
return [
|
||||
'morphableEagerLoads' => $this->morphableEagerLoads,
|
||||
'morphableEagerLoadCounts' => $this->morphableEagerLoadCounts,
|
||||
'morphableConstraints' => $this->morphableConstraints,
|
||||
];
|
||||
}
|
||||
|
||||
return null;
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,182 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace AnourValar\EloquentSerialize\Grammars;
|
||||
|
||||
trait QueryBuilderGrammar
|
||||
{
|
||||
/**
|
||||
* Serialize state for \Illuminate\Database\Query\Builder
|
||||
*
|
||||
* @param \Illuminate\Database\Query\Builder $builder
|
||||
* @return array
|
||||
*/
|
||||
protected function packQueryBuilder(\Illuminate\Database\Query\Builder $builder): array
|
||||
{
|
||||
return array_filter([
|
||||
'bindings' => $builder->bindings,
|
||||
'aggregate' => $builder->aggregate,
|
||||
'columns' => $builder->columns,
|
||||
'distinct' => $builder->distinct,
|
||||
'from' => $builder->from,
|
||||
'wheres' => $this->packWheres($builder->wheres),
|
||||
'groups' => $builder->groups,
|
||||
'havings' => $builder->havings,
|
||||
'groupLimit' => $builder->groupLimit ?? null,
|
||||
'orders' => $builder->orders,
|
||||
'limit' => $builder->limit,
|
||||
'offset' => $builder->offset,
|
||||
'unions' => $this->packUnions($builder->unions),
|
||||
'unionLimit' => $builder->unionLimit,
|
||||
'unionOffset' => $builder->unionOffset,
|
||||
'unionOrders' => $builder->unionOrders,
|
||||
|
||||
'joins' => $this->packJoins($builder->joins), // must be the last
|
||||
], fn ($item) => isset($item));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
* @param \Illuminate\Database\Query\Builder $builder
|
||||
* @return \Illuminate\Database\Query\Builder
|
||||
*/
|
||||
protected function unpackQueryBuilder(array $data, \Illuminate\Database\Query\Builder $builder): \Illuminate\Database\Query\Builder
|
||||
{
|
||||
foreach ($data as $key => $value) {
|
||||
if ($key == 'wheres') {
|
||||
$value = $this->unpackWheres($value, $builder);
|
||||
}
|
||||
|
||||
if ($key == 'unions') {
|
||||
$value = $this->unpackUnions($value);
|
||||
}
|
||||
|
||||
if ($key == 'joins') {
|
||||
$value = $this->unpackJoins($value, $builder);
|
||||
}
|
||||
|
||||
if (is_array($builder->$key) && is_array($value)) {
|
||||
$builder->$key = array_merge_recursive($builder->$key, $value);
|
||||
} else {
|
||||
$builder->$key = $value;
|
||||
}
|
||||
}
|
||||
|
||||
return $builder;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $wheres
|
||||
* @return mixed
|
||||
*/
|
||||
private function packWheres($wheres)
|
||||
{
|
||||
foreach ($wheres as &$item) {
|
||||
if (isset($item['query'])) {
|
||||
$item['query'] = $this->packQueryBuilder($item['query']);
|
||||
}
|
||||
}
|
||||
unset($item);
|
||||
|
||||
return $wheres;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $unions
|
||||
* @return mixed
|
||||
*/
|
||||
private function packUnions($unions)
|
||||
{
|
||||
if (! is_array($unions)) {
|
||||
return $unions;
|
||||
}
|
||||
|
||||
foreach ($unions as &$item) {
|
||||
if (isset($item['query'])) {
|
||||
$item['query'] = $this->pack($item['query']);
|
||||
}
|
||||
}
|
||||
unset($item);
|
||||
|
||||
return $unions;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $joins
|
||||
* @return mixed
|
||||
*/
|
||||
private function packJoins($joins)
|
||||
{
|
||||
if (! is_array($joins)) {
|
||||
return $joins;
|
||||
}
|
||||
|
||||
foreach ($joins as &$item) {
|
||||
$item = array_replace(
|
||||
['type' => $item->type, 'table' => $item->table],
|
||||
$this->packQueryBuilder($item)
|
||||
);
|
||||
}
|
||||
unset($item);
|
||||
|
||||
return $joins;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $wheres
|
||||
* @param \Illuminate\Database\Query\Builder $builder
|
||||
* @return mixed
|
||||
*/
|
||||
private function unpackWheres($wheres, \Illuminate\Database\Query\Builder $builder)
|
||||
{
|
||||
foreach ($wheres as &$item) {
|
||||
if (isset($item['query'])) {
|
||||
$item['query'] = $this->unpackQueryBuilder($item['query'], $builder->newQuery());
|
||||
}
|
||||
}
|
||||
unset($item);
|
||||
|
||||
return $wheres;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $unions
|
||||
* @return mixed
|
||||
*/
|
||||
private function unpackUnions($unions)
|
||||
{
|
||||
if (! is_array($unions)) {
|
||||
return $unions;
|
||||
}
|
||||
|
||||
foreach ($unions as &$item) {
|
||||
if (isset($item['query'])) {
|
||||
$item['query'] = $this->unpack($item['query']);
|
||||
}
|
||||
}
|
||||
unset($item);
|
||||
|
||||
return $unions;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $joins
|
||||
* @param \Illuminate\Database\Query\Builder $builder
|
||||
* @return mixed
|
||||
*/
|
||||
private function unpackJoins($joins, \Illuminate\Database\Query\Builder $builder)
|
||||
{
|
||||
if (! is_array($joins)) {
|
||||
return $joins;
|
||||
}
|
||||
|
||||
foreach ($joins as &$item) {
|
||||
$parentQuery = new \Illuminate\Database\Query\JoinClause($builder, $item['type'], $item['table']);
|
||||
unset($item['type'], $item['table']);
|
||||
|
||||
$item = $this->unpackQueryBuilder($item, $parentQuery);
|
||||
}
|
||||
unset($item);
|
||||
|
||||
return $joins;
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace AnourValar\EloquentSerialize;
|
||||
|
||||
class Package
|
||||
{
|
||||
/**
|
||||
* $var array
|
||||
*/
|
||||
private $data;
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(array $data)
|
||||
{
|
||||
$this->data = $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $key
|
||||
* @return mixed
|
||||
*/
|
||||
public function get(string $key = null)
|
||||
{
|
||||
if (is_null($key)) {
|
||||
return $this->data;
|
||||
}
|
||||
|
||||
return ($this->data[$key] ?? null);
|
||||
}
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace AnourValar\EloquentSerialize;
|
||||
|
||||
class Service
|
||||
{
|
||||
use \AnourValar\EloquentSerialize\Grammars\ModelGrammar;
|
||||
use \AnourValar\EloquentSerialize\Grammars\EloquentBuilderGrammar;
|
||||
use \AnourValar\EloquentSerialize\Grammars\QueryBuilderGrammar;
|
||||
|
||||
/**
|
||||
* Pack
|
||||
*
|
||||
* @param \Illuminate\Database\Eloquent\Builder $builder
|
||||
* @return string
|
||||
*/
|
||||
public function serialize(\Illuminate\Database\Eloquent\Builder $builder): string
|
||||
{
|
||||
$package = $this->pack($builder);
|
||||
|
||||
return serialize($package); // important!
|
||||
}
|
||||
|
||||
/**
|
||||
* Unpack
|
||||
*
|
||||
* @param mixed $package
|
||||
* @throws \LogicException
|
||||
* @return \Illuminate\Database\Eloquent\Builder
|
||||
*/
|
||||
public function unserialize($package): \Illuminate\Database\Eloquent\Builder
|
||||
{
|
||||
// Prepare data
|
||||
if (is_string($package)) {
|
||||
$package = unserialize($package);
|
||||
}
|
||||
if (! ($package instanceof Package)) {
|
||||
throw new \LogicException('Incorrect argument.');
|
||||
}
|
||||
|
||||
// Unpack
|
||||
return $this->unpack($package);
|
||||
}
|
||||
}
|
||||
@@ -1,146 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace AnourValar\EloquentSerialize\Tests;
|
||||
|
||||
use AnourValar\EloquentSerialize\Tests\Models\File;
|
||||
use AnourValar\EloquentSerialize\Tests\Models\User;
|
||||
use AnourValar\EloquentSerialize\Tests\Models\UserPhoneNote;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use AnourValar\EloquentSerialize\Tests\Models\Post;
|
||||
use AnourValar\EloquentSerialize\Tests\Models\Tag;
|
||||
|
||||
abstract class AbstractSuite extends \Orchestra\Testbench\TestCase
|
||||
{
|
||||
/**
|
||||
* @var \AnourValar\EloquentSerialize\Service
|
||||
*/
|
||||
protected $service;
|
||||
|
||||
/**
|
||||
* Init
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
$this->withFactories(__DIR__.'/factories');
|
||||
$this->setUpDatabase($this->app);
|
||||
$this->setUpSeeder();
|
||||
|
||||
\DB::enableQueryLog();
|
||||
|
||||
$this->service = \App::make(\AnourValar\EloquentSerialize\Service::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Illuminate\Foundation\Application $app
|
||||
* @return void
|
||||
*/
|
||||
protected function setUpDatabase(\Illuminate\Foundation\Application $app)
|
||||
{
|
||||
$app['db']->connection()->getSchemaBuilder()->create('users', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('title');
|
||||
$table->integer('sort');
|
||||
$table->jsonb('meta')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
|
||||
$app['db']->connection()->getSchemaBuilder()->create('user_phones', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('user_id');
|
||||
$table->string('phone');
|
||||
$table->boolean('is_primary');
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
$app['db']->connection()->getSchemaBuilder()->create('user_phone_notes', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('user_phone_id');
|
||||
$table->string('note');
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
$app['db']->connection()->getSchemaBuilder()->create('posts', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('user_id');
|
||||
$table->string('title');
|
||||
$table->text('body');
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
$app['db']->connection()->getSchemaBuilder()->create('files', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignIdFor(User::class);
|
||||
$table->string('type');
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
$app['db']->connection()->getSchemaBuilder()->create('tags', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('title');
|
||||
$table->bigInteger('taggable_id');
|
||||
$table->string('taggable_type');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
protected function setUpSeeder()
|
||||
{
|
||||
factory(UserPhoneNote::class)->times(80)->create();
|
||||
factory(File::class)->times(40)->create();
|
||||
|
||||
factory(Post::class)->times(10)->create();
|
||||
factory(Tag::class)->times(10)->create();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Illuminate\Database\Eloquent\Builder $builder
|
||||
* @param bool $execute
|
||||
* @return void
|
||||
*/
|
||||
protected function compare(\Illuminate\Database\Eloquent\Builder $builder, bool $execute = true): void
|
||||
{
|
||||
$referenceBuilder = clone $builder;
|
||||
$referenceSerialize = $this->service->serialize($builder);
|
||||
|
||||
for ($i = 1; $i <= 3; $i++) {
|
||||
$builder = $this->service->serialize($builder);
|
||||
$this->assertSame($referenceSerialize, $builder, "#$i");
|
||||
|
||||
$builder = json_encode($builder);
|
||||
$builder = json_decode($builder, true);
|
||||
$builder = $this->service->unserialize($builder);
|
||||
$this->assertSame($this->getScheme($referenceBuilder, $execute), $this->getScheme($builder, $execute), "#$i");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Illuminate\Database\Eloquent\Builder $builder
|
||||
* @param bool $execute
|
||||
* @return string
|
||||
*/
|
||||
private function getScheme(\Illuminate\Database\Eloquent\Builder $builder, bool $execute): string
|
||||
{
|
||||
\DB::flushQueryLog();
|
||||
if ($execute) {
|
||||
$result = $builder->get();
|
||||
} else {
|
||||
$result = [];
|
||||
}
|
||||
$logs = \DB::getQueryLog();
|
||||
|
||||
foreach ($logs as &$log) {
|
||||
unset($log['time']);
|
||||
}
|
||||
unset($log);
|
||||
|
||||
return json_encode(['query' => $logs, 'result' => $result], JSON_PRETTY_PRINT);
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace AnourValar\EloquentSerialize\Tests\Casts;
|
||||
|
||||
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
|
||||
|
||||
class TestCast implements CastsAttributes
|
||||
{
|
||||
/**
|
||||
* Cast the given value.
|
||||
*
|
||||
* @param \Illuminate\Database\Eloquent\Model $model
|
||||
* @param string $key
|
||||
* @param mixed $value
|
||||
* @param array $attributes
|
||||
* @return mixed
|
||||
*/
|
||||
public function get($model, string $key, $value, array $attributes)
|
||||
{
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare the given value for storage.
|
||||
*
|
||||
* @param \Illuminate\Database\Eloquent\Model $model
|
||||
* @param string $key
|
||||
* @param mixed $value
|
||||
* @param array $attributes
|
||||
* @return mixed
|
||||
*/
|
||||
public function set($model, string $key, $value, array $attributes)
|
||||
{
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace AnourValar\EloquentSerialize\Tests;
|
||||
|
||||
use AnourValar\EloquentSerialize\Tests\Models\User;
|
||||
|
||||
class ConnectionTest extends AbstractSuite
|
||||
{
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testDefault()
|
||||
{
|
||||
$package = $this->service->serialize(User::where('id', '!=', 1));
|
||||
$package = json_encode($package);
|
||||
|
||||
$package = json_decode($package, true);
|
||||
$builder = $this->service->unserialize($package);
|
||||
|
||||
$this->assertEquals('testing', $builder->getQuery()->getConnection()->getName());
|
||||
$this->assertEquals('testing', $builder->first()->getConnectionName());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testSimple()
|
||||
{
|
||||
config(['database.connections.foo' => config('database.connections.testing')]);
|
||||
|
||||
$package = $this->service->serialize((new User())->setConnection('foo')->where('id', '!=', 1));
|
||||
$package = json_encode($package);
|
||||
|
||||
$package = json_decode($package, true);
|
||||
$builder = $this->service->unserialize($package);
|
||||
|
||||
$this->assertEquals('foo', $builder->getQuery()->getConnection()->getName());
|
||||
$this->assertEquals('foo', $builder->getModel()->getConnectionName());
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace AnourValar\EloquentSerialize\Tests;
|
||||
|
||||
use AnourValar\EloquentSerialize\Tests\Models\User;
|
||||
|
||||
class DistinctTest extends AbstractSuite
|
||||
{
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testSimple()
|
||||
{
|
||||
$this->compare(User::distinct('title'));
|
||||
}
|
||||
}
|
||||
@@ -1,355 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace AnourValar\EloquentSerialize\Tests;
|
||||
|
||||
use AnourValar\EloquentSerialize\Tests\Models\User;
|
||||
use AnourValar\EloquentSerialize\Tests\Models\UserPhone;
|
||||
use AnourValar\EloquentSerialize\Tests\Models\Post;
|
||||
use AnourValar\EloquentSerialize\Tests\Models\UserPhoneNote;
|
||||
use AnourValar\EloquentSerialize\Tests\Models\Tag;
|
||||
|
||||
class EagerTest extends AbstractSuite
|
||||
{
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testSimple()
|
||||
{
|
||||
// ...
|
||||
$this->compare(User::query());
|
||||
|
||||
// with
|
||||
$this->compare(User::with('userPhones'));
|
||||
|
||||
// with count
|
||||
$this->compare(User::withCount('userPhones'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testComplex()
|
||||
{
|
||||
// with
|
||||
$this->compare(User::with('userPhonesSorted'));
|
||||
$this->compare(User::with('userPhonesPrimary'));
|
||||
$this->compare(User::with(['userPhonesSorted', 'userPhonesPrimary']));
|
||||
$this->compare(User::query()->with('filesAB', 'filesC', 'filesDE'));
|
||||
|
||||
// with count
|
||||
$this->compare(User::withCount('userPhonesSorted'));
|
||||
$this->compare(User::withCount('userPhonesPrimary'));
|
||||
$this->compare(User::withCount(['userPhonesSorted', 'userPhonesPrimary']));
|
||||
$this->compare(User::query()->withCount('filesAB', 'filesC', 'filesDE'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testNested()
|
||||
{
|
||||
// with
|
||||
$this->compare(User::with('userPhones.userPhoneNote'));
|
||||
$this->compare(User::with('userPhones.userPhoneNote:id,user_phone_id,note'));
|
||||
$this->compare(User::with(['userPhones' => ['userPhoneNote']]));
|
||||
$this->compare(User::with(['userPhones' => fn ($query) => $query->with('userPhoneNote')]));
|
||||
|
||||
// with (reverse)
|
||||
$this->compare(UserPhone::with('user.userPhones'));
|
||||
$this->compare(UserPhone::with(['user' => ['userPhones']]));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testNestedComplex()
|
||||
{
|
||||
// with
|
||||
$this->compare(User::with('userPhonesSorted.userPhoneNote'));
|
||||
$this->compare(User::with('userPhonesPrimary.userPhoneNote'));
|
||||
|
||||
// with (reverse)
|
||||
$this->compare(UserPhone::with('user.userPhonesSorted'));
|
||||
$this->compare(UserPhone::with('user.userPhonesPrimary'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testWithBuilder()
|
||||
{
|
||||
// 1 level
|
||||
$this->compare(
|
||||
User::with(['userPhones' => function ($query) {
|
||||
$query->orderBy('id', 'ASC')->limit(1)->select(['id', 'phone']);
|
||||
}])
|
||||
);
|
||||
|
||||
// 2 levels
|
||||
$this->compare(
|
||||
User::with(['userPhones' => function ($query) {
|
||||
$query->where(function ($query) {
|
||||
$query->where('phone', '=', '111')->orWhere('phone', '!=', '222')->limit(5);
|
||||
});
|
||||
}])
|
||||
);
|
||||
|
||||
// 3 levels
|
||||
$this->compare(
|
||||
User::with(['userPhones' => function ($query) {
|
||||
$query->where(function ($query) {
|
||||
$query
|
||||
->where('phone', '=', '111')
|
||||
->orWhere(function ($query) {
|
||||
$query->where('phone', '=', '222')->orWhere('created_at', '>', '2010-01-01');
|
||||
});
|
||||
});
|
||||
}])
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testWithComplexBuilder()
|
||||
{
|
||||
// 1 level
|
||||
$this->compare(
|
||||
User::with(['userPhonesPrimary' => function ($query) {
|
||||
$query->orderBy('id', 'ASC')->limit(1)->select(['id', 'phone']);
|
||||
}])
|
||||
);
|
||||
|
||||
// 2 levels
|
||||
$this->compare(
|
||||
User::with(['userPhonesPrimary' => function ($query) {
|
||||
$query->where(function ($query) {
|
||||
$query->where('phone', '=', '111')->orWhere('phone', '!=', '222');
|
||||
});
|
||||
}])
|
||||
);
|
||||
|
||||
// 3 levels
|
||||
$this->compare(
|
||||
User::with(['userPhonesPrimary' => function ($query) {
|
||||
$query->where(function ($query) {
|
||||
$query
|
||||
->where('phone', '=', '111')
|
||||
->orWhere(function ($query) {
|
||||
$query->where('phone', '=', '222')->orWhere('created_at', '>', '2010-01-01');
|
||||
});
|
||||
});
|
||||
}])
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testWithCountBuilder()
|
||||
{
|
||||
// 1 level
|
||||
$this->compare(
|
||||
User::withCount(['userPhones' => function ($query) {
|
||||
$query->limit(2);
|
||||
}])
|
||||
);
|
||||
|
||||
// 2 levels
|
||||
$this->compare(
|
||||
User::withCount(['userPhones' => function ($query) {
|
||||
$query->where(function ($query) {
|
||||
$query->where('phone', '=', '111')->orWhere('phone', '!=', '222');
|
||||
});
|
||||
}])
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testWithComplexCountBuilder()
|
||||
{
|
||||
// 1 level
|
||||
$this->compare(
|
||||
User::withCount(['userPhonesSorted' => function ($query) {
|
||||
$query->limit(2);
|
||||
}])
|
||||
);
|
||||
|
||||
// 2 levels
|
||||
$this->compare(
|
||||
User::withCount(['userPhonesSorted' => function ($query) {
|
||||
$query->where(function ($query) {
|
||||
$query->where('phone', '=', '111')->orWhere('phone', '!=', '222');
|
||||
});
|
||||
}])
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testWithCountAlias()
|
||||
{
|
||||
// simple
|
||||
$this->compare(
|
||||
User::withCount('userPhones as test')
|
||||
);
|
||||
|
||||
// builder
|
||||
$this->compare(
|
||||
User::withCount([
|
||||
'userPhones as primary' => function ($query) {
|
||||
$query->where(function ($query) {
|
||||
$query->where('is_primary', true);
|
||||
});
|
||||
},
|
||||
'userPhones as not_primary' => function ($query) {
|
||||
$query->where('is_primary', false);
|
||||
},
|
||||
])
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testBelongs()
|
||||
{
|
||||
// simple
|
||||
$this->compare(
|
||||
UserPhone::with('user')
|
||||
);
|
||||
|
||||
// simple count
|
||||
$this->compare(
|
||||
UserPhone::withCount('user')
|
||||
);
|
||||
|
||||
// builder
|
||||
$this->compare(
|
||||
UserPhone::with([
|
||||
'user' => function ($query) {
|
||||
$query->where('title', '=', 'admin')->limit(1);
|
||||
},
|
||||
])
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testHasManyThrough()
|
||||
{
|
||||
// simple
|
||||
$this->compare(User::with('userPhoneNote'));
|
||||
$this->compare(User::with('userPhonesSorted'));
|
||||
$this->compare(User::with('userPhonesPrimary'));
|
||||
|
||||
// simple count
|
||||
$this->compare(User::withCount('userPhoneNote'));
|
||||
$this->compare(User::withCount('userPhonesSorted'));
|
||||
$this->compare(User::withCount('userPhonesPrimary'));
|
||||
|
||||
// builder
|
||||
$this->compare(
|
||||
User::with([
|
||||
'userPhoneNote' => function ($query) {
|
||||
$query->limit(1);
|
||||
},
|
||||
])
|
||||
);
|
||||
$this->compare(
|
||||
User::with([
|
||||
'userPhonesSorted' => function ($query) {
|
||||
$query->limit(1);
|
||||
},
|
||||
])
|
||||
);
|
||||
$this->compare(
|
||||
User::with([
|
||||
'userPhonesPrimary' => function ($query) {
|
||||
$query->limit(1);
|
||||
},
|
||||
])
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testThroughBuilder()
|
||||
{
|
||||
// simple
|
||||
$this->compare(User::with('userPhoneNoteAlt'));
|
||||
|
||||
// simple count
|
||||
$this->compare(User::withCount('userPhoneNoteAlt'));
|
||||
|
||||
// builder
|
||||
$this->compare(
|
||||
User::with([
|
||||
'userPhoneNoteAlt' => function ($query) {
|
||||
$query->limit(1);
|
||||
},
|
||||
])
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testHasOne()
|
||||
{
|
||||
// simple
|
||||
$this->compare(
|
||||
UserPhone::with('userPhoneNote')
|
||||
);
|
||||
|
||||
// simple count
|
||||
$this->compare(
|
||||
UserPhone::withCount('userPhoneNote')
|
||||
);
|
||||
|
||||
// builder
|
||||
$this->compare(
|
||||
UserPhone::with([
|
||||
'userPhoneNote' => function ($query) {
|
||||
$query->whereNotNull('note');
|
||||
},
|
||||
])
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testMorphTo()
|
||||
{
|
||||
// Nested
|
||||
$this->compare(
|
||||
Tag::with(['taggable' => function (\Illuminate\Database\Eloquent\Relations\MorphTo $morphTo) {
|
||||
$morphTo->morphWith([
|
||||
Post::class => ['user'],
|
||||
]);
|
||||
}])
|
||||
);
|
||||
|
||||
// Nested count
|
||||
$this->compare(
|
||||
Tag::with(['taggable' => function (\Illuminate\Database\Eloquent\Relations\MorphTo $morphTo) {
|
||||
$morphTo->morphWithCount([
|
||||
Post::class => ['user'],
|
||||
]);
|
||||
}])
|
||||
);
|
||||
|
||||
// Nested (reverse)
|
||||
$this->compare(
|
||||
Post::with(['tag' => function (\Illuminate\Database\Eloquent\Relations\MorphOne $morphOne) {
|
||||
$morphOne->with('taggable');
|
||||
}])
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace AnourValar\EloquentSerialize\Tests;
|
||||
|
||||
use AnourValar\EloquentSerialize\Tests\Models\User;
|
||||
|
||||
class FromTest extends AbstractSuite
|
||||
{
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testSimple()
|
||||
{
|
||||
$this->compare(
|
||||
User::whereExists(function ($query) {
|
||||
$query
|
||||
->from('user_phones')
|
||||
->whereRaw('user_phones.user_id = users.id');
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testAlias()
|
||||
{
|
||||
$this->compare(
|
||||
User::whereExists(function ($query) {
|
||||
$query
|
||||
->from('user_phones AS up')
|
||||
->whereRaw('up.user_id = users.id');
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace AnourValar\EloquentSerialize\Tests;
|
||||
|
||||
use AnourValar\EloquentSerialize\Tests\Models\User;
|
||||
|
||||
class GroupByTest extends AbstractSuite
|
||||
{
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testSimple()
|
||||
{
|
||||
// One column
|
||||
$this->compare(User::groupBy('title'));
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace AnourValar\EloquentSerialize\Tests;
|
||||
|
||||
use AnourValar\EloquentSerialize\Tests\Models\User;
|
||||
|
||||
class HavingTest extends AbstractSuite
|
||||
{
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testSimple()
|
||||
{
|
||||
// One column
|
||||
$this->compare(User::groupBy(['id'])->having('id', '>', 1));
|
||||
|
||||
// Two columns
|
||||
$this->compare(User::groupBy(['id', 'title'])->having('id', '>', 1)->orHaving('title', '=', 'abc'));
|
||||
|
||||
// Raw
|
||||
$this->compare(User::groupBy('id')->havingRaw('COUNT(id) > ?', [1]));
|
||||
}
|
||||
}
|
||||
@@ -1,88 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace AnourValar\EloquentSerialize\Tests;
|
||||
|
||||
use AnourValar\EloquentSerialize\Tests\Models\Post;
|
||||
use AnourValar\EloquentSerialize\Tests\Models\User;
|
||||
use AnourValar\EloquentSerialize\Tests\Models\UserPhone;
|
||||
|
||||
class JoinTest extends AbstractSuite
|
||||
{
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testLeft()
|
||||
{
|
||||
$this->compare(
|
||||
User::leftJoin('user_phones', 'users.id', '=', 'user_phones.user_id')->selectRaw('users.*, user_phones.phone')
|
||||
);
|
||||
|
||||
$this->compare(
|
||||
UserPhone::leftJoin('users', 'users.id', '=', 'user_phones.user_id')->groupBy('users.id')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testInner()
|
||||
{
|
||||
$this->compare(
|
||||
UserPhone::join('users', 'users.id', '=', 'user_phones.user_id')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testCross()
|
||||
{
|
||||
$this->compare(UserPhone::crossJoin('users'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testMultiple()
|
||||
{
|
||||
$this->compare(
|
||||
UserPhone::join('users', 'users.id', '=', 'user_phones.user_id')
|
||||
->join('posts', 'users.id', '=', 'posts.user_id')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testExpression()
|
||||
{
|
||||
$this->compare(
|
||||
User::join('posts', function ($join) {
|
||||
$join->on('users.id', '=', 'posts.user_id')->orOn('users.id', '=', 'posts.user_id');
|
||||
})
|
||||
);
|
||||
|
||||
$this->compare(
|
||||
User::join('posts', function ($join) {
|
||||
$join->on('users.id', '=', 'posts.user_id')->where('posts.title', '=', 'abc');
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testSubQuery()
|
||||
{
|
||||
$latestPosts = Post::select('user_id', \DB::raw('MAX(created_at) as last_post_created_at'))
|
||||
->groupBy('user_id');
|
||||
|
||||
$this->compare($latestPosts);
|
||||
|
||||
$this->compare(
|
||||
User::joinSub($latestPosts, 'latest_posts', function ($join) {
|
||||
$join->on('users.id', '=', 'latest_posts.user_id');
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace AnourValar\EloquentSerialize\Tests;
|
||||
|
||||
use AnourValar\EloquentSerialize\Tests\Models\User;
|
||||
|
||||
class LimitTest extends AbstractSuite
|
||||
{
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testSimple()
|
||||
{
|
||||
// Limit
|
||||
$this->compare(User::limit(10));
|
||||
|
||||
// Limit with offset
|
||||
$this->compare(User::offset(20)->limit(10));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testNested()
|
||||
{
|
||||
$this->compare(User::with(['userPhones' => fn ($query) => $query->limit(1)]));
|
||||
$this->compare(User::with(['userPhones' => fn ($query) => $query->limit(2)]));
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace AnourValar\EloquentSerialize\Tests\Models;
|
||||
|
||||
class File extends \Illuminate\Database\Eloquent\Model
|
||||
{
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace AnourValar\EloquentSerialize\Tests\Models;
|
||||
|
||||
class Post extends \Illuminate\Database\Eloquent\Model
|
||||
{
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
public function tag()
|
||||
{
|
||||
return $this->morphOne(Tag::class, 'taggable');
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace AnourValar\EloquentSerialize\Tests\Models;
|
||||
|
||||
class Tag extends \Illuminate\Database\Eloquent\Model
|
||||
{
|
||||
public function taggable()
|
||||
{
|
||||
return $this->morphTo();
|
||||
}
|
||||
}
|
||||
@@ -1,76 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace AnourValar\EloquentSerialize\Tests\Models;
|
||||
|
||||
class User extends \Illuminate\Database\Eloquent\Model
|
||||
{
|
||||
use \Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function userPhones()
|
||||
{
|
||||
return $this->hasMany(UserPhone::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function userPhonesSorted()
|
||||
{
|
||||
return $this->hasMany(UserPhone::class)->orderBy('phone', 'ASC');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function userPhonesPrimary()
|
||||
{
|
||||
return $this->hasMany(UserPhone::class)->where('is_primary', '=', true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasManyThrough
|
||||
*/
|
||||
public function userPhoneNote()
|
||||
{
|
||||
return $this->hasManyThrough(UserPhoneNote::class, UserPhone::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOneThrough
|
||||
*/
|
||||
public function userPhoneNoteAlt()
|
||||
{
|
||||
return $this->through($this->userPhones())
|
||||
->has(fn (UserPhone $userPhone) => $userPhone->userPhoneNote());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function filesAB()
|
||||
{
|
||||
return $this->hasMany(File::class, 'user_id')->whereIn('type', ['a', 'b']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function filesC()
|
||||
{
|
||||
return $this->hasMany(File::class, 'user_id', 'id')->where('type', 'c');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function filesDE()
|
||||
{
|
||||
return $this->hasOne(File::class)
|
||||
->whereNotIn('type', ['f', 'g'])
|
||||
->whereIn('type', ['d', 'e'])
|
||||
->whereNotIn('type', ['a', 'b', 'c']);
|
||||
}
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace AnourValar\EloquentSerialize\Tests\Models;
|
||||
|
||||
class UserPhone extends \Illuminate\Database\Eloquent\Model
|
||||
{
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
public function userPhoneNote()
|
||||
{
|
||||
return $this->hasOne(UserPhoneNote::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Illuminate\Database\Eloquent\Builder $query
|
||||
* @param bool $isPrimary
|
||||
* @return void
|
||||
*/
|
||||
public function scopeMajor(\Illuminate\Database\Eloquent\Builder $query, bool $isPrimary)
|
||||
{
|
||||
$query->where('is_primary', '=', $isPrimary);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Illuminate\Database\Eloquent\Builder $query
|
||||
* @param string $pattern
|
||||
* @return void
|
||||
*/
|
||||
public function scopeSearch(\Illuminate\Database\Eloquent\Builder $query, string $pattern)
|
||||
{
|
||||
$query->where(function ($query) use ($pattern) {
|
||||
$query->where('phone', 'LIKE', "%$pattern%");
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace AnourValar\EloquentSerialize\Tests\Models;
|
||||
|
||||
class UserPhoneNote extends \Illuminate\Database\Eloquent\Model
|
||||
{
|
||||
public function userPhone()
|
||||
{
|
||||
return $this->belongsTo(UserPhone::class);
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace AnourValar\EloquentSerialize\Tests;
|
||||
|
||||
use AnourValar\EloquentSerialize\Tests\Models\User;
|
||||
use AnourValar\EloquentSerialize\Tests\Models\UserPhone;
|
||||
|
||||
class OrderByTest extends AbstractSuite
|
||||
{
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testSimple()
|
||||
{
|
||||
// One column
|
||||
$this->compare(User::orderBy('id', 'ASC'));
|
||||
|
||||
// Two columns
|
||||
$this->compare(User::orderBy('id', 'ASC')->orderBy('sort', 'DESC'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testExpression()
|
||||
{
|
||||
// ASC
|
||||
$this->compare(
|
||||
User::orderBy(UserPhone::select('created_at')->whereColumn('user_id', 'users.id')->limit(1)->orderBy('created_at', 'ASC'))
|
||||
);
|
||||
|
||||
// DESC
|
||||
$this->compare(
|
||||
User::orderByDesc(UserPhone::select('phone')->whereColumn('user_id', 'users.id')->limit(1)->orderBy('phone', 'DESC'))
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace AnourValar\EloquentSerialize\Tests;
|
||||
|
||||
use AnourValar\EloquentSerialize\Tests\Models\User;
|
||||
use AnourValar\EloquentSerialize\Tests\Models\UserPhone;
|
||||
|
||||
class ScopeTest extends AbstractSuite
|
||||
{
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testSimple()
|
||||
{
|
||||
// One way
|
||||
$this->compare(User::withTrashed());
|
||||
|
||||
// Reverted
|
||||
$this->compare(User::withTrashed()->withoutTrashed());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testWithParams()
|
||||
{
|
||||
// Primary
|
||||
$this->compare(UserPhone::major(true));
|
||||
|
||||
// NOT primary
|
||||
$this->compare(UserPhone::major(false));
|
||||
|
||||
// Combine
|
||||
$this->compare(UserPhone::major(false)->search('906'));
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace AnourValar\EloquentSerialize\Tests;
|
||||
|
||||
use AnourValar\EloquentSerialize\Tests\Models\User;
|
||||
use AnourValar\EloquentSerialize\Tests\Models\UserPhone;
|
||||
|
||||
class SelectTest extends AbstractSuite
|
||||
{
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testSimple()
|
||||
{
|
||||
// List of columns
|
||||
$this->compare(User::select(['id', 'title']));
|
||||
|
||||
// Raw
|
||||
$this->compare(User::selectRaw('id, (SELECT COUNT(*) FROM user_phones WHERE user_id = users.id)'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testExpression()
|
||||
{
|
||||
$this->compare(
|
||||
User::select(['users.*', 'test' => UserPhone::selectRaw('MAX(created_at)')->whereColumn('user_id', 'users.id')])
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,79 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace AnourValar\EloquentSerialize\Tests;
|
||||
|
||||
use AnourValar\EloquentSerialize\Tests\Models\User;
|
||||
|
||||
class UnionTest extends AbstractSuite
|
||||
{
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testSimple()
|
||||
{
|
||||
$this->compare(
|
||||
User::whereIn('title', ['a', 'b'])->union(User::whereIn('id', ['1', '2']))
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testNested()
|
||||
{
|
||||
// 2 levels
|
||||
$union = User::where('id', '=', '1');
|
||||
$union = User::where('id', '=', '2')->union($union);
|
||||
|
||||
$this->compare(
|
||||
User::whereIn('title', ['a', 'b'])->union($union)
|
||||
);
|
||||
|
||||
// 3 levels
|
||||
$union = User::where('id', '=', '1');
|
||||
$union = User::where('id', '=', '2')->union($union);
|
||||
$union = User::where('id', '=', '3')->union($union);
|
||||
|
||||
$this->compare(
|
||||
User::whereIn('title', ['a', 'b'])->union($union)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testExpression()
|
||||
{
|
||||
$union1 = User::where(function ($query) {
|
||||
$query->whereDoesnthave('userPhones', function ($query) {
|
||||
$query->where(function ($query) {
|
||||
$query
|
||||
->where('created_at', '>=', '2010-01-01')
|
||||
->orWhere('id', '=', '1');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
$union2 = User::whereHas('userPhones', function ($query) {
|
||||
$query->where('created_at', '>=', '2010-01-01');
|
||||
});
|
||||
|
||||
$union2 = User::union($union2)->where(function ($query) {
|
||||
$query
|
||||
->where('id', '=', '1')
|
||||
->orWhere(function ($query) {
|
||||
$query
|
||||
->where('id', '=', '2')
|
||||
->orWhere(function ($query) {
|
||||
$query
|
||||
->where('title', '!=', 'admin')
|
||||
->orWhere('id', '=', '3');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
$this->compare(
|
||||
User::whereNotIn('title', ['a', 'b'])->union($union1)->union($union2, true)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,285 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace AnourValar\EloquentSerialize\Tests;
|
||||
|
||||
use AnourValar\EloquentSerialize\Tests\Models\Post;
|
||||
use AnourValar\EloquentSerialize\Tests\Models\User;
|
||||
use AnourValar\EloquentSerialize\Tests\Models\UserPhone;
|
||||
|
||||
class WhereTest extends AbstractSuite
|
||||
{
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testSimple()
|
||||
{
|
||||
// One column
|
||||
$this->compare(User::where('id', '=', '1'));
|
||||
|
||||
// Two columns
|
||||
$this->compare(User::where('id', '=', '1')->orWhere('id', '=', '2'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testExpression()
|
||||
{
|
||||
// Raw
|
||||
$this->compare(
|
||||
User::whereRaw('(id = ? or (SELECT COUNT(*) FROM user_phones WHERE user_id = users.id) > ?)', [5, 1])
|
||||
);
|
||||
|
||||
// DB Raw
|
||||
$this->compare(
|
||||
User::where(\DB::raw('(id = ? or (SELECT COUNT(*) FROM user_phones WHERE user_id = users.id) > ?)', [5, 1]))
|
||||
);
|
||||
|
||||
// 1 level
|
||||
$this->compare(
|
||||
User::where(function ($query) {
|
||||
$query->where('id', '=', '1')->orWhere('id', '=', 2);
|
||||
})
|
||||
);
|
||||
|
||||
// 2 levels
|
||||
$this->compare(
|
||||
User::where(function ($query) {
|
||||
$query
|
||||
->where('id', '=', '1')
|
||||
->orWhere(function ($query) {
|
||||
$query->where('id', '=', '2')->where('title', '!=', 'admin');
|
||||
});
|
||||
})
|
||||
);
|
||||
|
||||
// 3 levels
|
||||
$this->compare(
|
||||
User::where(function ($query) {
|
||||
$query
|
||||
->where('id', '=', '1')
|
||||
->orWhere(function ($query) {
|
||||
$query
|
||||
->where('id', '=', '2')
|
||||
->orWhere(function ($query) {
|
||||
$query
|
||||
->where('title', '!=', 'admin')
|
||||
->orWhere('id', '=', '3');
|
||||
});
|
||||
});
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testHas()
|
||||
{
|
||||
// has
|
||||
$this->compare(User::has('userPhones'));
|
||||
$this->compare(User::has('filesAB')->has('filesC'));
|
||||
|
||||
// whereHas, 1 level
|
||||
$this->compare(
|
||||
User::whereHas('userPhones', function ($query) {
|
||||
$query->where('created_at', '>=', '2010-01-01');
|
||||
})
|
||||
);
|
||||
|
||||
$this->compare(
|
||||
User::whereHas('filesAB', function ($query) {
|
||||
$query->whereIn('type', ['f', 'g']);
|
||||
})
|
||||
);
|
||||
|
||||
// whereHas, X levels
|
||||
$this->compare(
|
||||
User::where(function ($query) {
|
||||
$query->whereHas('userPhones', function ($query) {
|
||||
$query->where(function ($query) {
|
||||
$query
|
||||
->where('created_at', '>=', '2010-01-01')
|
||||
->orWhere('id', '=', '1');
|
||||
});
|
||||
});
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testWithHas()
|
||||
{
|
||||
// withWhereHas, 1 level
|
||||
$this->compare(
|
||||
User::withWhereHas('userPhones', function ($query) {
|
||||
$query->where('created_at', '>=', '2010-01-01');
|
||||
})
|
||||
);
|
||||
|
||||
$this->compare(
|
||||
User::withWhereHas('userPhones:id,is_primary')
|
||||
);
|
||||
|
||||
$this->compare(
|
||||
User::withWhereHas('filesAB', function ($query) {
|
||||
$query->whereIn('type', ['f', 'g']);
|
||||
})
|
||||
);
|
||||
|
||||
// withWhereHas, X levels
|
||||
$this->compare(
|
||||
User::where(function ($query) {
|
||||
$query->withWhereHas('userPhones', function ($query) {
|
||||
$query->where(function ($query) {
|
||||
$query
|
||||
->where('created_at', '>=', '2010-01-01')
|
||||
->orWhere('id', '=', '1');
|
||||
});
|
||||
});
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testNestedHas()
|
||||
{
|
||||
// has
|
||||
$this->compare(User::has('userPhones.userPhoneNote'));
|
||||
|
||||
// whereHas, 1 level
|
||||
$this->compare(
|
||||
User::whereHas('userPhones.userPhoneNote', function ($query) {
|
||||
$query->where('created_at', '>=', '2010-01-01');
|
||||
})
|
||||
);
|
||||
|
||||
// whereHas, X levels
|
||||
$this->compare(
|
||||
User::where(function ($query) {
|
||||
$query->whereHas('userPhones.userPhoneNote', function ($query) {
|
||||
$query->where(function ($query) {
|
||||
$query
|
||||
->where('created_at', '>=', '2010-01-01')
|
||||
->orWhere('id', '=', '1');
|
||||
});
|
||||
});
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testNestedWithHas()
|
||||
{
|
||||
// withWhereHas, 1 level
|
||||
$this->compare(
|
||||
User::withWhereHas('userPhones.userPhoneNote', function ($query) {
|
||||
$query->where('created_at', '>=', '2010-01-01');
|
||||
})
|
||||
);
|
||||
|
||||
// withWhereHas, X levels
|
||||
$this->compare(
|
||||
User::where(function ($query) {
|
||||
$query->withWhereHas('userPhones.userPhoneNote', function ($query) {
|
||||
$query->where(function ($query) {
|
||||
$query
|
||||
->where('created_at', '>=', '2010-01-01')
|
||||
->orWhere('id', '=', '1');
|
||||
});
|
||||
});
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testDoesnthave()
|
||||
{
|
||||
// doesnthave
|
||||
$this->compare(User::doesnthave('userPhones'));
|
||||
$this->compare(User::doesnthave('filesAB')->doesnthave('filesC'));
|
||||
|
||||
// whereDoesnthave
|
||||
$this->compare(
|
||||
User::whereDoesnthave('userPhones', function ($query) {
|
||||
$query->where('created_at', '>=', '2010-01-01');
|
||||
})
|
||||
);
|
||||
|
||||
// whereDoesnthave, X levels
|
||||
$this->compare(
|
||||
User::where(function ($query) {
|
||||
$query->whereDoesnthave('userPhones', function ($query) {
|
||||
$query->where(function ($query) {
|
||||
$query
|
||||
->where('created_at', '>=', '2010-01-01')
|
||||
->orWhere('id', '=', '1');
|
||||
});
|
||||
});
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testJson()
|
||||
{
|
||||
$this->compare(User::where('meta->foo', 'a'));
|
||||
|
||||
$this->compare(User::whereJsonContains('meta->foo', ['a']), false);
|
||||
|
||||
$this->compare(User::whereJsonDoesntContain('meta->foo', ['a']), false);
|
||||
|
||||
$this->compare(User::whereJsonLength('meta->foo', 0));
|
||||
$this->compare(User::whereJsonLength('meta->foo', '>', 1));
|
||||
|
||||
$this->compare(User::whereJsonContainsKey('meta->foo'));
|
||||
$this->compare(User::whereJsonContainsKey('meta->foo[0]'));
|
||||
$this->compare(User::whereJsonContainsKey('meta->foo->bar'));
|
||||
$this->compare(User::whereJsonContainsKey('meta->foo->bar[0]'));
|
||||
|
||||
$this->compare(User::whereJsonDoesntContainKey('meta->foo'));
|
||||
$this->compare(User::whereJsonDoesntContainKey('meta->foo[0]'));
|
||||
$this->compare(User::whereJsonDoesntContainKey('meta->foo->bar'));
|
||||
$this->compare(User::whereJsonDoesntContainKey('meta->foo->bar[0]'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testFullText()
|
||||
{
|
||||
// Simple
|
||||
$this->compare(Post::whereFullText('body', 'said'), false);
|
||||
|
||||
// With options
|
||||
$this->compare(Post::whereFullText('body', 'said', ['language' => 'russian']), false);
|
||||
|
||||
// Inside closure
|
||||
$this->compare(
|
||||
User::whereHas('userPhoneNote', function ($query) {
|
||||
$query->whereFullText('note', 'another', ['language' => 'russian']);
|
||||
}),
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testBelongsTo()
|
||||
{
|
||||
$this->compare(
|
||||
UserPhone::whereBelongsTo(UserPhone::has('user')->first()->user)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace AnourValar\EloquentSerialize\Tests;
|
||||
|
||||
use AnourValar\EloquentSerialize\Tests\Models\User;
|
||||
use AnourValar\EloquentSerialize\Tests\Models\UserPhone;
|
||||
|
||||
class WithCastsTest extends AbstractSuite
|
||||
{
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testSimple()
|
||||
{
|
||||
// Common
|
||||
$this->compare(User::withCasts(['user_id' => 'integer']));
|
||||
|
||||
// Custom
|
||||
$this->compare(User::withCasts(['user_id' => \AnourValar\EloquentSerialize\Tests\Casts\TestCast::class]));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testSelectRaw()
|
||||
{
|
||||
$this->compare(
|
||||
User::select([
|
||||
'users.*',
|
||||
'last_phone_created_at' => UserPhone::selectRaw('MAX(created_at)')->whereColumn('user_id', 'users.id'),
|
||||
])->withCasts([
|
||||
'last_phone_created_at' => 'datetime',
|
||||
])
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,103 +0,0 @@
|
||||
<?php
|
||||
|
||||
/** @var \Illuminate\Database\Eloquent\Factory $factory */
|
||||
|
||||
use AnourValar\EloquentSerialize\Tests\Models\File;
|
||||
use AnourValar\EloquentSerialize\Tests\Models\Tag;
|
||||
use AnourValar\EloquentSerialize\Tests\Models\Post;
|
||||
use AnourValar\EloquentSerialize\Tests\Models\User;
|
||||
use AnourValar\EloquentSerialize\Tests\Models\UserPhone;
|
||||
use AnourValar\EloquentSerialize\Tests\Models\UserPhoneNote;
|
||||
use Faker\Generator as Faker;
|
||||
|
||||
$factory->define(User::class, function (Faker $faker, array $attributes) {
|
||||
return [
|
||||
'title' => 'admin',
|
||||
'sort' => $faker->numberBetween(1, 10),
|
||||
'meta' => $faker->randomElement([json_encode(['foo' => 'a']), json_encode(['foo' => ['bar' => ['hello']]])]),
|
||||
'deleted_at' => mt_rand(0, 5) ? null : $faker->date('Y-m-d H:i:s'),
|
||||
];
|
||||
});
|
||||
|
||||
$factory->define(UserPhone::class, function (Faker $faker, array $attributes) {
|
||||
static $counter;
|
||||
$counter++;
|
||||
|
||||
return [
|
||||
'user_id' => function () use ($counter) {
|
||||
if (! ($counter % 2)) {
|
||||
$id = User::max('id');
|
||||
if ($id) {
|
||||
return $id;
|
||||
}
|
||||
}
|
||||
|
||||
return factory(User::class)->create();
|
||||
},
|
||||
'phone' => $faker->phoneNumber,
|
||||
'is_primary' => $faker->boolean,
|
||||
];
|
||||
});
|
||||
|
||||
$factory->define(UserPhoneNote::class, function (Faker $faker, array $attributes) {
|
||||
static $counter;
|
||||
$counter++;
|
||||
|
||||
return [
|
||||
'user_phone_id' => function () use ($counter) {
|
||||
if (! ($counter % 2)) {
|
||||
$id = UserPhone::max('id');
|
||||
if ($id) {
|
||||
return $id;
|
||||
}
|
||||
}
|
||||
|
||||
return factory(UserPhone::class)->create();
|
||||
},
|
||||
'note' => $faker->realText(100),
|
||||
];
|
||||
});
|
||||
|
||||
$factory->define(File::class, function (Faker $faker, array $attributes) {
|
||||
static $users;
|
||||
if (! $users) {
|
||||
$users = User::get(['id']);
|
||||
}
|
||||
|
||||
return [
|
||||
'user_id' => function () use ($users) {
|
||||
return $users->shuffle()->first();
|
||||
},
|
||||
'type' => $faker->randomElement(['a', 'b', 'c', 'd', 'e', 'f']),
|
||||
];
|
||||
});
|
||||
|
||||
$factory->define(Post::class, function (Faker $faker, array $attributes) {
|
||||
static $users;
|
||||
if (! $users) {
|
||||
$users = User::get(['id']);
|
||||
}
|
||||
|
||||
return [
|
||||
'user_id' => function () use ($users) {
|
||||
return $users->shuffle()->first();
|
||||
},
|
||||
'title' => $faker->sentence(),
|
||||
'body' => $faker->sentence(),
|
||||
];
|
||||
});
|
||||
|
||||
$factory->define(Tag::class, function (Faker $faker, array $attributes) {
|
||||
static $posts;
|
||||
if (! $posts) {
|
||||
$posts = Post::get(['id']);
|
||||
}
|
||||
|
||||
return [
|
||||
'title' => $faker->sentence(),
|
||||
'taggable_id' => function () use ($posts) {
|
||||
return $posts->shuffle()->first();
|
||||
},
|
||||
'taggable_type' => Post::class,
|
||||
];
|
||||
});
|
||||
25
vendor/autoload.php
vendored
@@ -1,25 +0,0 @@
|
||||
<?php
|
||||
|
||||
// autoload.php @generated by Composer
|
||||
|
||||
if (PHP_VERSION_ID < 50600) {
|
||||
if (!headers_sent()) {
|
||||
header('HTTP/1.1 500 Internal Server Error');
|
||||
}
|
||||
$err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
|
||||
if (!ini_get('display_errors')) {
|
||||
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
|
||||
fwrite(STDERR, $err);
|
||||
} elseif (!headers_sent()) {
|
||||
echo $err;
|
||||
}
|
||||
}
|
||||
trigger_error(
|
||||
$err,
|
||||
E_USER_ERROR
|
||||
);
|
||||
}
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInita5d82b72eee1504d2f808d7e5e2a499c::getLoader();
|
||||
119
vendor/bin/blade-icons-generate
vendored
@@ -1,119 +0,0 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Proxy PHP file generated by Composer
|
||||
*
|
||||
* This file includes the referenced bin path (../blade-ui-kit/blade-icons/bin/blade-icons-generate)
|
||||
* using a stream wrapper to prevent the shebang from being output on PHP<8
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
|
||||
namespace Composer;
|
||||
|
||||
$GLOBALS['_composer_bin_dir'] = __DIR__;
|
||||
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
|
||||
|
||||
if (PHP_VERSION_ID < 80000) {
|
||||
if (!class_exists('Composer\BinProxyWrapper')) {
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
final class BinProxyWrapper
|
||||
{
|
||||
private $handle;
|
||||
private $position;
|
||||
private $realpath;
|
||||
|
||||
public function stream_open($path, $mode, $options, &$opened_path)
|
||||
{
|
||||
// get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
|
||||
$opened_path = substr($path, 17);
|
||||
$this->realpath = realpath($opened_path) ?: $opened_path;
|
||||
$opened_path = $this->realpath;
|
||||
$this->handle = fopen($this->realpath, $mode);
|
||||
$this->position = 0;
|
||||
|
||||
return (bool) $this->handle;
|
||||
}
|
||||
|
||||
public function stream_read($count)
|
||||
{
|
||||
$data = fread($this->handle, $count);
|
||||
|
||||
if ($this->position === 0) {
|
||||
$data = preg_replace('{^#!.*\r?\n}', '', $data);
|
||||
}
|
||||
|
||||
$this->position += strlen($data);
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function stream_cast($castAs)
|
||||
{
|
||||
return $this->handle;
|
||||
}
|
||||
|
||||
public function stream_close()
|
||||
{
|
||||
fclose($this->handle);
|
||||
}
|
||||
|
||||
public function stream_lock($operation)
|
||||
{
|
||||
return $operation ? flock($this->handle, $operation) : true;
|
||||
}
|
||||
|
||||
public function stream_seek($offset, $whence)
|
||||
{
|
||||
if (0 === fseek($this->handle, $offset, $whence)) {
|
||||
$this->position = ftell($this->handle);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function stream_tell()
|
||||
{
|
||||
return $this->position;
|
||||
}
|
||||
|
||||
public function stream_eof()
|
||||
{
|
||||
return feof($this->handle);
|
||||
}
|
||||
|
||||
public function stream_stat()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
public function stream_set_option($option, $arg1, $arg2)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function url_stat($path, $flags)
|
||||
{
|
||||
$path = substr($path, 17);
|
||||
if (file_exists($path)) {
|
||||
return stat($path);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
(function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
|
||||
|| (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
|
||||
) {
|
||||
return include("phpvfscomposer://" . __DIR__ . '/..'.'/blade-ui-kit/blade-icons/bin/blade-icons-generate');
|
||||
}
|
||||
}
|
||||
|
||||
return include __DIR__ . '/..'.'/blade-ui-kit/blade-icons/bin/blade-icons-generate';
|
||||
5
vendor/bin/blade-icons-generate.bat
vendored
@@ -1,5 +0,0 @@
|
||||
@ECHO OFF
|
||||
setlocal DISABLEDELAYEDEXPANSION
|
||||
SET BIN_TARGET=%~dp0/blade-icons-generate
|
||||
SET COMPOSER_RUNTIME_BIN_DIR=%~dp0
|
||||
php "%BIN_TARGET%" %*
|
||||
119
vendor/bin/carbon
vendored
@@ -1,119 +0,0 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Proxy PHP file generated by Composer
|
||||
*
|
||||
* This file includes the referenced bin path (../nesbot/carbon/bin/carbon)
|
||||
* using a stream wrapper to prevent the shebang from being output on PHP<8
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
|
||||
namespace Composer;
|
||||
|
||||
$GLOBALS['_composer_bin_dir'] = __DIR__;
|
||||
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
|
||||
|
||||
if (PHP_VERSION_ID < 80000) {
|
||||
if (!class_exists('Composer\BinProxyWrapper')) {
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
final class BinProxyWrapper
|
||||
{
|
||||
private $handle;
|
||||
private $position;
|
||||
private $realpath;
|
||||
|
||||
public function stream_open($path, $mode, $options, &$opened_path)
|
||||
{
|
||||
// get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
|
||||
$opened_path = substr($path, 17);
|
||||
$this->realpath = realpath($opened_path) ?: $opened_path;
|
||||
$opened_path = $this->realpath;
|
||||
$this->handle = fopen($this->realpath, $mode);
|
||||
$this->position = 0;
|
||||
|
||||
return (bool) $this->handle;
|
||||
}
|
||||
|
||||
public function stream_read($count)
|
||||
{
|
||||
$data = fread($this->handle, $count);
|
||||
|
||||
if ($this->position === 0) {
|
||||
$data = preg_replace('{^#!.*\r?\n}', '', $data);
|
||||
}
|
||||
|
||||
$this->position += strlen($data);
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function stream_cast($castAs)
|
||||
{
|
||||
return $this->handle;
|
||||
}
|
||||
|
||||
public function stream_close()
|
||||
{
|
||||
fclose($this->handle);
|
||||
}
|
||||
|
||||
public function stream_lock($operation)
|
||||
{
|
||||
return $operation ? flock($this->handle, $operation) : true;
|
||||
}
|
||||
|
||||
public function stream_seek($offset, $whence)
|
||||
{
|
||||
if (0 === fseek($this->handle, $offset, $whence)) {
|
||||
$this->position = ftell($this->handle);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function stream_tell()
|
||||
{
|
||||
return $this->position;
|
||||
}
|
||||
|
||||
public function stream_eof()
|
||||
{
|
||||
return feof($this->handle);
|
||||
}
|
||||
|
||||
public function stream_stat()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
public function stream_set_option($option, $arg1, $arg2)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function url_stat($path, $flags)
|
||||
{
|
||||
$path = substr($path, 17);
|
||||
if (file_exists($path)) {
|
||||
return stat($path);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
(function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
|
||||
|| (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
|
||||
) {
|
||||
return include("phpvfscomposer://" . __DIR__ . '/..'.'/nesbot/carbon/bin/carbon');
|
||||
}
|
||||
}
|
||||
|
||||
return include __DIR__ . '/..'.'/nesbot/carbon/bin/carbon';
|
||||
5
vendor/bin/carbon.bat
vendored
@@ -1,5 +0,0 @@
|
||||
@ECHO OFF
|
||||
setlocal DISABLEDELAYEDEXPANSION
|
||||
SET BIN_TARGET=%~dp0/carbon
|
||||
SET COMPOSER_RUNTIME_BIN_DIR=%~dp0
|
||||
php "%BIN_TARGET%" %*
|
||||
119
vendor/bin/doctrine-dbal
vendored
@@ -1,119 +0,0 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Proxy PHP file generated by Composer
|
||||
*
|
||||
* This file includes the referenced bin path (../doctrine/dbal/bin/doctrine-dbal)
|
||||
* using a stream wrapper to prevent the shebang from being output on PHP<8
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
|
||||
namespace Composer;
|
||||
|
||||
$GLOBALS['_composer_bin_dir'] = __DIR__;
|
||||
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
|
||||
|
||||
if (PHP_VERSION_ID < 80000) {
|
||||
if (!class_exists('Composer\BinProxyWrapper')) {
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
final class BinProxyWrapper
|
||||
{
|
||||
private $handle;
|
||||
private $position;
|
||||
private $realpath;
|
||||
|
||||
public function stream_open($path, $mode, $options, &$opened_path)
|
||||
{
|
||||
// get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
|
||||
$opened_path = substr($path, 17);
|
||||
$this->realpath = realpath($opened_path) ?: $opened_path;
|
||||
$opened_path = $this->realpath;
|
||||
$this->handle = fopen($this->realpath, $mode);
|
||||
$this->position = 0;
|
||||
|
||||
return (bool) $this->handle;
|
||||
}
|
||||
|
||||
public function stream_read($count)
|
||||
{
|
||||
$data = fread($this->handle, $count);
|
||||
|
||||
if ($this->position === 0) {
|
||||
$data = preg_replace('{^#!.*\r?\n}', '', $data);
|
||||
}
|
||||
|
||||
$this->position += strlen($data);
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function stream_cast($castAs)
|
||||
{
|
||||
return $this->handle;
|
||||
}
|
||||
|
||||
public function stream_close()
|
||||
{
|
||||
fclose($this->handle);
|
||||
}
|
||||
|
||||
public function stream_lock($operation)
|
||||
{
|
||||
return $operation ? flock($this->handle, $operation) : true;
|
||||
}
|
||||
|
||||
public function stream_seek($offset, $whence)
|
||||
{
|
||||
if (0 === fseek($this->handle, $offset, $whence)) {
|
||||
$this->position = ftell($this->handle);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function stream_tell()
|
||||
{
|
||||
return $this->position;
|
||||
}
|
||||
|
||||
public function stream_eof()
|
||||
{
|
||||
return feof($this->handle);
|
||||
}
|
||||
|
||||
public function stream_stat()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
public function stream_set_option($option, $arg1, $arg2)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function url_stat($path, $flags)
|
||||
{
|
||||
$path = substr($path, 17);
|
||||
if (file_exists($path)) {
|
||||
return stat($path);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
(function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
|
||||
|| (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
|
||||
) {
|
||||
return include("phpvfscomposer://" . __DIR__ . '/..'.'/doctrine/dbal/bin/doctrine-dbal');
|
||||
}
|
||||
}
|
||||
|
||||
return include __DIR__ . '/..'.'/doctrine/dbal/bin/doctrine-dbal';
|
||||
5
vendor/bin/doctrine-dbal.bat
vendored
@@ -1,5 +0,0 @@
|
||||
@ECHO OFF
|
||||
setlocal DISABLEDELAYEDEXPANSION
|
||||
SET BIN_TARGET=%~dp0/doctrine-dbal
|
||||
SET COMPOSER_RUNTIME_BIN_DIR=%~dp0
|
||||
php "%BIN_TARGET%" %*
|
||||
119
vendor/bin/patch-type-declarations
vendored
@@ -1,119 +0,0 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Proxy PHP file generated by Composer
|
||||
*
|
||||
* This file includes the referenced bin path (../symfony/error-handler/Resources/bin/patch-type-declarations)
|
||||
* using a stream wrapper to prevent the shebang from being output on PHP<8
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
|
||||
namespace Composer;
|
||||
|
||||
$GLOBALS['_composer_bin_dir'] = __DIR__;
|
||||
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
|
||||
|
||||
if (PHP_VERSION_ID < 80000) {
|
||||
if (!class_exists('Composer\BinProxyWrapper')) {
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
final class BinProxyWrapper
|
||||
{
|
||||
private $handle;
|
||||
private $position;
|
||||
private $realpath;
|
||||
|
||||
public function stream_open($path, $mode, $options, &$opened_path)
|
||||
{
|
||||
// get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
|
||||
$opened_path = substr($path, 17);
|
||||
$this->realpath = realpath($opened_path) ?: $opened_path;
|
||||
$opened_path = $this->realpath;
|
||||
$this->handle = fopen($this->realpath, $mode);
|
||||
$this->position = 0;
|
||||
|
||||
return (bool) $this->handle;
|
||||
}
|
||||
|
||||
public function stream_read($count)
|
||||
{
|
||||
$data = fread($this->handle, $count);
|
||||
|
||||
if ($this->position === 0) {
|
||||
$data = preg_replace('{^#!.*\r?\n}', '', $data);
|
||||
}
|
||||
|
||||
$this->position += strlen($data);
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function stream_cast($castAs)
|
||||
{
|
||||
return $this->handle;
|
||||
}
|
||||
|
||||
public function stream_close()
|
||||
{
|
||||
fclose($this->handle);
|
||||
}
|
||||
|
||||
public function stream_lock($operation)
|
||||
{
|
||||
return $operation ? flock($this->handle, $operation) : true;
|
||||
}
|
||||
|
||||
public function stream_seek($offset, $whence)
|
||||
{
|
||||
if (0 === fseek($this->handle, $offset, $whence)) {
|
||||
$this->position = ftell($this->handle);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function stream_tell()
|
||||
{
|
||||
return $this->position;
|
||||
}
|
||||
|
||||
public function stream_eof()
|
||||
{
|
||||
return feof($this->handle);
|
||||
}
|
||||
|
||||
public function stream_stat()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
public function stream_set_option($option, $arg1, $arg2)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function url_stat($path, $flags)
|
||||
{
|
||||
$path = substr($path, 17);
|
||||
if (file_exists($path)) {
|
||||
return stat($path);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
(function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
|
||||
|| (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
|
||||
) {
|
||||
return include("phpvfscomposer://" . __DIR__ . '/..'.'/symfony/error-handler/Resources/bin/patch-type-declarations');
|
||||
}
|
||||
}
|
||||
|
||||
return include __DIR__ . '/..'.'/symfony/error-handler/Resources/bin/patch-type-declarations';
|
||||
5
vendor/bin/patch-type-declarations.bat
vendored
@@ -1,5 +0,0 @@
|
||||
@ECHO OFF
|
||||
setlocal DISABLEDELAYEDEXPANSION
|
||||
SET BIN_TARGET=%~dp0/patch-type-declarations
|
||||
SET COMPOSER_RUNTIME_BIN_DIR=%~dp0
|
||||
php "%BIN_TARGET%" %*
|
||||
119
vendor/bin/var-dump-server
vendored
@@ -1,119 +0,0 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Proxy PHP file generated by Composer
|
||||
*
|
||||
* This file includes the referenced bin path (../symfony/var-dumper/Resources/bin/var-dump-server)
|
||||
* using a stream wrapper to prevent the shebang from being output on PHP<8
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
|
||||
namespace Composer;
|
||||
|
||||
$GLOBALS['_composer_bin_dir'] = __DIR__;
|
||||
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
|
||||
|
||||
if (PHP_VERSION_ID < 80000) {
|
||||
if (!class_exists('Composer\BinProxyWrapper')) {
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
final class BinProxyWrapper
|
||||
{
|
||||
private $handle;
|
||||
private $position;
|
||||
private $realpath;
|
||||
|
||||
public function stream_open($path, $mode, $options, &$opened_path)
|
||||
{
|
||||
// get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
|
||||
$opened_path = substr($path, 17);
|
||||
$this->realpath = realpath($opened_path) ?: $opened_path;
|
||||
$opened_path = $this->realpath;
|
||||
$this->handle = fopen($this->realpath, $mode);
|
||||
$this->position = 0;
|
||||
|
||||
return (bool) $this->handle;
|
||||
}
|
||||
|
||||
public function stream_read($count)
|
||||
{
|
||||
$data = fread($this->handle, $count);
|
||||
|
||||
if ($this->position === 0) {
|
||||
$data = preg_replace('{^#!.*\r?\n}', '', $data);
|
||||
}
|
||||
|
||||
$this->position += strlen($data);
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function stream_cast($castAs)
|
||||
{
|
||||
return $this->handle;
|
||||
}
|
||||
|
||||
public function stream_close()
|
||||
{
|
||||
fclose($this->handle);
|
||||
}
|
||||
|
||||
public function stream_lock($operation)
|
||||
{
|
||||
return $operation ? flock($this->handle, $operation) : true;
|
||||
}
|
||||
|
||||
public function stream_seek($offset, $whence)
|
||||
{
|
||||
if (0 === fseek($this->handle, $offset, $whence)) {
|
||||
$this->position = ftell($this->handle);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function stream_tell()
|
||||
{
|
||||
return $this->position;
|
||||
}
|
||||
|
||||
public function stream_eof()
|
||||
{
|
||||
return feof($this->handle);
|
||||
}
|
||||
|
||||
public function stream_stat()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
public function stream_set_option($option, $arg1, $arg2)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function url_stat($path, $flags)
|
||||
{
|
||||
$path = substr($path, 17);
|
||||
if (file_exists($path)) {
|
||||
return stat($path);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
(function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
|
||||
|| (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
|
||||
) {
|
||||
return include("phpvfscomposer://" . __DIR__ . '/..'.'/symfony/var-dumper/Resources/bin/var-dump-server');
|
||||
}
|
||||
}
|
||||
|
||||
return include __DIR__ . '/..'.'/symfony/var-dumper/Resources/bin/var-dump-server';
|
||||
5
vendor/bin/var-dump-server.bat
vendored
@@ -1,5 +0,0 @@
|
||||
@ECHO OFF
|
||||
setlocal DISABLEDELAYEDEXPANSION
|
||||
SET BIN_TARGET=%~dp0/var-dump-server
|
||||
SET COMPOSER_RUNTIME_BIN_DIR=%~dp0
|
||||
php "%BIN_TARGET%" %*
|
||||
21
vendor/blade-ui-kit/blade-heroicons/LICENSE.md
vendored
@@ -1,21 +0,0 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Dries Vints
|
||||
|
||||
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.
|
||||
@@ -1,54 +0,0 @@
|
||||
{
|
||||
"name": "blade-ui-kit/blade-heroicons",
|
||||
"description": "A package to easily make use of Heroicons in your Laravel Blade views.",
|
||||
"keywords": ["Blade", "Heroicons", "Laravel"],
|
||||
"homepage": "https://github.com/blade-ui-kit/blade-heroicons",
|
||||
"license": "MIT",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/driesvints"
|
||||
},
|
||||
{
|
||||
"type": "paypal",
|
||||
"url": "https://www.paypal.com/paypalme/driesvints"
|
||||
}
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Dries Vints",
|
||||
"homepage": "https://driesvints.com"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": "^8.0",
|
||||
"blade-ui-kit/blade-icons": "^1.6",
|
||||
"illuminate/support": "^9.0|^10.0|^11.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"orchestra/testbench": "^7.0|^8.0|^9.0",
|
||||
"phpunit/phpunit": "^9.0|^10.5|^11.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"BladeUI\\Heroicons\\": "src"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"Tests\\": "tests"
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"BladeUI\\Heroicons\\BladeHeroiconsServiceProvider"
|
||||
]
|
||||
}
|
||||
},
|
||||
"config": {
|
||||
"sort-packages": true
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|-----------------------------------------------------------------
|
||||
| Default Prefix
|
||||
|-----------------------------------------------------------------
|
||||
|
|
||||
| This config option allows you to define a default prefix for
|
||||
| your icons. The dash separator will be applied automatically
|
||||
| to every icon name. It's required and needs to be unique.
|
||||
|
|
||||
*/
|
||||
|
||||
'prefix' => 'heroicon',
|
||||
|
||||
/*
|
||||
|-----------------------------------------------------------------
|
||||
| Fallback Icon
|
||||
|-----------------------------------------------------------------
|
||||
|
|
||||
| This config option allows you to define a fallback
|
||||
| icon when an icon in this set cannot be found.
|
||||
|
|
||||
*/
|
||||
|
||||
'fallback' => '',
|
||||
|
||||
/*
|
||||
|-----------------------------------------------------------------
|
||||
| Default Set Classes
|
||||
|-----------------------------------------------------------------
|
||||
|
|
||||
| This config option allows you to define some classes which
|
||||
| will be applied by default to all icons within this set.
|
||||
|
|
||||
*/
|
||||
|
||||
'class' => '',
|
||||
|
||||
/*
|
||||
|-----------------------------------------------------------------
|
||||
| Default Set Attributes
|
||||
|-----------------------------------------------------------------
|
||||
|
|
||||
| This config option allows you to define some attributes which
|
||||
| will be applied by default to all icons within this set.
|
||||
|
|
||||
*/
|
||||
|
||||
'attributes' => [
|
||||
// 'width' => 50,
|
||||
// 'height' => 50,
|
||||
],
|
||||
|
||||
];
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"heroicons": "^2.1"
|
||||
}
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path d="M7.702 1.368a.75.75 0 0 1 .597 0c2.098.91 4.105 1.99 6.004 3.223a.75.75 0 0 1-.194 1.348A34.27 34.27 0 0 0 8.341 8.25a.75.75 0 0 1-.682 0c-.625-.32-1.262-.62-1.909-.901v-.542a36.878 36.878 0 0 1 2.568-1.33.75.75 0 0 0-.636-1.357 38.39 38.39 0 0 0-3.06 1.605.75.75 0 0 0-.372.648v.365c-.773-.294-1.56-.56-2.359-.8a.75.75 0 0 1-.194-1.347 40.901 40.901 0 0 1 6.005-3.223ZM4.25 8.348c-.53-.212-1.067-.411-1.611-.596a40.973 40.973 0 0 0-.418 2.97.75.75 0 0 0 .474.776c.175.068.35.138.524.21a5.544 5.544 0 0 1-.58.681.75.75 0 1 0 1.06 1.06c.35-.349.655-.726.915-1.124a29.282 29.282 0 0 0-1.395-.617A5.483 5.483 0 0 0 4.25 8.5v-.152Z"/>
|
||||
<path d="M7.603 13.96c-.96-.6-1.958-1.147-2.989-1.635a6.981 6.981 0 0 0 1.12-3.341c.419.192.834.393 1.244.602a2.25 2.25 0 0 0 2.045 0 32.787 32.787 0 0 1 4.338-1.834c.175.978.315 1.969.419 2.97a.75.75 0 0 1-.474.776 29.385 29.385 0 0 0-4.909 2.461.75.75 0 0 1-.794 0Z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.0 KiB |
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path d="M6.5 2.25a.75.75 0 0 0-1.5 0v3a.75.75 0 0 0 1.5 0V4.5h6.75a.75.75 0 0 0 0-1.5H6.5v-.75ZM11 6.5a.75.75 0 0 0-1.5 0v3a.75.75 0 0 0 1.5 0v-.75h2.25a.75.75 0 0 0 0-1.5H11V6.5ZM5.75 10a.75.75 0 0 1 .75.75v.75h6.75a.75.75 0 0 1 0 1.5H6.5v.75a.75.75 0 0 1-1.5 0v-3a.75.75 0 0 1 .75-.75ZM2.75 7.25H8.5v1.5H2.75a.75.75 0 0 1 0-1.5ZM4 3H2.75a.75.75 0 0 0 0 1.5H4V3ZM2.75 11.5H4V13H2.75a.75.75 0 0 1 0-1.5Z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 534 B |
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path d="M7.25 13.25V7.5h1.5v5.75a.75.75 0 0 1-1.5 0ZM8.75 2.75V5h.75a.75.75 0 0 1 0 1.5h-3a.75.75 0 0 1 0-1.5h.75V2.75a.75.75 0 0 1 1.5 0ZM2.25 9.5a.75.75 0 0 0 0 1.5h3a.75.75 0 0 0 0-1.5H4.5V2.75a.75.75 0 0 0-1.5 0V9.5h-.75ZM10 10.25a.75.75 0 0 1 .75-.75h.75V2.75a.75.75 0 0 1 1.5 0V9.5h.75a.75.75 0 0 1 0 1.5h-3a.75.75 0 0 1-.75-.75ZM3 12v1.25a.75.75 0 0 0 1.5 0V12H3ZM11.5 13.25V12H13v1.25a.75.75 0 0 1-1.5 0Z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 543 B |
@@ -1,4 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path d="M2 3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3Z"/>
|
||||
<path fill-rule="evenodd" d="M13 6H3v6a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V6ZM8.75 7.75a.75.75 0 0 0-1.5 0v2.69L6.03 9.22a.75.75 0 0 0-1.06 1.06l2.5 2.5a.75.75 0 0 0 1.06 0l2.5-2.5a.75.75 0 1 0-1.06-1.06l-1.22 1.22V7.75Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 449 B |
@@ -1,4 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path d="M2 3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3Z"/>
|
||||
<path fill-rule="evenodd" d="M13 6H3v6a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V6ZM5.72 7.47a.75.75 0 0 1 1.06 0L8 8.69l1.22-1.22a.75.75 0 1 1 1.06 1.06L9.06 9.75l1.22 1.22a.75.75 0 1 1-1.06 1.06L8 10.81l-1.22 1.22a.75.75 0 0 1-1.06-1.06l1.22-1.22-1.22-1.22a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 502 B |
@@ -1,4 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path d="M3 2a1 1 0 0 0-1 1v1a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1H3Z"/>
|
||||
<path fill-rule="evenodd" d="M3 6h10v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6Zm3 2.75A.75.75 0 0 1 6.75 8h2.5a.75.75 0 0 1 0 1.5h-2.5A.75.75 0 0 1 6 8.75Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 382 B |
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path fill-rule="evenodd" d="M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14Zm.75-10.25a.75.75 0 0 0-1.5 0v4.69L6.03 8.22a.75.75 0 0 0-1.06 1.06l2.5 2.5a.75.75 0 0 0 1.06 0l2.5-2.5a.75.75 0 1 0-1.06-1.06L8.75 9.44V4.75Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 356 B |
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path fill-rule="evenodd" d="M11.78 4.22a.75.75 0 0 1 0 1.06L6.56 10.5h3.69a.75.75 0 0 1 0 1.5h-5.5a.75.75 0 0 1-.75-.75v-5.5a.75.75 0 0 1 1.5 0v3.69l5.22-5.22a.75.75 0 0 1 1.06 0Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 330 B |
@@ -1,4 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path d="M7 1a.75.75 0 0 1 .75.75V6h-1.5V1.75A.75.75 0 0 1 7 1ZM6.25 6v2.94L5.03 7.72a.75.75 0 0 0-1.06 1.06l2.5 2.5a.75.75 0 0 0 1.06 0l2.5-2.5a.75.75 0 1 0-1.06-1.06L7.75 8.94V6H10a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2.25Z"/>
|
||||
<path d="M4.268 14A2 2 0 0 0 6 15h6a2 2 0 0 0 2-2v-3a2 2 0 0 0-1-1.732V11a3 3 0 0 1-3 3H4.268Z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 480 B |
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path d="M8 1a.75.75 0 0 1 .75.75V5h-1.5V1.75A.75.75 0 0 1 8 1ZM7.25 5v4.44L6.03 8.22a.75.75 0 0 0-1.06 1.06l2.5 2.5a.75.75 0 0 0 1.06 0l2.5-2.5a.75.75 0 1 0-1.06-1.06L8.75 9.44V5H11a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h2.25Z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 380 B |
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path fill-rule="evenodd" d="M4.22 4.22a.75.75 0 0 0 0 1.06l5.22 5.22H5.75a.75.75 0 0 0 0 1.5h5.5a.75.75 0 0 0 .75-.75v-5.5a.75.75 0 0 0-1.5 0v3.69L5.28 4.22a.75.75 0 0 0-1.06 0Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 328 B |
@@ -1,4 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path d="M8.75 2.75a.75.75 0 0 0-1.5 0v5.69L5.03 6.22a.75.75 0 0 0-1.06 1.06l3.5 3.5a.75.75 0 0 0 1.06 0l3.5-3.5a.75.75 0 0 0-1.06-1.06L8.75 8.44V2.75Z"/>
|
||||
<path d="M3.5 9.75a.75.75 0 0 0-1.5 0v1.5A2.75 2.75 0 0 0 4.75 14h6.5A2.75 2.75 0 0 0 14 11.25v-1.5a.75.75 0 0 0-1.5 0v1.5c0 .69-.56 1.25-1.25 1.25h-6.5c-.69 0-1.25-.56-1.25-1.25v-1.5Z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 471 B |
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path fill-rule="evenodd" d="M8 2a.75.75 0 0 1 .75.75v8.69l3.22-3.22a.75.75 0 1 1 1.06 1.06l-4.5 4.5a.75.75 0 0 1-1.06 0l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.22 3.22V2.75A.75.75 0 0 1 8 2Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 335 B |
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path fill-rule="evenodd" d="M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8Zm10.25.75a.75.75 0 0 0 0-1.5H6.56l1.22-1.22a.75.75 0 0 0-1.06-1.06l-2.5 2.5a.75.75 0 0 0 0 1.06l2.5 2.5a.75.75 0 1 0 1.06-1.06L6.56 8.75h4.69Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 355 B |
@@ -1,4 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path d="M4.75 2A2.75 2.75 0 0 0 2 4.75v6.5A2.75 2.75 0 0 0 4.75 14h3a2.75 2.75 0 0 0 2.75-2.75v-.5a.75.75 0 0 0-1.5 0v.5c0 .69-.56 1.25-1.25 1.25h-3c-.69 0-1.25-.56-1.25-1.25v-6.5c0-.69.56-1.25 1.25-1.25h3C8.44 3.5 9 4.06 9 4.75v.5a.75.75 0 0 0 1.5 0v-.5A2.75 2.75 0 0 0 7.75 2h-3Z"/>
|
||||
<path d="M8.03 6.28a.75.75 0 0 0-1.06-1.06L4.72 7.47a.75.75 0 0 0 0 1.06l2.25 2.25a.75.75 0 1 0 1.06-1.06l-.97-.97h7.19a.75.75 0 0 0 0-1.5H7.06l.97-.97Z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 570 B |
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path fill-rule="evenodd" d="M14 4.75A2.75 2.75 0 0 0 11.25 2h-3A2.75 2.75 0 0 0 5.5 4.75v.5a.75.75 0 0 0 1.5 0v-.5c0-.69.56-1.25 1.25-1.25h3c.69 0 1.25.56 1.25 1.25v6.5c0 .69-.56 1.25-1.25 1.25h-3c-.69 0-1.25-.56-1.25-1.25v-.5a.75.75 0 0 0-1.5 0v.5A2.75 2.75 0 0 0 8.25 14h3A2.75 2.75 0 0 0 14 11.25v-6.5Zm-9.47.47a.75.75 0 0 0-1.06 0L1.22 7.47a.75.75 0 0 0 0 1.06l2.25 2.25a.75.75 0 1 0 1.06-1.06l-.97-.97h7.19a.75.75 0 0 0 0-1.5H3.56l.97-.97a.75.75 0 0 0 0-1.06Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 615 B |
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path fill-rule="evenodd" d="M14 8a.75.75 0 0 1-.75.75H4.56l3.22 3.22a.75.75 0 1 1-1.06 1.06l-4.5-4.5a.75.75 0 0 1 0-1.06l4.5-4.5a.75.75 0 0 1 1.06 1.06L4.56 7.25h8.69A.75.75 0 0 1 14 8Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 336 B |
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path fill-rule="evenodd" d="M8 2a.75.75 0 0 1 .75.75v8.69l1.22-1.22a.75.75 0 1 1 1.06 1.06l-2.5 2.5a.75.75 0 0 1-1.06 0l-2.5-2.5a.75.75 0 1 1 1.06-1.06l1.22 1.22V2.75A.75.75 0 0 1 8 2Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 335 B |
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path fill-rule="evenodd" d="M14 8a.75.75 0 0 1-.75.75H4.56l1.22 1.22a.75.75 0 1 1-1.06 1.06l-2.5-2.5a.75.75 0 0 1 0-1.06l2.5-2.5a.75.75 0 0 1 1.06 1.06L4.56 7.25h8.69A.75.75 0 0 1 14 8Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 336 B |
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path fill-rule="evenodd" d="M2 8c0 .414.336.75.75.75h8.69l-1.22 1.22a.75.75 0 1 0 1.06 1.06l2.5-2.5a.75.75 0 0 0 0-1.06l-2.5-2.5a.75.75 0 1 0-1.06 1.06l1.22 1.22H2.75A.75.75 0 0 0 2 8Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 335 B |
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path fill-rule="evenodd" d="M8 14a.75.75 0 0 0 .75-.75V4.56l1.22 1.22a.75.75 0 1 0 1.06-1.06l-2.5-2.5a.75.75 0 0 0-1.06 0l-2.5 2.5a.75.75 0 0 0 1.06 1.06l1.22-1.22v8.69c0 .414.336.75.75.75Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 340 B |
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path fill-rule="evenodd" d="M8 3.5c-.771 0-1.537.022-2.297.066a1.124 1.124 0 0 0-1.058 1.028l-.018.214a.75.75 0 1 1-1.495-.12l.018-.221a2.624 2.624 0 0 1 2.467-2.399 41.628 41.628 0 0 1 4.766 0 2.624 2.624 0 0 1 2.467 2.399c.056.662.097 1.329.122 2l.748-.748a.75.75 0 1 1 1.06 1.06l-2 2.001a.75.75 0 0 1-1.061 0l-2-1.999a.75.75 0 0 1 1.061-1.06l.689.688a39.89 39.89 0 0 0-.114-1.815 1.124 1.124 0 0 0-1.058-1.028A40.138 40.138 0 0 0 8 3.5ZM3.22 7.22a.75.75 0 0 1 1.061 0l2 2a.75.75 0 1 1-1.06 1.06l-.69-.69c.025.61.062 1.214.114 1.816.048.56.496.996 1.058 1.028a40.112 40.112 0 0 0 4.594 0 1.124 1.124 0 0 0 1.058-1.028 39.2 39.2 0 0 0 .018-.219.75.75 0 1 1 1.495.12l-.018.226a2.624 2.624 0 0 1-2.467 2.399 41.648 41.648 0 0 1-4.766 0 2.624 2.624 0 0 1-2.467-2.399 41.395 41.395 0 0 1-.122-2l-.748.748A.75.75 0 1 1 1.22 9.22l2-2Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 980 B |
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path fill-rule="evenodd" d="M13.836 2.477a.75.75 0 0 1 .75.75v3.182a.75.75 0 0 1-.75.75h-3.182a.75.75 0 0 1 0-1.5h1.37l-.84-.841a4.5 4.5 0 0 0-7.08.932.75.75 0 0 1-1.3-.75 6 6 0 0 1 9.44-1.242l.842.84V3.227a.75.75 0 0 1 .75-.75Zm-.911 7.5A.75.75 0 0 1 13.199 11a6 6 0 0 1-9.44 1.241l-.84-.84v1.371a.75.75 0 0 1-1.5 0V9.591a.75.75 0 0 1 .75-.75H5.35a.75.75 0 0 1 0 1.5H3.98l.841.841a4.5 4.5 0 0 0 7.08-.932.75.75 0 0 1 1.025-.273Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 580 B |
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path fill-rule="evenodd" d="M15 8A7 7 0 1 0 1 8a7 7 0 0 0 14 0ZM4.75 7.25a.75.75 0 0 0 0 1.5h4.69L8.22 9.97a.75.75 0 1 0 1.06 1.06l2.5-2.5a.75.75 0 0 0 0-1.06l-2.5-2.5a.75.75 0 0 0-1.06 1.06l1.22 1.22H4.75Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 357 B |
@@ -1,4 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path d="M11.25 2A2.75 2.75 0 0 1 14 4.75v6.5A2.75 2.75 0 0 1 11.25 14h-3a2.75 2.75 0 0 1-2.75-2.75v-.5a.75.75 0 0 1 1.5 0v.5c0 .69.56 1.25 1.25 1.25h3c.69 0 1.25-.56 1.25-1.25v-6.5c0-.69-.56-1.25-1.25-1.25h-3C7.56 3.5 7 4.06 7 4.75v.5a.75.75 0 0 1-1.5 0v-.5A2.75 2.75 0 0 1 8.25 2h3Z"/>
|
||||
<path d="M7.97 6.28a.75.75 0 0 1 1.06-1.06l2.25 2.25a.75.75 0 0 1 0 1.06l-2.25 2.25a.75.75 0 1 1-1.06-1.06l.97-.97H1.75a.75.75 0 0 1 0-1.5h7.19l-.97-.97Z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 573 B |
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path fill-rule="evenodd" d="M2 4.75A2.75 2.75 0 0 1 4.75 2h3a2.75 2.75 0 0 1 2.75 2.75v.5a.75.75 0 0 1-1.5 0v-.5c0-.69-.56-1.25-1.25-1.25h-3c-.69 0-1.25.56-1.25 1.25v6.5c0 .69.56 1.25 1.25 1.25h3c.69 0 1.25-.56 1.25-1.25v-.5a.75.75 0 0 1 1.5 0v.5A2.75 2.75 0 0 1 7.75 14h-3A2.75 2.75 0 0 1 2 11.25v-6.5Zm9.47.47a.75.75 0 0 1 1.06 0l2.25 2.25a.75.75 0 0 1 0 1.06l-2.25 2.25a.75.75 0 1 1-1.06-1.06l.97-.97H5.25a.75.75 0 0 1 0-1.5h7.19l-.97-.97a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 613 B |
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path fill-rule="evenodd" d="M2 8a.75.75 0 0 1 .75-.75h8.69L8.22 4.03a.75.75 0 0 1 1.06-1.06l4.5 4.5a.75.75 0 0 1 0 1.06l-4.5 4.5a.75.75 0 0 1-1.06-1.06l3.22-3.22H2.75A.75.75 0 0 1 2 8Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 335 B |
@@ -1,4 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path d="M6.22 8.72a.75.75 0 0 0 1.06 1.06l5.22-5.22v1.69a.75.75 0 0 0 1.5 0v-3.5a.75.75 0 0 0-.75-.75h-3.5a.75.75 0 0 0 0 1.5h1.69L6.22 8.72Z"/>
|
||||
<path d="M3.5 6.75c0-.69.56-1.25 1.25-1.25H7A.75.75 0 0 0 7 4H4.75A2.75 2.75 0 0 0 2 6.75v4.5A2.75 2.75 0 0 0 4.75 14h4.5A2.75 2.75 0 0 0 12 11.25V9a.75.75 0 0 0-1.5 0v2.25c0 .69-.56 1.25-1.25 1.25h-4.5c-.69 0-1.25-.56-1.25-1.25v-4.5Z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 512 B |
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path fill-rule="evenodd" d="M1.22 4.22a.75.75 0 0 1 1.06 0L6 7.94l2.761-2.762a.75.75 0 0 1 1.158.12 24.9 24.9 0 0 1 2.718 5.556l.729-1.261a.75.75 0 0 1 1.299.75l-1.591 2.755a.75.75 0 0 1-1.025.275l-2.756-1.591a.75.75 0 1 1 .75-1.3l1.097.634a23.417 23.417 0 0 0-1.984-4.211L6.53 9.53a.75.75 0 0 1-1.06 0L1.22 5.28a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 484 B |
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path fill-rule="evenodd" d="M9.808 4.057a.75.75 0 0 1 .92-.527l3.116.849a.75.75 0 0 1 .528.915l-.823 3.121a.75.75 0 0 1-1.45-.382l.337-1.281a23.484 23.484 0 0 0-3.609 3.056.75.75 0 0 1-1.07.01L6 8.06l-3.72 3.72a.75.75 0 1 1-1.06-1.061l4.25-4.25a.75.75 0 0 1 1.06 0l1.756 1.755a25.015 25.015 0 0 1 3.508-2.85l-1.46-.398a.75.75 0 0 1-.526-.92Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 492 B |
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path fill-rule="evenodd" d="M13.25 2a.75.75 0 0 0-.75.75v6.5H4.56l.97-.97a.75.75 0 0 0-1.06-1.06L2.22 9.47a.75.75 0 0 0 0 1.06l2.25 2.25a.75.75 0 0 0 1.06-1.06l-.97-.97h8.69A.75.75 0 0 0 14 10V2.75a.75.75 0 0 0-.75-.75Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 370 B |
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path fill-rule="evenodd" d="M2.75 2a.75.75 0 0 1 .75.75v6.5h7.94l-.97-.97a.75.75 0 0 1 1.06-1.06l2.25 2.25a.75.75 0 0 1 0 1.06l-2.25 2.25a.75.75 0 1 1-1.06-1.06l.97-.97H2.75A.75.75 0 0 1 2 10V2.75A.75.75 0 0 1 2.75 2Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 368 B |
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path fill-rule="evenodd" d="M5.47 2.22A.75.75 0 0 1 6 2h7.25a.75.75 0 0 1 0 1.5h-6.5v7.94l.97-.97a.75.75 0 0 1 1.06 1.06l-2.25 2.25a.75.75 0 0 1-1.06 0l-2.25-2.25a.75.75 0 1 1 1.06-1.06l.97.97V2.75a.75.75 0 0 1 .22-.53Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 370 B |
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path fill-rule="evenodd" d="M14 13.25a.75.75 0 0 0-.75-.75h-6.5V4.56l.97.97a.75.75 0 0 0 1.06-1.06L6.53 2.22a.75.75 0 0 0-1.06 0L3.22 4.47a.75.75 0 0 0 1.06 1.06l.97-.97v8.69c0 .414.336.75.75.75h7.25a.75.75 0 0 0 .75-.75Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 372 B |
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path fill-rule="evenodd" d="M2 2.75c0 .414.336.75.75.75h6.5v7.94l-.97-.97a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.06 0l2.25-2.25a.75.75 0 1 0-1.06-1.06l-.97.97V2.75A.75.75 0 0 0 10 2H2.75a.75.75 0 0 0-.75.75Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 367 B |
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path fill-rule="evenodd" d="M2 13.25a.75.75 0 0 1 .75-.75h6.5V4.56l-.97.97a.75.75 0 0 1-1.06-1.06l2.25-2.25a.75.75 0 0 1 1.06 0l2.25 2.25a.75.75 0 0 1-1.06 1.06l-.97-.97v8.69A.75.75 0 0 1 10 14H2.75a.75.75 0 0 1-.75-.75Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 371 B |
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path fill-rule="evenodd" d="M13.25 14a.75.75 0 0 1-.75-.75v-6.5H4.56l.97.97a.75.75 0 0 1-1.06 1.06L2.22 6.53a.75.75 0 0 1 0-1.06l2.25-2.25a.75.75 0 0 1 1.06 1.06l-.97.97h8.69A.75.75 0 0 1 14 6v7.25a.75.75 0 0 1-.75.75Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 369 B |
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path fill-rule="evenodd" d="M2.75 14a.75.75 0 0 0 .75-.75v-6.5h7.94l-.97.97a.75.75 0 0 0 1.06 1.06l2.25-2.25a.75.75 0 0 0 0-1.06l-2.25-2.25a.75.75 0 1 0-1.06 1.06l.97.97H2.75A.75.75 0 0 0 2 6v7.25c0 .414.336.75.75.75Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 368 B |
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path fill-rule="evenodd" d="M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1Zm-.75 10.25a.75.75 0 0 0 1.5 0V6.56l1.22 1.22a.75.75 0 1 0 1.06-1.06l-2.5-2.5a.75.75 0 0 0-1.06 0l-2.5 2.5a.75.75 0 0 0 1.06 1.06l1.22-1.22v4.69Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 358 B |
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path fill-rule="evenodd" d="M11.78 11.78a.75.75 0 0 0 0-1.06L6.56 5.5h3.69a.75.75 0 0 0 0-1.5h-5.5a.75.75 0 0 0-.75.75v5.5a.75.75 0 0 0 1.5 0V6.56l5.22 5.22a.75.75 0 0 0 1.06 0Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 328 B |
@@ -1,4 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path d="M5.268 14A2 2 0 0 0 7 15h4a2 2 0 0 0 2-2v-3a2 2 0 0 0-1-1.732V11a3 3 0 0 1-3 3H5.268ZM6.25 6h1.5V3.56l1.22 1.22a.75.75 0 1 0 1.06-1.06l-2.5-2.5a.75.75 0 0 0-1.06 0l-2.5 2.5a.75.75 0 0 0 1.06 1.06l1.22-1.22V6Z"/>
|
||||
<path d="M6.25 8.75a.75.75 0 0 0 1.5 0V6H9a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h1.25v2.75Z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 468 B |
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path d="M8.75 6h-1.5V3.56L6.03 4.78a.75.75 0 0 1-1.06-1.06l2.5-2.5a.75.75 0 0 1 1.06 0l2.5 2.5a.75.75 0 1 1-1.06 1.06L8.75 3.56V6H11a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2.25v5.25a.75.75 0 0 0 1.5 0V6Z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 357 B |
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
|
||||
<path fill-rule="evenodd" d="M4.22 11.78a.75.75 0 0 1 0-1.06L9.44 5.5H5.75a.75.75 0 0 1 0-1.5h5.5a.75.75 0 0 1 .75.75v5.5a.75.75 0 0 1-1.5 0V6.56l-5.22 5.22a.75.75 0 0 1-1.06 0Z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 327 B |