- */
- function both(\Hamcrest\Matcher $matcher)
- {
- return \Hamcrest\Core\CombinableMatcher::both($matcher);
- }
-}
-
-if (!function_exists('either')) { /**
- * This is useful for fluently combining matchers where either may pass,
- * for example:
- *
- */
- function hasItem(/* args... */)
- {
- $args = func_get_args();
- return call_user_func_array(array('\Hamcrest\Core\IsCollectionContaining', 'hasItem'), $args);
- }
-}
-
-if (!function_exists('hasItems')) { /**
- * Test if the value is an array containing elements that match all of these
- * matchers.
- *
- * Example:
- *
- *
- * @factory
- */
- public static function both(Matcher $matcher)
- {
- return new self($matcher);
- }
-
- /**
- * This is useful for fluently combining matchers where either may pass,
- * for example:
- *
- *
- * @factory ...
- */
- public static function hasItem()
- {
- $args = func_get_args();
- $firstArg = array_shift($args);
-
- return new self(Util::wrapValueWithIsEqual($firstArg));
- }
-
- /**
- * Test if the value is an array containing elements that match all of these
- * matchers.
- *
- * Example:
- *
- */
- public static function either(\Hamcrest\Matcher $matcher)
- {
- return \Hamcrest\Core\CombinableMatcher::either($matcher);
- }
-
- /**
- * Wraps an existing matcher and overrides the description when it fails.
- */
- public static function describedAs(/* args... */)
- {
- $args = func_get_args();
- return call_user_func_array(array('\Hamcrest\Core\DescribedAs', 'describedAs'), $args);
- }
-
- /**
- * @param Matcher $itemMatcher
- * A matcher to apply to every element in an array.
- *
- * @return \Hamcrest\Core\Every
- * Evaluates to TRUE for a collection in which every item matches $itemMatcher
- */
- public static function everyItem(\Hamcrest\Matcher $itemMatcher)
- {
- return \Hamcrest\Core\Every::everyItem($itemMatcher);
- }
-
- /**
- * Does array size satisfy a given matcher?
- */
- public static function hasToString($matcher)
- {
- return \Hamcrest\Core\HasToString::hasToString($matcher);
- }
-
- /**
- * Decorates another Matcher, retaining the behavior but allowing tests
- * to be slightly more expressive.
- *
- * For example: assertThat($cheese, equalTo($smelly))
- * vs. assertThat($cheese, is(equalTo($smelly)))
- */
- public static function is($value)
- {
- return \Hamcrest\Core\Is::is($value);
- }
-
- /**
- * This matcher always evaluates to true.
- *
- * @param string $description A meaningful string used when describing itself.
- *
- * @return \Hamcrest\Core\IsAnything
- */
- public static function anything($description = 'ANYTHING')
- {
- return \Hamcrest\Core\IsAnything::anything($description);
- }
-
- /**
- * Test if the value is an array containing this matcher.
- *
- * Example:
- *
- */
- public static function hasItem(/* args... */)
- {
- $args = func_get_args();
- return call_user_func_array(array('\Hamcrest\Core\IsCollectionContaining', 'hasItem'), $args);
- }
-
- /**
- * Test if the value is an array containing elements that match all of these
- * matchers.
- *
- * Example:
- *
- {{ __('A fresh verification link has been sent to your email address.') }}
-
- @endif
-
- {{ __('Before proceeding, please check your email for a verification link.') }}
- {{ __('If you did not receive the email') }}, {{ __('click here to request another') }}.
-
-
-
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/CreatesUserProviders.php b/vendor/laravel/framework/src/Illuminate/Auth/CreatesUserProviders.php
deleted file mode 100644
index 46416b5..0000000
--- a/vendor/laravel/framework/src/Illuminate/Auth/CreatesUserProviders.php
+++ /dev/null
@@ -1,94 +0,0 @@
-getProviderConfiguration($provider))) {
- return;
- }
-
- if (isset($this->customProviderCreators[$driver = ($config['driver'] ?? null)])) {
- return call_user_func(
- $this->customProviderCreators[$driver], $this->app, $config
- );
- }
-
- switch ($driver) {
- case 'database':
- return $this->createDatabaseProvider($config);
- case 'eloquent':
- return $this->createEloquentProvider($config);
- default:
- throw new InvalidArgumentException(
- "Authentication user provider [{$driver}] is not defined."
- );
- }
- }
-
- /**
- * Get the user provider configuration.
- *
- * @param string|null $provider
- * @return array|null
- */
- protected function getProviderConfiguration($provider)
- {
- if ($provider = $provider ?: $this->getDefaultUserProvider()) {
- return $this->app['config']['auth.providers.'.$provider];
- }
- }
-
- /**
- * Create an instance of the database user provider.
- *
- * @param array $config
- * @return \Illuminate\Auth\DatabaseUserProvider
- */
- protected function createDatabaseProvider($config)
- {
- $connection = $this->app['db']->connection();
-
- return new DatabaseUserProvider($connection, $this->app['hash'], $config['table']);
- }
-
- /**
- * Create an instance of the Eloquent user provider.
- *
- * @param array $config
- * @return \Illuminate\Auth\EloquentUserProvider
- */
- protected function createEloquentProvider($config)
- {
- return new EloquentUserProvider($this->app['hash'], $config['model']);
- }
-
- /**
- * Get the default user provider name.
- *
- * @return string
- */
- public function getDefaultUserProvider()
- {
- return $this->app['config']['auth.defaults.provider'];
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/DatabaseUserProvider.php b/vendor/laravel/framework/src/Illuminate/Auth/DatabaseUserProvider.php
deleted file mode 100755
index f8005b7..0000000
--- a/vendor/laravel/framework/src/Illuminate/Auth/DatabaseUserProvider.php
+++ /dev/null
@@ -1,159 +0,0 @@
-conn = $conn;
- $this->table = $table;
- $this->hasher = $hasher;
- }
-
- /**
- * Retrieve a user by their unique identifier.
- *
- * @param mixed $identifier
- * @return \Illuminate\Contracts\Auth\Authenticatable|null
- */
- public function retrieveById($identifier)
- {
- $user = $this->conn->table($this->table)->find($identifier);
-
- return $this->getGenericUser($user);
- }
-
- /**
- * Retrieve a user by their unique identifier and "remember me" token.
- *
- * @param mixed $identifier
- * @param string $token
- * @return \Illuminate\Contracts\Auth\Authenticatable|null
- */
- public function retrieveByToken($identifier, $token)
- {
- $user = $this->getGenericUser(
- $this->conn->table($this->table)->find($identifier)
- );
-
- return $user && $user->getRememberToken() && hash_equals($user->getRememberToken(), $token)
- ? $user : null;
- }
-
- /**
- * Update the "remember me" token for the given user in storage.
- *
- * @param \Illuminate\Contracts\Auth\Authenticatable $user
- * @param string $token
- * @return void
- */
- public function updateRememberToken(UserContract $user, $token)
- {
- $this->conn->table($this->table)
- ->where($user->getAuthIdentifierName(), $user->getAuthIdentifier())
- ->update([$user->getRememberTokenName() => $token]);
- }
-
- /**
- * Retrieve a user by the given credentials.
- *
- * @param array $credentials
- * @return \Illuminate\Contracts\Auth\Authenticatable|null
- */
- public function retrieveByCredentials(array $credentials)
- {
- if (empty($credentials) ||
- (count($credentials) === 1 &&
- array_key_exists('password', $credentials))) {
- return;
- }
-
- // First we will add each credential element to the query as a where clause.
- // Then we can execute the query and, if we found a user, return it in a
- // generic "user" object that will be utilized by the Guard instances.
- $query = $this->conn->table($this->table);
-
- foreach ($credentials as $key => $value) {
- if (Str::contains($key, 'password')) {
- continue;
- }
-
- if (is_array($value) || $value instanceof Arrayable) {
- $query->whereIn($key, $value);
- } else {
- $query->where($key, $value);
- }
- }
-
- // Now we are ready to execute the query to see if we have an user matching
- // the given credentials. If not, we will just return nulls and indicate
- // that there are no matching users for these given credential arrays.
- $user = $query->first();
-
- return $this->getGenericUser($user);
- }
-
- /**
- * Get the generic user.
- *
- * @param mixed $user
- * @return \Illuminate\Auth\GenericUser|null
- */
- protected function getGenericUser($user)
- {
- if (! is_null($user)) {
- return new GenericUser((array) $user);
- }
- }
-
- /**
- * Validate a user against the given credentials.
- *
- * @param \Illuminate\Contracts\Auth\Authenticatable $user
- * @param array $credentials
- * @return bool
- */
- public function validateCredentials(UserContract $user, array $credentials)
- {
- return $this->hasher->check(
- $credentials['password'], $user->getAuthPassword()
- );
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/EloquentUserProvider.php b/vendor/laravel/framework/src/Illuminate/Auth/EloquentUserProvider.php
deleted file mode 100755
index 23b5b79..0000000
--- a/vendor/laravel/framework/src/Illuminate/Auth/EloquentUserProvider.php
+++ /dev/null
@@ -1,202 +0,0 @@
-model = $model;
- $this->hasher = $hasher;
- }
-
- /**
- * Retrieve a user by their unique identifier.
- *
- * @param mixed $identifier
- * @return \Illuminate\Contracts\Auth\Authenticatable|null
- */
- public function retrieveById($identifier)
- {
- $model = $this->createModel();
-
- return $model->newQuery()
- ->where($model->getAuthIdentifierName(), $identifier)
- ->first();
- }
-
- /**
- * Retrieve a user by their unique identifier and "remember me" token.
- *
- * @param mixed $identifier
- * @param string $token
- * @return \Illuminate\Contracts\Auth\Authenticatable|null
- */
- public function retrieveByToken($identifier, $token)
- {
- $model = $this->createModel();
-
- $model = $model->where($model->getAuthIdentifierName(), $identifier)->first();
-
- if (! $model) {
- return null;
- }
-
- $rememberToken = $model->getRememberToken();
-
- return $rememberToken && hash_equals($rememberToken, $token) ? $model : null;
- }
-
- /**
- * Update the "remember me" token for the given user in storage.
- *
- * @param \Illuminate\Contracts\Auth\Authenticatable|\Illuminate\Database\Eloquent\Model $user
- * @param string $token
- * @return void
- */
- public function updateRememberToken(UserContract $user, $token)
- {
- $user->setRememberToken($token);
-
- $timestamps = $user->timestamps;
-
- $user->timestamps = false;
-
- $user->save();
-
- $user->timestamps = $timestamps;
- }
-
- /**
- * Retrieve a user by the given credentials.
- *
- * @param array $credentials
- * @return \Illuminate\Contracts\Auth\Authenticatable|null
- */
- public function retrieveByCredentials(array $credentials)
- {
- if (empty($credentials) ||
- (count($credentials) === 1 &&
- array_key_exists('password', $credentials))) {
- return;
- }
-
- // First we will add each credential element to the query as a where clause.
- // Then we can execute the query and, if we found a user, return it in a
- // Eloquent User "model" that will be utilized by the Guard instances.
- $query = $this->createModel()->newQuery();
-
- foreach ($credentials as $key => $value) {
- if (Str::contains($key, 'password')) {
- continue;
- }
-
- if (is_array($value) || $value instanceof Arrayable) {
- $query->whereIn($key, $value);
- } else {
- $query->where($key, $value);
- }
- }
-
- return $query->first();
- }
-
- /**
- * Validate a user against the given credentials.
- *
- * @param \Illuminate\Contracts\Auth\Authenticatable $user
- * @param array $credentials
- * @return bool
- */
- public function validateCredentials(UserContract $user, array $credentials)
- {
- $plain = $credentials['password'];
-
- return $this->hasher->check($plain, $user->getAuthPassword());
- }
-
- /**
- * Create a new instance of the model.
- *
- * @return \Illuminate\Database\Eloquent\Model
- */
- public function createModel()
- {
- $class = '\\'.ltrim($this->model, '\\');
-
- return new $class;
- }
-
- /**
- * Gets the hasher implementation.
- *
- * @return \Illuminate\Contracts\Hashing\Hasher
- */
- public function getHasher()
- {
- return $this->hasher;
- }
-
- /**
- * Sets the hasher implementation.
- *
- * @param \Illuminate\Contracts\Hashing\Hasher $hasher
- * @return $this
- */
- public function setHasher(HasherContract $hasher)
- {
- $this->hasher = $hasher;
-
- return $this;
- }
-
- /**
- * Gets the name of the Eloquent user model.
- *
- * @return string
- */
- public function getModel()
- {
- return $this->model;
- }
-
- /**
- * Sets the name of the Eloquent user model.
- *
- * @param string $model
- * @return $this
- */
- public function setModel($model)
- {
- $this->model = $model;
-
- return $this;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Events/Attempting.php b/vendor/laravel/framework/src/Illuminate/Auth/Events/Attempting.php
deleted file mode 100644
index 3f911ba..0000000
--- a/vendor/laravel/framework/src/Illuminate/Auth/Events/Attempting.php
+++ /dev/null
@@ -1,42 +0,0 @@
-guard = $guard;
- $this->remember = $remember;
- $this->credentials = $credentials;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Events/Authenticated.php b/vendor/laravel/framework/src/Illuminate/Auth/Events/Authenticated.php
deleted file mode 100644
index faefcbe..0000000
--- a/vendor/laravel/framework/src/Illuminate/Auth/Events/Authenticated.php
+++ /dev/null
@@ -1,37 +0,0 @@
-user = $user;
- $this->guard = $guard;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Events/Failed.php b/vendor/laravel/framework/src/Illuminate/Auth/Events/Failed.php
deleted file mode 100644
index 34f8124..0000000
--- a/vendor/laravel/framework/src/Illuminate/Auth/Events/Failed.php
+++ /dev/null
@@ -1,42 +0,0 @@
-user = $user;
- $this->guard = $guard;
- $this->credentials = $credentials;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Events/Lockout.php b/vendor/laravel/framework/src/Illuminate/Auth/Events/Lockout.php
deleted file mode 100644
index 347943f..0000000
--- a/vendor/laravel/framework/src/Illuminate/Auth/Events/Lockout.php
+++ /dev/null
@@ -1,26 +0,0 @@
-request = $request;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Events/Login.php b/vendor/laravel/framework/src/Illuminate/Auth/Events/Login.php
deleted file mode 100644
index 3005183..0000000
--- a/vendor/laravel/framework/src/Illuminate/Auth/Events/Login.php
+++ /dev/null
@@ -1,46 +0,0 @@
-user = $user;
- $this->guard = $guard;
- $this->remember = $remember;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Events/Logout.php b/vendor/laravel/framework/src/Illuminate/Auth/Events/Logout.php
deleted file mode 100644
index bc8c394..0000000
--- a/vendor/laravel/framework/src/Illuminate/Auth/Events/Logout.php
+++ /dev/null
@@ -1,37 +0,0 @@
-user = $user;
- $this->guard = $guard;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Events/PasswordReset.php b/vendor/laravel/framework/src/Illuminate/Auth/Events/PasswordReset.php
deleted file mode 100644
index f57b3c9..0000000
--- a/vendor/laravel/framework/src/Illuminate/Auth/Events/PasswordReset.php
+++ /dev/null
@@ -1,28 +0,0 @@
-user = $user;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Events/Registered.php b/vendor/laravel/framework/src/Illuminate/Auth/Events/Registered.php
deleted file mode 100644
index f84058c..0000000
--- a/vendor/laravel/framework/src/Illuminate/Auth/Events/Registered.php
+++ /dev/null
@@ -1,28 +0,0 @@
-user = $user;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Events/Verified.php b/vendor/laravel/framework/src/Illuminate/Auth/Events/Verified.php
deleted file mode 100644
index 1d6e4c0..0000000
--- a/vendor/laravel/framework/src/Illuminate/Auth/Events/Verified.php
+++ /dev/null
@@ -1,28 +0,0 @@
-user = $user;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/GenericUser.php b/vendor/laravel/framework/src/Illuminate/Auth/GenericUser.php
deleted file mode 100755
index b6880c0..0000000
--- a/vendor/laravel/framework/src/Illuminate/Auth/GenericUser.php
+++ /dev/null
@@ -1,134 +0,0 @@
-attributes = $attributes;
- }
-
- /**
- * Get the name of the unique identifier for the user.
- *
- * @return string
- */
- public function getAuthIdentifierName()
- {
- return 'id';
- }
-
- /**
- * Get the unique identifier for the user.
- *
- * @return mixed
- */
- public function getAuthIdentifier()
- {
- $name = $this->getAuthIdentifierName();
-
- return $this->attributes[$name];
- }
-
- /**
- * Get the password for the user.
- *
- * @return string
- */
- public function getAuthPassword()
- {
- return $this->attributes['password'];
- }
-
- /**
- * Get the "remember me" token value.
- *
- * @return string
- */
- public function getRememberToken()
- {
- return $this->attributes[$this->getRememberTokenName()];
- }
-
- /**
- * Set the "remember me" token value.
- *
- * @param string $value
- * @return void
- */
- public function setRememberToken($value)
- {
- $this->attributes[$this->getRememberTokenName()] = $value;
- }
-
- /**
- * Get the column name for the "remember me" token.
- *
- * @return string
- */
- public function getRememberTokenName()
- {
- return 'remember_token';
- }
-
- /**
- * Dynamically access the user's attributes.
- *
- * @param string $key
- * @return mixed
- */
- public function __get($key)
- {
- return $this->attributes[$key];
- }
-
- /**
- * Dynamically set an attribute on the user.
- *
- * @param string $key
- * @param mixed $value
- * @return void
- */
- public function __set($key, $value)
- {
- $this->attributes[$key] = $value;
- }
-
- /**
- * Dynamically check if a value is set on the user.
- *
- * @param string $key
- * @return bool
- */
- public function __isset($key)
- {
- return isset($this->attributes[$key]);
- }
-
- /**
- * Dynamically unset a value on the user.
- *
- * @param string $key
- * @return void
- */
- public function __unset($key)
- {
- unset($this->attributes[$key]);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/GuardHelpers.php b/vendor/laravel/framework/src/Illuminate/Auth/GuardHelpers.php
deleted file mode 100644
index 8bfa77a..0000000
--- a/vendor/laravel/framework/src/Illuminate/Auth/GuardHelpers.php
+++ /dev/null
@@ -1,118 +0,0 @@
-user())) {
- return $user;
- }
-
- throw new AuthenticationException;
- }
-
- /**
- * Determine if the guard has a user instance.
- *
- * @return bool
- */
- public function hasUser()
- {
- return ! is_null($this->user);
- }
-
- /**
- * Determine if the current user is authenticated.
- *
- * @return bool
- */
- public function check()
- {
- return ! is_null($this->user());
- }
-
- /**
- * Determine if the current user is a guest.
- *
- * @return bool
- */
- public function guest()
- {
- return ! $this->check();
- }
-
- /**
- * Get the ID for the currently authenticated user.
- *
- * @return int|null
- */
- public function id()
- {
- if ($this->user()) {
- return $this->user()->getAuthIdentifier();
- }
- }
-
- /**
- * Set the current user.
- *
- * @param \Illuminate\Contracts\Auth\Authenticatable $user
- * @return $this
- */
- public function setUser(AuthenticatableContract $user)
- {
- $this->user = $user;
-
- return $this;
- }
-
- /**
- * Get the user provider used by the guard.
- *
- * @return \Illuminate\Contracts\Auth\UserProvider
- */
- public function getProvider()
- {
- return $this->provider;
- }
-
- /**
- * Set the user provider used by the guard.
- *
- * @param \Illuminate\Contracts\Auth\UserProvider $provider
- * @return void
- */
- public function setProvider(UserProvider $provider)
- {
- $this->provider = $provider;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Listeners/SendEmailVerificationNotification.php b/vendor/laravel/framework/src/Illuminate/Auth/Listeners/SendEmailVerificationNotification.php
deleted file mode 100644
index 12dfa69..0000000
--- a/vendor/laravel/framework/src/Illuminate/Auth/Listeners/SendEmailVerificationNotification.php
+++ /dev/null
@@ -1,22 +0,0 @@
-user instanceof MustVerifyEmail && ! $event->user->hasVerifiedEmail()) {
- $event->user->sendEmailVerificationNotification();
- }
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php b/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php
deleted file mode 100644
index 98b9bc6..0000000
--- a/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php
+++ /dev/null
@@ -1,82 +0,0 @@
-auth = $auth;
- }
-
- /**
- * Handle an incoming request.
- *
- * @param \Illuminate\Http\Request $request
- * @param \Closure $next
- * @param string[] ...$guards
- * @return mixed
- *
- * @throws \Illuminate\Auth\AuthenticationException
- */
- public function handle($request, Closure $next, ...$guards)
- {
- $this->authenticate($request, $guards);
-
- return $next($request);
- }
-
- /**
- * Determine if the user is logged in to any of the given guards.
- *
- * @param \Illuminate\Http\Request $request
- * @param array $guards
- * @return void
- *
- * @throws \Illuminate\Auth\AuthenticationException
- */
- protected function authenticate($request, array $guards)
- {
- if (empty($guards)) {
- $guards = [null];
- }
-
- foreach ($guards as $guard) {
- if ($this->auth->guard($guard)->check()) {
- return $this->auth->shouldUse($guard);
- }
- }
-
- throw new AuthenticationException(
- 'Unauthenticated.', $guards, $this->redirectTo($request)
- );
- }
-
- /**
- * Get the path the user should be redirected to when they are not authenticated.
- *
- * @param \Illuminate\Http\Request $request
- * @return string
- */
- protected function redirectTo($request)
- {
- //
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Middleware/AuthenticateWithBasicAuth.php b/vendor/laravel/framework/src/Illuminate/Auth/Middleware/AuthenticateWithBasicAuth.php
deleted file mode 100644
index c51df90..0000000
--- a/vendor/laravel/framework/src/Illuminate/Auth/Middleware/AuthenticateWithBasicAuth.php
+++ /dev/null
@@ -1,41 +0,0 @@
-auth = $auth;
- }
-
- /**
- * Handle an incoming request.
- *
- * @param \Illuminate\Http\Request $request
- * @param \Closure $next
- * @param string|null $guard
- * @param string|null $field
- * @return mixed
- */
- public function handle($request, Closure $next, $guard = null, $field = null)
- {
- return $this->auth->guard($guard)->basic($field ?: 'email') ?: $next($request);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authorize.php b/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authorize.php
deleted file mode 100644
index d1774d7..0000000
--- a/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authorize.php
+++ /dev/null
@@ -1,88 +0,0 @@
-gate = $gate;
- }
-
- /**
- * Handle an incoming request.
- *
- * @param \Illuminate\Http\Request $request
- * @param \Closure $next
- * @param string $ability
- * @param array|null ...$models
- * @return mixed
- *
- * @throws \Illuminate\Auth\AuthenticationException
- * @throws \Illuminate\Auth\Access\AuthorizationException
- */
- public function handle($request, Closure $next, $ability, ...$models)
- {
- $this->gate->authorize($ability, $this->getGateArguments($request, $models));
-
- return $next($request);
- }
-
- /**
- * Get the arguments parameter for the gate.
- *
- * @param \Illuminate\Http\Request $request
- * @param array|null $models
- * @return array|string|\Illuminate\Database\Eloquent\Model
- */
- protected function getGateArguments($request, $models)
- {
- if (is_null($models)) {
- return [];
- }
-
- return collect($models)->map(function ($model) use ($request) {
- return $model instanceof Model ? $model : $this->getModel($request, $model);
- })->all();
- }
-
- /**
- * Get the model to authorize.
- *
- * @param \Illuminate\Http\Request $request
- * @param string $model
- * @return \Illuminate\Database\Eloquent\Model|string
- */
- protected function getModel($request, $model)
- {
- return $this->isClassName($model) ? trim($model) : $request->route($model, $model);
- }
-
- /**
- * Checks if the given string looks like a fully qualified class name.
- *
- * @param string $value
- * @return bool
- */
- protected function isClassName($value)
- {
- return strpos($value, '\\') !== false;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Middleware/EnsureEmailIsVerified.php b/vendor/laravel/framework/src/Illuminate/Auth/Middleware/EnsureEmailIsVerified.php
deleted file mode 100644
index f43855d..0000000
--- a/vendor/laravel/framework/src/Illuminate/Auth/Middleware/EnsureEmailIsVerified.php
+++ /dev/null
@@ -1,30 +0,0 @@
-user() ||
- ($request->user() instanceof MustVerifyEmail &&
- ! $request->user()->hasVerifiedEmail())) {
- return $request->expectsJson()
- ? abort(403, 'Your email address is not verified.')
- : Redirect::route('verification.notice');
- }
-
- return $next($request);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/MustVerifyEmail.php b/vendor/laravel/framework/src/Illuminate/Auth/MustVerifyEmail.php
deleted file mode 100644
index d7782cd..0000000
--- a/vendor/laravel/framework/src/Illuminate/Auth/MustVerifyEmail.php
+++ /dev/null
@@ -1,38 +0,0 @@
-email_verified_at);
- }
-
- /**
- * Mark the given user's email as verified.
- *
- * @return bool
- */
- public function markEmailAsVerified()
- {
- return $this->forceFill([
- 'email_verified_at' => $this->freshTimestamp(),
- ])->save();
- }
-
- /**
- * Send the email verification notification.
- *
- * @return void
- */
- public function sendEmailVerificationNotification()
- {
- $this->notify(new Notifications\VerifyEmail);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Notifications/ResetPassword.php b/vendor/laravel/framework/src/Illuminate/Auth/Notifications/ResetPassword.php
deleted file mode 100644
index c2978fe..0000000
--- a/vendor/laravel/framework/src/Illuminate/Auth/Notifications/ResetPassword.php
+++ /dev/null
@@ -1,76 +0,0 @@
-token = $token;
- }
-
- /**
- * Get the notification's channels.
- *
- * @param mixed $notifiable
- * @return array|string
- */
- public function via($notifiable)
- {
- return ['mail'];
- }
-
- /**
- * Build the mail representation of the notification.
- *
- * @param mixed $notifiable
- * @return \Illuminate\Notifications\Messages\MailMessage
- */
- public function toMail($notifiable)
- {
- if (static::$toMailCallback) {
- return call_user_func(static::$toMailCallback, $notifiable, $this->token);
- }
-
- return (new MailMessage)
- ->subject(Lang::getFromJson('Reset Password Notification'))
- ->line(Lang::getFromJson('You are receiving this email because we received a password reset request for your account.'))
- ->action(Lang::getFromJson('Reset Password'), url(config('app.url').route('password.reset', $this->token, false)))
- ->line(Lang::getFromJson('If you did not request a password reset, no further action is required.'));
- }
-
- /**
- * Set a callback that should be used when building the notification mail message.
- *
- * @param \Closure $callback
- * @return void
- */
- public static function toMailUsing($callback)
- {
- static::$toMailCallback = $callback;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Notifications/VerifyEmail.php b/vendor/laravel/framework/src/Illuminate/Auth/Notifications/VerifyEmail.php
deleted file mode 100644
index f8f3162..0000000
--- a/vendor/laravel/framework/src/Illuminate/Auth/Notifications/VerifyEmail.php
+++ /dev/null
@@ -1,76 +0,0 @@
-subject(Lang::getFromJson('Verify Email Address'))
- ->line(Lang::getFromJson('Please click the button below to verify your email address.'))
- ->action(
- Lang::getFromJson('Verify Email Address'),
- $this->verificationUrl($notifiable)
- )
- ->line(Lang::getFromJson('If you did not create an account, no further action is required.'));
- }
-
- /**
- * Get the verification URL for the given notifiable.
- *
- * @param mixed $notifiable
- * @return string
- */
- protected function verificationUrl($notifiable)
- {
- return URL::temporarySignedRoute(
- 'verification.verify', Carbon::now()->addMinutes(60), ['id' => $notifiable->getKey()]
- );
- }
-
- /**
- * Set a callback that should be used when building the notification mail message.
- *
- * @param \Closure $callback
- * @return void
- */
- public static function toMailUsing($callback)
- {
- static::$toMailCallback = $callback;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Passwords/CanResetPassword.php b/vendor/laravel/framework/src/Illuminate/Auth/Passwords/CanResetPassword.php
deleted file mode 100644
index 918a288..0000000
--- a/vendor/laravel/framework/src/Illuminate/Auth/Passwords/CanResetPassword.php
+++ /dev/null
@@ -1,29 +0,0 @@
-email;
- }
-
- /**
- * Send the password reset notification.
- *
- * @param string $token
- * @return void
- */
- public function sendPasswordResetNotification($token)
- {
- $this->notify(new ResetPasswordNotification($token));
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Passwords/DatabaseTokenRepository.php b/vendor/laravel/framework/src/Illuminate/Auth/Passwords/DatabaseTokenRepository.php
deleted file mode 100755
index c470175..0000000
--- a/vendor/laravel/framework/src/Illuminate/Auth/Passwords/DatabaseTokenRepository.php
+++ /dev/null
@@ -1,204 +0,0 @@
-table = $table;
- $this->hasher = $hasher;
- $this->hashKey = $hashKey;
- $this->expires = $expires * 60;
- $this->connection = $connection;
- }
-
- /**
- * Create a new token record.
- *
- * @param \Illuminate\Contracts\Auth\CanResetPassword $user
- * @return string
- */
- public function create(CanResetPasswordContract $user)
- {
- $email = $user->getEmailForPasswordReset();
-
- $this->deleteExisting($user);
-
- // We will create a new, random token for the user so that we can e-mail them
- // a safe link to the password reset form. Then we will insert a record in
- // the database so that we can verify the token within the actual reset.
- $token = $this->createNewToken();
-
- $this->getTable()->insert($this->getPayload($email, $token));
-
- return $token;
- }
-
- /**
- * Delete all existing reset tokens from the database.
- *
- * @param \Illuminate\Contracts\Auth\CanResetPassword $user
- * @return int
- */
- protected function deleteExisting(CanResetPasswordContract $user)
- {
- return $this->getTable()->where('email', $user->getEmailForPasswordReset())->delete();
- }
-
- /**
- * Build the record payload for the table.
- *
- * @param string $email
- * @param string $token
- * @return array
- */
- protected function getPayload($email, $token)
- {
- return ['email' => $email, 'token' => $this->hasher->make($token), 'created_at' => new Carbon];
- }
-
- /**
- * Determine if a token record exists and is valid.
- *
- * @param \Illuminate\Contracts\Auth\CanResetPassword $user
- * @param string $token
- * @return bool
- */
- public function exists(CanResetPasswordContract $user, $token)
- {
- $record = (array) $this->getTable()->where(
- 'email', $user->getEmailForPasswordReset()
- )->first();
-
- return $record &&
- ! $this->tokenExpired($record['created_at']) &&
- $this->hasher->check($token, $record['token']);
- }
-
- /**
- * Determine if the token has expired.
- *
- * @param string $createdAt
- * @return bool
- */
- protected function tokenExpired($createdAt)
- {
- return Carbon::parse($createdAt)->addSeconds($this->expires)->isPast();
- }
-
- /**
- * Delete a token record by user.
- *
- * @param \Illuminate\Contracts\Auth\CanResetPassword $user
- * @return void
- */
- public function delete(CanResetPasswordContract $user)
- {
- $this->deleteExisting($user);
- }
-
- /**
- * Delete expired tokens.
- *
- * @return void
- */
- public function deleteExpired()
- {
- $expiredAt = Carbon::now()->subSeconds($this->expires);
-
- $this->getTable()->where('created_at', '<', $expiredAt)->delete();
- }
-
- /**
- * Create a new token for the user.
- *
- * @return string
- */
- public function createNewToken()
- {
- return hash_hmac('sha256', Str::random(40), $this->hashKey);
- }
-
- /**
- * Get the database connection instance.
- *
- * @return \Illuminate\Database\ConnectionInterface
- */
- public function getConnection()
- {
- return $this->connection;
- }
-
- /**
- * Begin a new database query against the table.
- *
- * @return \Illuminate\Database\Query\Builder
- */
- protected function getTable()
- {
- return $this->connection->table($this->table);
- }
-
- /**
- * Get the hasher instance.
- *
- * @return \Illuminate\Contracts\Hashing\Hasher
- */
- public function getHasher()
- {
- return $this->hasher;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordBroker.php b/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordBroker.php
deleted file mode 100755
index 66918fc..0000000
--- a/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordBroker.php
+++ /dev/null
@@ -1,242 +0,0 @@
-users = $users;
- $this->tokens = $tokens;
- }
-
- /**
- * Send a password reset link to a user.
- *
- * @param array $credentials
- * @return string
- */
- public function sendResetLink(array $credentials)
- {
- // First we will check to see if we found a user at the given credentials and
- // if we did not we will redirect back to this current URI with a piece of
- // "flash" data in the session to indicate to the developers the errors.
- $user = $this->getUser($credentials);
-
- if (is_null($user)) {
- return static::INVALID_USER;
- }
-
- // Once we have the reset token, we are ready to send the message out to this
- // user with a link to reset their password. We will then redirect back to
- // the current URI having nothing set in the session to indicate errors.
- $user->sendPasswordResetNotification(
- $this->tokens->create($user)
- );
-
- return static::RESET_LINK_SENT;
- }
-
- /**
- * Reset the password for the given token.
- *
- * @param array $credentials
- * @param \Closure $callback
- * @return mixed
- */
- public function reset(array $credentials, Closure $callback)
- {
- // If the responses from the validate method is not a user instance, we will
- // assume that it is a redirect and simply return it from this method and
- // the user is properly redirected having an error message on the post.
- $user = $this->validateReset($credentials);
-
- if (! $user instanceof CanResetPasswordContract) {
- return $user;
- }
-
- $password = $credentials['password'];
-
- // Once the reset has been validated, we'll call the given callback with the
- // new password. This gives the user an opportunity to store the password
- // in their persistent storage. Then we'll delete the token and return.
- $callback($user, $password);
-
- $this->tokens->delete($user);
-
- return static::PASSWORD_RESET;
- }
-
- /**
- * Validate a password reset for the given credentials.
- *
- * @param array $credentials
- * @return \Illuminate\Contracts\Auth\CanResetPassword|string
- */
- protected function validateReset(array $credentials)
- {
- if (is_null($user = $this->getUser($credentials))) {
- return static::INVALID_USER;
- }
-
- if (! $this->validateNewPassword($credentials)) {
- return static::INVALID_PASSWORD;
- }
-
- if (! $this->tokens->exists($user, $credentials['token'])) {
- return static::INVALID_TOKEN;
- }
-
- return $user;
- }
-
- /**
- * Set a custom password validator.
- *
- * @param \Closure $callback
- * @return void
- */
- public function validator(Closure $callback)
- {
- $this->passwordValidator = $callback;
- }
-
- /**
- * Determine if the passwords match for the request.
- *
- * @param array $credentials
- * @return bool
- */
- public function validateNewPassword(array $credentials)
- {
- if (isset($this->passwordValidator)) {
- [$password, $confirm] = [
- $credentials['password'],
- $credentials['password_confirmation'],
- ];
-
- return call_user_func(
- $this->passwordValidator, $credentials
- ) && $password === $confirm;
- }
-
- return $this->validatePasswordWithDefaults($credentials);
- }
-
- /**
- * Determine if the passwords are valid for the request.
- *
- * @param array $credentials
- * @return bool
- */
- protected function validatePasswordWithDefaults(array $credentials)
- {
- [$password, $confirm] = [
- $credentials['password'],
- $credentials['password_confirmation'],
- ];
-
- return $password === $confirm && mb_strlen($password) >= 6;
- }
-
- /**
- * Get the user for the given credentials.
- *
- * @param array $credentials
- * @return \Illuminate\Contracts\Auth\CanResetPassword|null
- *
- * @throws \UnexpectedValueException
- */
- public function getUser(array $credentials)
- {
- $credentials = Arr::except($credentials, ['token']);
-
- $user = $this->users->retrieveByCredentials($credentials);
-
- if ($user && ! $user instanceof CanResetPasswordContract) {
- throw new UnexpectedValueException('User must implement CanResetPassword interface.');
- }
-
- return $user;
- }
-
- /**
- * Create a new password reset token for the given user.
- *
- * @param \Illuminate\Contracts\Auth\CanResetPassword $user
- * @return string
- */
- public function createToken(CanResetPasswordContract $user)
- {
- return $this->tokens->create($user);
- }
-
- /**
- * Delete password reset tokens of the given user.
- *
- * @param \Illuminate\Contracts\Auth\CanResetPassword $user
- * @return void
- */
- public function deleteToken(CanResetPasswordContract $user)
- {
- $this->tokens->delete($user);
- }
-
- /**
- * Validate the given password reset token.
- *
- * @param \Illuminate\Contracts\Auth\CanResetPassword $user
- * @param string $token
- * @return bool
- */
- public function tokenExists(CanResetPasswordContract $user, $token)
- {
- return $this->tokens->exists($user, $token);
- }
-
- /**
- * Get the password reset token repository implementation.
- *
- * @return \Illuminate\Auth\Passwords\TokenRepositoryInterface
- */
- public function getRepository()
- {
- return $this->tokens;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordBrokerManager.php b/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordBrokerManager.php
deleted file mode 100644
index 1d943bd..0000000
--- a/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordBrokerManager.php
+++ /dev/null
@@ -1,147 +0,0 @@
-app = $app;
- }
-
- /**
- * Attempt to get the broker from the local cache.
- *
- * @param string|null $name
- * @return \Illuminate\Contracts\Auth\PasswordBroker
- */
- public function broker($name = null)
- {
- $name = $name ?: $this->getDefaultDriver();
-
- return isset($this->brokers[$name])
- ? $this->brokers[$name]
- : $this->brokers[$name] = $this->resolve($name);
- }
-
- /**
- * Resolve the given broker.
- *
- * @param string $name
- * @return \Illuminate\Contracts\Auth\PasswordBroker
- *
- * @throws \InvalidArgumentException
- */
- protected function resolve($name)
- {
- $config = $this->getConfig($name);
-
- if (is_null($config)) {
- throw new InvalidArgumentException("Password resetter [{$name}] is not defined.");
- }
-
- // The password broker uses a token repository to validate tokens and send user
- // password e-mails, as well as validating that password reset process as an
- // aggregate service of sorts providing a convenient interface for resets.
- return new PasswordBroker(
- $this->createTokenRepository($config),
- $this->app['auth']->createUserProvider($config['provider'] ?? null)
- );
- }
-
- /**
- * Create a token repository instance based on the given configuration.
- *
- * @param array $config
- * @return \Illuminate\Auth\Passwords\TokenRepositoryInterface
- */
- protected function createTokenRepository(array $config)
- {
- $key = $this->app['config']['app.key'];
-
- if (Str::startsWith($key, 'base64:')) {
- $key = base64_decode(substr($key, 7));
- }
-
- $connection = $config['connection'] ?? null;
-
- return new DatabaseTokenRepository(
- $this->app['db']->connection($connection),
- $this->app['hash'],
- $config['table'],
- $key,
- $config['expire']
- );
- }
-
- /**
- * Get the password broker configuration.
- *
- * @param string $name
- * @return array
- */
- protected function getConfig($name)
- {
- return $this->app['config']["auth.passwords.{$name}"];
- }
-
- /**
- * Get the default password broker name.
- *
- * @return string
- */
- public function getDefaultDriver()
- {
- return $this->app['config']['auth.defaults.passwords'];
- }
-
- /**
- * Set the default password broker name.
- *
- * @param string $name
- * @return void
- */
- public function setDefaultDriver($name)
- {
- $this->app['config']['auth.defaults.passwords'] = $name;
- }
-
- /**
- * Dynamically call the default driver instance.
- *
- * @param string $method
- * @param array $parameters
- * @return mixed
- */
- public function __call($method, $parameters)
- {
- return $this->broker()->{$method}(...$parameters);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordResetServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordResetServiceProvider.php
deleted file mode 100755
index 165ecaf..0000000
--- a/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordResetServiceProvider.php
+++ /dev/null
@@ -1,51 +0,0 @@
-registerPasswordBroker();
- }
-
- /**
- * Register the password broker instance.
- *
- * @return void
- */
- protected function registerPasswordBroker()
- {
- $this->app->singleton('auth.password', function ($app) {
- return new PasswordBrokerManager($app);
- });
-
- $this->app->bind('auth.password.broker', function ($app) {
- return $app->make('auth.password')->broker();
- });
- }
-
- /**
- * Get the services provided by the provider.
- *
- * @return array
- */
- public function provides()
- {
- return ['auth.password', 'auth.password.broker'];
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Passwords/TokenRepositoryInterface.php b/vendor/laravel/framework/src/Illuminate/Auth/Passwords/TokenRepositoryInterface.php
deleted file mode 100755
index dcd06e8..0000000
--- a/vendor/laravel/framework/src/Illuminate/Auth/Passwords/TokenRepositoryInterface.php
+++ /dev/null
@@ -1,40 +0,0 @@
-recaller = @unserialize($recaller, ['allowed_classes' => false]) ?: $recaller;
- }
-
- /**
- * Get the user ID from the recaller.
- *
- * @return string
- */
- public function id()
- {
- return explode('|', $this->recaller, 3)[0];
- }
-
- /**
- * Get the "remember token" token from the recaller.
- *
- * @return string
- */
- public function token()
- {
- return explode('|', $this->recaller, 3)[1];
- }
-
- /**
- * Get the password from the recaller.
- *
- * @return string
- */
- public function hash()
- {
- return explode('|', $this->recaller, 3)[2];
- }
-
- /**
- * Determine if the recaller is valid.
- *
- * @return bool
- */
- public function valid()
- {
- return $this->properString() && $this->hasAllSegments();
- }
-
- /**
- * Determine if the recaller is an invalid string.
- *
- * @return bool
- */
- protected function properString()
- {
- return is_string($this->recaller) && Str::contains($this->recaller, '|');
- }
-
- /**
- * Determine if the recaller has all segments.
- *
- * @return bool
- */
- protected function hasAllSegments()
- {
- $segments = explode('|', $this->recaller);
-
- return count($segments) === 3 && trim($segments[0]) !== '' && trim($segments[1]) !== '';
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/RequestGuard.php b/vendor/laravel/framework/src/Illuminate/Auth/RequestGuard.php
deleted file mode 100644
index 2adc2cc..0000000
--- a/vendor/laravel/framework/src/Illuminate/Auth/RequestGuard.php
+++ /dev/null
@@ -1,87 +0,0 @@
-request = $request;
- $this->callback = $callback;
- $this->provider = $provider;
- }
-
- /**
- * Get the currently authenticated user.
- *
- * @return \Illuminate\Contracts\Auth\Authenticatable|null
- */
- public function user()
- {
- // If we've already retrieved the user for the current request we can just
- // return it back immediately. We do not want to fetch the user data on
- // every call to this method because that would be tremendously slow.
- if (! is_null($this->user)) {
- return $this->user;
- }
-
- return $this->user = call_user_func(
- $this->callback, $this->request, $this->getProvider()
- );
- }
-
- /**
- * Validate a user's credentials.
- *
- * @param array $credentials
- * @return bool
- */
- public function validate(array $credentials = [])
- {
- return ! is_null((new static(
- $this->callback, $credentials['request'], $this->getProvider()
- ))->user());
- }
-
- /**
- * Set the current request instance.
- *
- * @param \Illuminate\Http\Request $request
- * @return $this
- */
- public function setRequest(Request $request)
- {
- $this->request = $request;
-
- return $this;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/SessionGuard.php b/vendor/laravel/framework/src/Illuminate/Auth/SessionGuard.php
deleted file mode 100644
index 80b690c..0000000
--- a/vendor/laravel/framework/src/Illuminate/Auth/SessionGuard.php
+++ /dev/null
@@ -1,781 +0,0 @@
-name = $name;
- $this->session = $session;
- $this->request = $request;
- $this->provider = $provider;
- }
-
- /**
- * Get the currently authenticated user.
- *
- * @return \Illuminate\Contracts\Auth\Authenticatable|null
- */
- public function user()
- {
- if ($this->loggedOut) {
- return;
- }
-
- // If we've already retrieved the user for the current request we can just
- // return it back immediately. We do not want to fetch the user data on
- // every call to this method because that would be tremendously slow.
- if (! is_null($this->user)) {
- return $this->user;
- }
-
- $id = $this->session->get($this->getName());
-
- // First we will try to load the user using the identifier in the session if
- // one exists. Otherwise we will check for a "remember me" cookie in this
- // request, and if one exists, attempt to retrieve the user using that.
- if (! is_null($id) && $this->user = $this->provider->retrieveById($id)) {
- $this->fireAuthenticatedEvent($this->user);
- }
-
- // If the user is null, but we decrypt a "recaller" cookie we can attempt to
- // pull the user data on that cookie which serves as a remember cookie on
- // the application. Once we have a user we can return it to the caller.
- if (is_null($this->user) && ! is_null($recaller = $this->recaller())) {
- $this->user = $this->userFromRecaller($recaller);
-
- if ($this->user) {
- $this->updateSession($this->user->getAuthIdentifier());
-
- $this->fireLoginEvent($this->user, true);
- }
- }
-
- return $this->user;
- }
-
- /**
- * Pull a user from the repository by its "remember me" cookie token.
- *
- * @param \Illuminate\Auth\Recaller $recaller
- * @return mixed
- */
- protected function userFromRecaller($recaller)
- {
- if (! $recaller->valid() || $this->recallAttempted) {
- return;
- }
-
- // If the user is null, but we decrypt a "recaller" cookie we can attempt to
- // pull the user data on that cookie which serves as a remember cookie on
- // the application. Once we have a user we can return it to the caller.
- $this->recallAttempted = true;
-
- $this->viaRemember = ! is_null($user = $this->provider->retrieveByToken(
- $recaller->id(), $recaller->token()
- ));
-
- return $user;
- }
-
- /**
- * Get the decrypted recaller cookie for the request.
- *
- * @return \Illuminate\Auth\Recaller|null
- */
- protected function recaller()
- {
- if (is_null($this->request)) {
- return;
- }
-
- if ($recaller = $this->request->cookies->get($this->getRecallerName())) {
- return new Recaller($recaller);
- }
- }
-
- /**
- * Get the ID for the currently authenticated user.
- *
- * @return int|null
- */
- public function id()
- {
- if ($this->loggedOut) {
- return;
- }
-
- return $this->user()
- ? $this->user()->getAuthIdentifier()
- : $this->session->get($this->getName());
- }
-
- /**
- * Log a user into the application without sessions or cookies.
- *
- * @param array $credentials
- * @return bool
- */
- public function once(array $credentials = [])
- {
- $this->fireAttemptEvent($credentials);
-
- if ($this->validate($credentials)) {
- $this->setUser($this->lastAttempted);
-
- return true;
- }
-
- return false;
- }
-
- /**
- * Log the given user ID into the application without sessions or cookies.
- *
- * @param mixed $id
- * @return \Illuminate\Contracts\Auth\Authenticatable|false
- */
- public function onceUsingId($id)
- {
- if (! is_null($user = $this->provider->retrieveById($id))) {
- $this->setUser($user);
-
- return $user;
- }
-
- return false;
- }
-
- /**
- * Validate a user's credentials.
- *
- * @param array $credentials
- * @return bool
- */
- public function validate(array $credentials = [])
- {
- $this->lastAttempted = $user = $this->provider->retrieveByCredentials($credentials);
-
- return $this->hasValidCredentials($user, $credentials);
- }
-
- /**
- * Attempt to authenticate using HTTP Basic Auth.
- *
- * @param string $field
- * @param array $extraConditions
- * @return \Symfony\Component\HttpFoundation\Response|null
- */
- public function basic($field = 'email', $extraConditions = [])
- {
- if ($this->check()) {
- return;
- }
-
- // If a username is set on the HTTP basic request, we will return out without
- // interrupting the request lifecycle. Otherwise, we'll need to generate a
- // request indicating that the given credentials were invalid for login.
- if ($this->attemptBasic($this->getRequest(), $field, $extraConditions)) {
- return;
- }
-
- return $this->failedBasicResponse();
- }
-
- /**
- * Perform a stateless HTTP Basic login attempt.
- *
- * @param string $field
- * @param array $extraConditions
- * @return \Symfony\Component\HttpFoundation\Response|null
- */
- public function onceBasic($field = 'email', $extraConditions = [])
- {
- $credentials = $this->basicCredentials($this->getRequest(), $field);
-
- if (! $this->once(array_merge($credentials, $extraConditions))) {
- return $this->failedBasicResponse();
- }
- }
-
- /**
- * Attempt to authenticate using basic authentication.
- *
- * @param \Symfony\Component\HttpFoundation\Request $request
- * @param string $field
- * @param array $extraConditions
- * @return bool
- */
- protected function attemptBasic(Request $request, $field, $extraConditions = [])
- {
- if (! $request->getUser()) {
- return false;
- }
-
- return $this->attempt(array_merge(
- $this->basicCredentials($request, $field), $extraConditions
- ));
- }
-
- /**
- * Get the credential array for a HTTP Basic request.
- *
- * @param \Symfony\Component\HttpFoundation\Request $request
- * @param string $field
- * @return array
- */
- protected function basicCredentials(Request $request, $field)
- {
- return [$field => $request->getUser(), 'password' => $request->getPassword()];
- }
-
- /**
- * Get the response for basic authentication.
- *
- * @return void
- *
- * @throws \Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException
- */
- protected function failedBasicResponse()
- {
- throw new UnauthorizedHttpException('Basic', 'Invalid credentials.');
- }
-
- /**
- * Attempt to authenticate a user using the given credentials.
- *
- * @param array $credentials
- * @param bool $remember
- * @return bool
- */
- public function attempt(array $credentials = [], $remember = false)
- {
- $this->fireAttemptEvent($credentials, $remember);
-
- $this->lastAttempted = $user = $this->provider->retrieveByCredentials($credentials);
-
- // If an implementation of UserInterface was returned, we'll ask the provider
- // to validate the user against the given credentials, and if they are in
- // fact valid we'll log the users into the application and return true.
- if ($this->hasValidCredentials($user, $credentials)) {
- $this->login($user, $remember);
-
- return true;
- }
-
- // If the authentication attempt fails we will fire an event so that the user
- // may be notified of any suspicious attempts to access their account from
- // an unrecognized user. A developer may listen to this event as needed.
- $this->fireFailedEvent($user, $credentials);
-
- return false;
- }
-
- /**
- * Determine if the user matches the credentials.
- *
- * @param mixed $user
- * @param array $credentials
- * @return bool
- */
- protected function hasValidCredentials($user, $credentials)
- {
- return ! is_null($user) && $this->provider->validateCredentials($user, $credentials);
- }
-
- /**
- * Log the given user ID into the application.
- *
- * @param mixed $id
- * @param bool $remember
- * @return \Illuminate\Contracts\Auth\Authenticatable|false
- */
- public function loginUsingId($id, $remember = false)
- {
- if (! is_null($user = $this->provider->retrieveById($id))) {
- $this->login($user, $remember);
-
- return $user;
- }
-
- return false;
- }
-
- /**
- * Log a user into the application.
- *
- * @param \Illuminate\Contracts\Auth\Authenticatable $user
- * @param bool $remember
- * @return void
- */
- public function login(AuthenticatableContract $user, $remember = false)
- {
- $this->updateSession($user->getAuthIdentifier());
-
- // If the user should be permanently "remembered" by the application we will
- // queue a permanent cookie that contains the encrypted copy of the user
- // identifier. We will then decrypt this later to retrieve the users.
- if ($remember) {
- $this->ensureRememberTokenIsSet($user);
-
- $this->queueRecallerCookie($user);
- }
-
- // If we have an event dispatcher instance set we will fire an event so that
- // any listeners will hook into the authentication events and run actions
- // based on the login and logout events fired from the guard instances.
- $this->fireLoginEvent($user, $remember);
-
- $this->setUser($user);
- }
-
- /**
- * Update the session with the given ID.
- *
- * @param string $id
- * @return void
- */
- protected function updateSession($id)
- {
- $this->session->put($this->getName(), $id);
-
- $this->session->migrate(true);
- }
-
- /**
- * Create a new "remember me" token for the user if one doesn't already exist.
- *
- * @param \Illuminate\Contracts\Auth\Authenticatable $user
- * @return void
- */
- protected function ensureRememberTokenIsSet(AuthenticatableContract $user)
- {
- if (empty($user->getRememberToken())) {
- $this->cycleRememberToken($user);
- }
- }
-
- /**
- * Queue the recaller cookie into the cookie jar.
- *
- * @param \Illuminate\Contracts\Auth\Authenticatable $user
- * @return void
- */
- protected function queueRecallerCookie(AuthenticatableContract $user)
- {
- $this->getCookieJar()->queue($this->createRecaller(
- $user->getAuthIdentifier().'|'.$user->getRememberToken().'|'.$user->getAuthPassword()
- ));
- }
-
- /**
- * Create a "remember me" cookie for a given ID.
- *
- * @param string $value
- * @return \Symfony\Component\HttpFoundation\Cookie
- */
- protected function createRecaller($value)
- {
- return $this->getCookieJar()->forever($this->getRecallerName(), $value);
- }
-
- /**
- * Log the user out of the application.
- *
- * @return void
- */
- public function logout()
- {
- $user = $this->user();
-
- // If we have an event dispatcher instance, we can fire off the logout event
- // so any further processing can be done. This allows the developer to be
- // listening for anytime a user signs out of this application manually.
- $this->clearUserDataFromStorage();
-
- if (! is_null($this->user)) {
- $this->cycleRememberToken($user);
- }
-
- if (isset($this->events)) {
- $this->events->dispatch(new Events\Logout($this->name, $user));
- }
-
- // Once we have fired the logout event we will clear the users out of memory
- // so they are no longer available as the user is no longer considered as
- // being signed into this application and should not be available here.
- $this->user = null;
-
- $this->loggedOut = true;
- }
-
- /**
- * Remove the user data from the session and cookies.
- *
- * @return void
- */
- protected function clearUserDataFromStorage()
- {
- $this->session->remove($this->getName());
-
- if (! is_null($this->recaller())) {
- $this->getCookieJar()->queue($this->getCookieJar()
- ->forget($this->getRecallerName()));
- }
- }
-
- /**
- * Refresh the "remember me" token for the user.
- *
- * @param \Illuminate\Contracts\Auth\Authenticatable $user
- * @return void
- */
- protected function cycleRememberToken(AuthenticatableContract $user)
- {
- $user->setRememberToken($token = Str::random(60));
-
- $this->provider->updateRememberToken($user, $token);
- }
-
- /**
- * Invalidate other sessions for the current user.
- *
- * The application must be using the AuthenticateSession middleware.
- *
- * @param string $password
- * @param string $attribute
- * @return bool|null
- */
- public function logoutOtherDevices($password, $attribute = 'password')
- {
- if (! $this->user()) {
- return;
- }
-
- $result = tap($this->user()->forceFill([
- $attribute => Hash::make($password),
- ]))->save();
-
- $this->queueRecallerCookie($this->user());
-
- return $result;
- }
-
- /**
- * Register an authentication attempt event listener.
- *
- * @param mixed $callback
- * @return void
- */
- public function attempting($callback)
- {
- if (isset($this->events)) {
- $this->events->listen(Events\Attempting::class, $callback);
- }
- }
-
- /**
- * Fire the attempt event with the arguments.
- *
- * @param array $credentials
- * @param bool $remember
- * @return void
- */
- protected function fireAttemptEvent(array $credentials, $remember = false)
- {
- if (isset($this->events)) {
- $this->events->dispatch(new Events\Attempting(
- $this->name, $credentials, $remember
- ));
- }
- }
-
- /**
- * Fire the login event if the dispatcher is set.
- *
- * @param \Illuminate\Contracts\Auth\Authenticatable $user
- * @param bool $remember
- * @return void
- */
- protected function fireLoginEvent($user, $remember = false)
- {
- if (isset($this->events)) {
- $this->events->dispatch(new Events\Login(
- $this->name, $user, $remember
- ));
- }
- }
-
- /**
- * Fire the authenticated event if the dispatcher is set.
- *
- * @param \Illuminate\Contracts\Auth\Authenticatable $user
- * @return void
- */
- protected function fireAuthenticatedEvent($user)
- {
- if (isset($this->events)) {
- $this->events->dispatch(new Events\Authenticated(
- $this->name, $user
- ));
- }
- }
-
- /**
- * Fire the failed authentication attempt event with the given arguments.
- *
- * @param \Illuminate\Contracts\Auth\Authenticatable|null $user
- * @param array $credentials
- * @return void
- */
- protected function fireFailedEvent($user, array $credentials)
- {
- if (isset($this->events)) {
- $this->events->dispatch(new Events\Failed(
- $this->name, $user, $credentials
- ));
- }
- }
-
- /**
- * Get the last user we attempted to authenticate.
- *
- * @return \Illuminate\Contracts\Auth\Authenticatable
- */
- public function getLastAttempted()
- {
- return $this->lastAttempted;
- }
-
- /**
- * Get a unique identifier for the auth session value.
- *
- * @return string
- */
- public function getName()
- {
- return 'login_'.$this->name.'_'.sha1(static::class);
- }
-
- /**
- * Get the name of the cookie used to store the "recaller".
- *
- * @return string
- */
- public function getRecallerName()
- {
- return 'remember_'.$this->name.'_'.sha1(static::class);
- }
-
- /**
- * Determine if the user was authenticated via "remember me" cookie.
- *
- * @return bool
- */
- public function viaRemember()
- {
- return $this->viaRemember;
- }
-
- /**
- * Get the cookie creator instance used by the guard.
- *
- * @return \Illuminate\Contracts\Cookie\QueueingFactory
- *
- * @throws \RuntimeException
- */
- public function getCookieJar()
- {
- if (! isset($this->cookie)) {
- throw new RuntimeException('Cookie jar has not been set.');
- }
-
- return $this->cookie;
- }
-
- /**
- * Set the cookie creator instance used by the guard.
- *
- * @param \Illuminate\Contracts\Cookie\QueueingFactory $cookie
- * @return void
- */
- public function setCookieJar(CookieJar $cookie)
- {
- $this->cookie = $cookie;
- }
-
- /**
- * Get the event dispatcher instance.
- *
- * @return \Illuminate\Contracts\Events\Dispatcher
- */
- public function getDispatcher()
- {
- return $this->events;
- }
-
- /**
- * Set the event dispatcher instance.
- *
- * @param \Illuminate\Contracts\Events\Dispatcher $events
- * @return void
- */
- public function setDispatcher(Dispatcher $events)
- {
- $this->events = $events;
- }
-
- /**
- * Get the session store used by the guard.
- *
- * @return \Illuminate\Contracts\Session\Session
- */
- public function getSession()
- {
- return $this->session;
- }
-
- /**
- * Return the currently cached user.
- *
- * @return \Illuminate\Contracts\Auth\Authenticatable|null
- */
- public function getUser()
- {
- return $this->user;
- }
-
- /**
- * Set the current user.
- *
- * @param \Illuminate\Contracts\Auth\Authenticatable $user
- * @return $this
- */
- public function setUser(AuthenticatableContract $user)
- {
- $this->user = $user;
-
- $this->loggedOut = false;
-
- $this->fireAuthenticatedEvent($user);
-
- return $this;
- }
-
- /**
- * Get the current request instance.
- *
- * @return \Symfony\Component\HttpFoundation\Request
- */
- public function getRequest()
- {
- return $this->request ?: Request::createFromGlobals();
- }
-
- /**
- * Set the current request instance.
- *
- * @param \Symfony\Component\HttpFoundation\Request $request
- * @return $this
- */
- public function setRequest(Request $request)
- {
- $this->request = $request;
-
- return $this;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/TokenGuard.php b/vendor/laravel/framework/src/Illuminate/Auth/TokenGuard.php
deleted file mode 100644
index 56ac19b..0000000
--- a/vendor/laravel/framework/src/Illuminate/Auth/TokenGuard.php
+++ /dev/null
@@ -1,135 +0,0 @@
-request = $request;
- $this->provider = $provider;
- $this->inputKey = $inputKey;
- $this->storageKey = $storageKey;
- }
-
- /**
- * Get the currently authenticated user.
- *
- * @return \Illuminate\Contracts\Auth\Authenticatable|null
- */
- public function user()
- {
- // If we've already retrieved the user for the current request we can just
- // return it back immediately. We do not want to fetch the user data on
- // every call to this method because that would be tremendously slow.
- if (! is_null($this->user)) {
- return $this->user;
- }
-
- $user = null;
-
- $token = $this->getTokenForRequest();
-
- if (! empty($token)) {
- $user = $this->provider->retrieveByCredentials(
- [$this->storageKey => $token]
- );
- }
-
- return $this->user = $user;
- }
-
- /**
- * Get the token for the current request.
- *
- * @return string
- */
- public function getTokenForRequest()
- {
- $token = $this->request->query($this->inputKey);
-
- if (empty($token)) {
- $token = $this->request->input($this->inputKey);
- }
-
- if (empty($token)) {
- $token = $this->request->bearerToken();
- }
-
- if (empty($token)) {
- $token = $this->request->getPassword();
- }
-
- return $token;
- }
-
- /**
- * Validate a user's credentials.
- *
- * @param array $credentials
- * @return bool
- */
- public function validate(array $credentials = [])
- {
- if (empty($credentials[$this->inputKey])) {
- return false;
- }
-
- $credentials = [$this->storageKey => $credentials[$this->inputKey]];
-
- if ($this->provider->retrieveByCredentials($credentials)) {
- return true;
- }
-
- return false;
- }
-
- /**
- * Set the current request instance.
- *
- * @param \Illuminate\Http\Request $request
- * @return $this
- */
- public function setRequest(Request $request)
- {
- $this->request = $request;
-
- return $this;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/composer.json b/vendor/laravel/framework/src/Illuminate/Auth/composer.json
deleted file mode 100644
index ae98c7d..0000000
--- a/vendor/laravel/framework/src/Illuminate/Auth/composer.json
+++ /dev/null
@@ -1,42 +0,0 @@
-{
- "name": "illuminate/auth",
- "description": "The Illuminate Auth package.",
- "license": "MIT",
- "homepage": "https://laravel.com",
- "support": {
- "issues": "https://github.com/laravel/framework/issues",
- "source": "https://github.com/laravel/framework"
- },
- "authors": [
- {
- "name": "Taylor Otwell",
- "email": "taylor@laravel.com"
- }
- ],
- "require": {
- "php": "^7.1.3",
- "illuminate/contracts": "5.7.*",
- "illuminate/http": "5.7.*",
- "illuminate/queue": "5.7.*",
- "illuminate/support": "5.7.*"
- },
- "autoload": {
- "psr-4": {
- "Illuminate\\Auth\\": ""
- }
- },
- "extra": {
- "branch-alias": {
- "dev-master": "5.7-dev"
- }
- },
- "suggest": {
- "illuminate/console": "Required to use the auth:clear-resets command (5.7.*).",
- "illuminate/queue": "Required to fire login / logout events (5.7.*).",
- "illuminate/session": "Required to use the session based guard (5.7.*)."
- },
- "config": {
- "sort-packages": true
- },
- "minimum-stability": "dev"
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastController.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastController.php
deleted file mode 100644
index f71c923..0000000
--- a/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastController.php
+++ /dev/null
@@ -1,21 +0,0 @@
-event = $event;
- }
-
- /**
- * Handle the queued job.
- *
- * @param \Illuminate\Contracts\Broadcasting\Broadcaster $broadcaster
- * @return void
- */
- public function handle(Broadcaster $broadcaster)
- {
- $name = method_exists($this->event, 'broadcastAs')
- ? $this->event->broadcastAs() : get_class($this->event);
-
- $broadcaster->broadcast(
- Arr::wrap($this->event->broadcastOn()), $name,
- $this->getPayloadFromEvent($this->event)
- );
- }
-
- /**
- * Get the payload for the given event.
- *
- * @param mixed $event
- * @return array
- */
- protected function getPayloadFromEvent($event)
- {
- if (method_exists($event, 'broadcastWith')) {
- return array_merge(
- $event->broadcastWith(), ['socket' => data_get($event, 'socket')]
- );
- }
-
- $payload = [];
-
- foreach ((new ReflectionClass($event))->getProperties(ReflectionProperty::IS_PUBLIC) as $property) {
- $payload[$property->getName()] = $this->formatProperty($property->getValue($event));
- }
-
- unset($payload['broadcastQueue']);
-
- return $payload;
- }
-
- /**
- * Format the given value for a property.
- *
- * @param mixed $value
- * @return mixed
- */
- protected function formatProperty($value)
- {
- if ($value instanceof Arrayable) {
- return $value->toArray();
- }
-
- return $value;
- }
-
- /**
- * Get the display name for the queued job.
- *
- * @return string
- */
- public function displayName()
- {
- return get_class($this->event);
- }
-
- /**
- * Prepare the instance for cloning.
- *
- * @return void
- */
- public function __clone()
- {
- $this->event = clone $this->event;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastException.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastException.php
deleted file mode 100644
index 8fd55f7..0000000
--- a/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastException.php
+++ /dev/null
@@ -1,10 +0,0 @@
-app = $app;
- }
-
- /**
- * Register the routes for handling broadcast authentication and sockets.
- *
- * @param array|null $attributes
- * @return void
- */
- public function routes(array $attributes = null)
- {
- if ($this->app->routesAreCached()) {
- return;
- }
-
- $attributes = $attributes ?: ['middleware' => ['web']];
-
- $this->app['router']->group($attributes, function ($router) {
- $router->match(
- ['get', 'post'], '/broadcasting/auth',
- '\\'.BroadcastController::class.'@authenticate'
- );
- });
- }
-
- /**
- * Get the socket ID for the given request.
- *
- * @param \Illuminate\Http\Request|null $request
- * @return string|null
- */
- public function socket($request = null)
- {
- if (! $request && ! $this->app->bound('request')) {
- return;
- }
-
- $request = $request ?: $this->app['request'];
-
- return $request->header('X-Socket-ID');
- }
-
- /**
- * Begin broadcasting an event.
- *
- * @param mixed|null $event
- * @return \Illuminate\Broadcasting\PendingBroadcast|void
- */
- public function event($event = null)
- {
- return new PendingBroadcast($this->app->make('events'), $event);
- }
-
- /**
- * Queue the given event for broadcast.
- *
- * @param mixed $event
- * @return void
- */
- public function queue($event)
- {
- $connection = $event instanceof ShouldBroadcastNow ? 'sync' : null;
-
- if (is_null($connection) && isset($event->connection)) {
- $connection = $event->connection;
- }
-
- $queue = null;
-
- if (method_exists($event, 'broadcastQueue')) {
- $queue = $event->broadcastQueue();
- } elseif (isset($event->broadcastQueue)) {
- $queue = $event->broadcastQueue;
- } elseif (isset($event->queue)) {
- $queue = $event->queue;
- }
-
- $this->app->make('queue')->connection($connection)->pushOn(
- $queue, new BroadcastEvent(clone $event)
- );
- }
-
- /**
- * Get a driver instance.
- *
- * @param string $driver
- * @return mixed
- */
- public function connection($driver = null)
- {
- return $this->driver($driver);
- }
-
- /**
- * Get a driver instance.
- *
- * @param string|null $name
- * @return mixed
- */
- public function driver($name = null)
- {
- $name = $name ?: $this->getDefaultDriver();
-
- return $this->drivers[$name] = $this->get($name);
- }
-
- /**
- * Attempt to get the connection from the local cache.
- *
- * @param string $name
- * @return \Illuminate\Contracts\Broadcasting\Broadcaster
- */
- protected function get($name)
- {
- return $this->drivers[$name] ?? $this->resolve($name);
- }
-
- /**
- * Resolve the given store.
- *
- * @param string $name
- * @return \Illuminate\Contracts\Broadcasting\Broadcaster
- *
- * @throws \InvalidArgumentException
- */
- protected function resolve($name)
- {
- $config = $this->getConfig($name);
-
- if (isset($this->customCreators[$config['driver']])) {
- return $this->callCustomCreator($config);
- }
-
- $driverMethod = 'create'.ucfirst($config['driver']).'Driver';
-
- if (! method_exists($this, $driverMethod)) {
- throw new InvalidArgumentException("Driver [{$config['driver']}] is not supported.");
- }
-
- return $this->{$driverMethod}($config);
- }
-
- /**
- * Call a custom driver creator.
- *
- * @param array $config
- * @return mixed
- */
- protected function callCustomCreator(array $config)
- {
- return $this->customCreators[$config['driver']]($this->app, $config);
- }
-
- /**
- * Create an instance of the driver.
- *
- * @param array $config
- * @return \Illuminate\Contracts\Broadcasting\Broadcaster
- */
- protected function createPusherDriver(array $config)
- {
- $pusher = new Pusher(
- $config['key'], $config['secret'],
- $config['app_id'], $config['options'] ?? []
- );
-
- if ($config['log'] ?? false) {
- $pusher->setLogger($this->app->make(LoggerInterface::class));
- }
-
- return new PusherBroadcaster($pusher);
- }
-
- /**
- * Create an instance of the driver.
- *
- * @param array $config
- * @return \Illuminate\Contracts\Broadcasting\Broadcaster
- */
- protected function createRedisDriver(array $config)
- {
- return new RedisBroadcaster(
- $this->app->make('redis'), $config['connection'] ?? null
- );
- }
-
- /**
- * Create an instance of the driver.
- *
- * @param array $config
- * @return \Illuminate\Contracts\Broadcasting\Broadcaster
- */
- protected function createLogDriver(array $config)
- {
- return new LogBroadcaster(
- $this->app->make(LoggerInterface::class)
- );
- }
-
- /**
- * Create an instance of the driver.
- *
- * @param array $config
- * @return \Illuminate\Contracts\Broadcasting\Broadcaster
- */
- protected function createNullDriver(array $config)
- {
- return new NullBroadcaster;
- }
-
- /**
- * Get the connection configuration.
- *
- * @param string $name
- * @return array
- */
- protected function getConfig($name)
- {
- if (! is_null($name) && $name !== 'null') {
- return $this->app['config']["broadcasting.connections.{$name}"];
- }
-
- return ['driver' => 'null'];
- }
-
- /**
- * Get the default driver name.
- *
- * @return string
- */
- public function getDefaultDriver()
- {
- return $this->app['config']['broadcasting.default'];
- }
-
- /**
- * Set the default driver name.
- *
- * @param string $name
- * @return void
- */
- public function setDefaultDriver($name)
- {
- $this->app['config']['broadcasting.default'] = $name;
- }
-
- /**
- * Register a custom driver creator Closure.
- *
- * @param string $driver
- * @param \Closure $callback
- * @return $this
- */
- public function extend($driver, Closure $callback)
- {
- $this->customCreators[$driver] = $callback;
-
- return $this;
- }
-
- /**
- * Dynamically call the default driver instance.
- *
- * @param string $method
- * @param array $parameters
- * @return mixed
- */
- public function __call($method, $parameters)
- {
- return $this->driver()->$method(...$parameters);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastServiceProvider.php
deleted file mode 100644
index adf88a6..0000000
--- a/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastServiceProvider.php
+++ /dev/null
@@ -1,51 +0,0 @@
-app->singleton(BroadcastManager::class, function ($app) {
- return new BroadcastManager($app);
- });
-
- $this->app->singleton(BroadcasterContract::class, function ($app) {
- return $app->make(BroadcastManager::class)->connection();
- });
-
- $this->app->alias(
- BroadcastManager::class, BroadcastingFactory::class
- );
- }
-
- /**
- * Get the services provided by the provider.
- *
- * @return array
- */
- public function provides()
- {
- return [
- BroadcastManager::class,
- BroadcastingFactory::class,
- BroadcasterContract::class,
- ];
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php
deleted file mode 100644
index 9a458ea..0000000
--- a/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php
+++ /dev/null
@@ -1,263 +0,0 @@
-channels[$channel] = $callback;
-
- return $this;
- }
-
- /**
- * Authenticate the incoming request for a given channel.
- *
- * @param \Illuminate\Http\Request $request
- * @param string $channel
- * @return mixed
- *
- * @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException
- */
- protected function verifyUserCanAccessChannel($request, $channel)
- {
- foreach ($this->channels as $pattern => $callback) {
- if (! Str::is(preg_replace('/\{(.*?)\}/', '*', $pattern), $channel)) {
- continue;
- }
-
- $parameters = $this->extractAuthParameters($pattern, $channel, $callback);
-
- $handler = $this->normalizeChannelHandlerToCallable($callback);
-
- if ($result = $handler($request->user(), ...$parameters)) {
- return $this->validAuthenticationResponse($request, $result);
- }
- }
-
- throw new AccessDeniedHttpException;
- }
-
- /**
- * Extract the parameters from the given pattern and channel.
- *
- * @param string $pattern
- * @param string $channel
- * @param callable|string $callback
- * @return array
- */
- protected function extractAuthParameters($pattern, $channel, $callback)
- {
- $callbackParameters = $this->extractParameters($callback);
-
- return collect($this->extractChannelKeys($pattern, $channel))->reject(function ($value, $key) {
- return is_numeric($key);
- })->map(function ($value, $key) use ($callbackParameters) {
- return $this->resolveBinding($key, $value, $callbackParameters);
- })->values()->all();
- }
-
- /**
- * Extracts the parameters out of what the user passed to handle the channel authentication.
- *
- * @param callable|string $callback
- * @return \ReflectionParameter[]
- *
- * @throws \Exception
- */
- protected function extractParameters($callback)
- {
- if (is_callable($callback)) {
- return (new ReflectionFunction($callback))->getParameters();
- } elseif (is_string($callback)) {
- return $this->extractParametersFromClass($callback);
- }
-
- throw new Exception('Given channel handler is an unknown type.');
- }
-
- /**
- * Extracts the parameters out of a class channel's "join" method.
- *
- * @param string $callback
- * @return \ReflectionParameter[]
- *
- * @throws \Exception
- */
- protected function extractParametersFromClass($callback)
- {
- $reflection = new ReflectionClass($callback);
-
- if (! $reflection->hasMethod('join')) {
- throw new Exception('Class based channel must define a "join" method.');
- }
-
- return $reflection->getMethod('join')->getParameters();
- }
-
- /**
- * Extract the channel keys from the incoming channel name.
- *
- * @param string $pattern
- * @param string $channel
- * @return array
- */
- protected function extractChannelKeys($pattern, $channel)
- {
- preg_match('/^'.preg_replace('/\{(.*?)\}/', '(?<$1>[^\.]+)', $pattern).'/', $channel, $keys);
-
- return $keys;
- }
-
- /**
- * Resolve the given parameter binding.
- *
- * @param string $key
- * @param string $value
- * @param array $callbackParameters
- * @return mixed
- */
- protected function resolveBinding($key, $value, $callbackParameters)
- {
- $newValue = $this->resolveExplicitBindingIfPossible($key, $value);
-
- return $newValue === $value ? $this->resolveImplicitBindingIfPossible(
- $key, $value, $callbackParameters
- ) : $newValue;
- }
-
- /**
- * Resolve an explicit parameter binding if applicable.
- *
- * @param string $key
- * @param mixed $value
- * @return mixed
- */
- protected function resolveExplicitBindingIfPossible($key, $value)
- {
- $binder = $this->binder();
-
- if ($binder && $binder->getBindingCallback($key)) {
- return call_user_func($binder->getBindingCallback($key), $value);
- }
-
- return $value;
- }
-
- /**
- * Resolve an implicit parameter binding if applicable.
- *
- * @param string $key
- * @param mixed $value
- * @param array $callbackParameters
- * @return mixed
- *
- * @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException
- */
- protected function resolveImplicitBindingIfPossible($key, $value, $callbackParameters)
- {
- foreach ($callbackParameters as $parameter) {
- if (! $this->isImplicitlyBindable($key, $parameter)) {
- continue;
- }
-
- $instance = $parameter->getClass()->newInstance();
-
- if (! $model = $instance->resolveRouteBinding($value)) {
- throw new AccessDeniedHttpException;
- }
-
- return $model;
- }
-
- return $value;
- }
-
- /**
- * Determine if a given key and parameter is implicitly bindable.
- *
- * @param string $key
- * @param \ReflectionParameter $parameter
- * @return bool
- */
- protected function isImplicitlyBindable($key, $parameter)
- {
- return $parameter->name === $key && $parameter->getClass() &&
- $parameter->getClass()->isSubclassOf(UrlRoutable::class);
- }
-
- /**
- * Format the channel array into an array of strings.
- *
- * @param array $channels
- * @return array
- */
- protected function formatChannels(array $channels)
- {
- return array_map(function ($channel) {
- return (string) $channel;
- }, $channels);
- }
-
- /**
- * Get the model binding registrar instance.
- *
- * @return \Illuminate\Contracts\Routing\BindingRegistrar
- */
- protected function binder()
- {
- if (! $this->bindingRegistrar) {
- $this->bindingRegistrar = Container::getInstance()->bound(BindingRegistrar::class)
- ? Container::getInstance()->make(BindingRegistrar::class) : null;
- }
-
- return $this->bindingRegistrar;
- }
-
- /**
- * Normalize the given callback into a callable.
- *
- * @param mixed $callback
- * @return callable|\Closure
- */
- protected function normalizeChannelHandlerToCallable($callback)
- {
- return is_callable($callback) ? $callback : function (...$args) use ($callback) {
- return Container::getInstance()
- ->make($callback)
- ->join(...$args);
- };
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/LogBroadcaster.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/LogBroadcaster.php
deleted file mode 100644
index 50877dc..0000000
--- a/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/LogBroadcaster.php
+++ /dev/null
@@ -1,54 +0,0 @@
-logger = $logger;
- }
-
- /**
- * {@inheritdoc}
- */
- public function auth($request)
- {
- //
- }
-
- /**
- * {@inheritdoc}
- */
- public function validAuthenticationResponse($request, $result)
- {
- //
- }
-
- /**
- * {@inheritdoc}
- */
- public function broadcast(array $channels, $event, array $payload = [])
- {
- $channels = implode(', ', $this->formatChannels($channels));
-
- $payload = json_encode($payload, JSON_PRETTY_PRINT);
-
- $this->logger->info('Broadcasting ['.$event.'] on channels ['.$channels.'] with payload:'.PHP_EOL.$payload);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/NullBroadcaster.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/NullBroadcaster.php
deleted file mode 100644
index 6205c90..0000000
--- a/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/NullBroadcaster.php
+++ /dev/null
@@ -1,30 +0,0 @@
-pusher = $pusher;
- }
-
- /**
- * Authenticate the incoming request for a given channel.
- *
- * @param \Illuminate\Http\Request $request
- * @return mixed
- *
- * @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException
- */
- public function auth($request)
- {
- if (Str::startsWith($request->channel_name, ['private-', 'presence-']) &&
- ! $request->user()) {
- throw new AccessDeniedHttpException;
- }
-
- $channelName = Str::startsWith($request->channel_name, 'private-')
- ? Str::replaceFirst('private-', '', $request->channel_name)
- : Str::replaceFirst('presence-', '', $request->channel_name);
-
- return parent::verifyUserCanAccessChannel(
- $request, $channelName
- );
- }
-
- /**
- * Return the valid authentication response.
- *
- * @param \Illuminate\Http\Request $request
- * @param mixed $result
- * @return mixed
- */
- public function validAuthenticationResponse($request, $result)
- {
- if (Str::startsWith($request->channel_name, 'private')) {
- return $this->decodePusherResponse(
- $request, $this->pusher->socket_auth($request->channel_name, $request->socket_id)
- );
- }
-
- return $this->decodePusherResponse(
- $request,
- $this->pusher->presence_auth(
- $request->channel_name, $request->socket_id,
- $request->user()->getAuthIdentifier(), $result
- )
- );
- }
-
- /**
- * Decode the given Pusher response.
- *
- * @param \Illuminate\Http\Request $request
- * @param mixed $response
- * @return array
- */
- protected function decodePusherResponse($request, $response)
- {
- if (! $request->input('callback', false)) {
- return json_decode($response, true);
- }
-
- return response()->json(json_decode($response, true))
- ->withCallback($request->callback);
- }
-
- /**
- * Broadcast the given event.
- *
- * @param array $channels
- * @param string $event
- * @param array $payload
- * @return void
- */
- public function broadcast(array $channels, $event, array $payload = [])
- {
- $socket = Arr::pull($payload, 'socket');
-
- $response = $this->pusher->trigger(
- $this->formatChannels($channels), $event, $payload, $socket, true
- );
-
- if ((is_array($response) && $response['status'] >= 200 && $response['status'] <= 299)
- || $response === true) {
- return;
- }
-
- throw new BroadcastException(
- is_bool($response) ? 'Failed to connect to Pusher.' : $response['body']
- );
- }
-
- /**
- * Get the Pusher SDK instance.
- *
- * @return \Pusher\Pusher
- */
- public function getPusher()
- {
- return $this->pusher;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/RedisBroadcaster.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/RedisBroadcaster.php
deleted file mode 100644
index 2351e49..0000000
--- a/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/RedisBroadcaster.php
+++ /dev/null
@@ -1,104 +0,0 @@
-redis = $redis;
- $this->connection = $connection;
- }
-
- /**
- * Authenticate the incoming request for a given channel.
- *
- * @param \Illuminate\Http\Request $request
- * @return mixed
- *
- * @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException
- */
- public function auth($request)
- {
- if (Str::startsWith($request->channel_name, ['private-', 'presence-']) &&
- ! $request->user()) {
- throw new AccessDeniedHttpException;
- }
-
- $channelName = Str::startsWith($request->channel_name, 'private-')
- ? Str::replaceFirst('private-', '', $request->channel_name)
- : Str::replaceFirst('presence-', '', $request->channel_name);
-
- return parent::verifyUserCanAccessChannel(
- $request, $channelName
- );
- }
-
- /**
- * Return the valid authentication response.
- *
- * @param \Illuminate\Http\Request $request
- * @param mixed $result
- * @return mixed
- */
- public function validAuthenticationResponse($request, $result)
- {
- if (is_bool($result)) {
- return json_encode($result);
- }
-
- return json_encode(['channel_data' => [
- 'user_id' => $request->user()->getAuthIdentifier(),
- 'user_info' => $result,
- ]]);
- }
-
- /**
- * Broadcast the given event.
- *
- * @param array $channels
- * @param string $event
- * @param array $payload
- * @return void
- */
- public function broadcast(array $channels, $event, array $payload = [])
- {
- $connection = $this->redis->connection($this->connection);
-
- $payload = json_encode([
- 'event' => $event,
- 'data' => $payload,
- 'socket' => Arr::pull($payload, 'socket'),
- ]);
-
- foreach ($this->formatChannels($channels) as $channel) {
- $connection->publish($channel, $payload);
- }
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/Channel.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/Channel.php
deleted file mode 100644
index 798d602..0000000
--- a/vendor/laravel/framework/src/Illuminate/Broadcasting/Channel.php
+++ /dev/null
@@ -1,34 +0,0 @@
-name = $name;
- }
-
- /**
- * Convert the channel instance to a string.
- *
- * @return string
- */
- public function __toString()
- {
- return $this->name;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/InteractsWithSockets.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/InteractsWithSockets.php
deleted file mode 100644
index 6be0791..0000000
--- a/vendor/laravel/framework/src/Illuminate/Broadcasting/InteractsWithSockets.php
+++ /dev/null
@@ -1,39 +0,0 @@
-socket = Broadcast::socket();
-
- return $this;
- }
-
- /**
- * Broadcast the event to everyone.
- *
- * @return $this
- */
- public function broadcastToEveryone()
- {
- $this->socket = null;
-
- return $this;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/PendingBroadcast.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/PendingBroadcast.php
deleted file mode 100644
index b755029..0000000
--- a/vendor/laravel/framework/src/Illuminate/Broadcasting/PendingBroadcast.php
+++ /dev/null
@@ -1,59 +0,0 @@
-event = $event;
- $this->events = $events;
- }
-
- /**
- * Broadcast the event to everyone except the current user.
- *
- * @return $this
- */
- public function toOthers()
- {
- if (method_exists($this->event, 'dontBroadcastToCurrentUser')) {
- $this->event->dontBroadcastToCurrentUser();
- }
-
- return $this;
- }
-
- /**
- * Handle the object's destruction.
- *
- * @return void
- */
- public function __destruct()
- {
- $this->events->dispatch($this->event);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/PresenceChannel.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/PresenceChannel.php
deleted file mode 100644
index 22de12d..0000000
--- a/vendor/laravel/framework/src/Illuminate/Broadcasting/PresenceChannel.php
+++ /dev/null
@@ -1,17 +0,0 @@
-app->singleton(Dispatcher::class, function ($app) {
- return new Dispatcher($app, function ($connection = null) use ($app) {
- return $app[QueueFactoryContract::class]->connection($connection);
- });
- });
-
- $this->app->alias(
- Dispatcher::class, DispatcherContract::class
- );
-
- $this->app->alias(
- Dispatcher::class, QueueingDispatcherContract::class
- );
- }
-
- /**
- * Get the services provided by the provider.
- *
- * @return array
- */
- public function provides()
- {
- return [
- Dispatcher::class,
- DispatcherContract::class,
- QueueingDispatcherContract::class,
- ];
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php b/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php
deleted file mode 100644
index 1a7b9a4..0000000
--- a/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php
+++ /dev/null
@@ -1,212 +0,0 @@
-container = $container;
- $this->queueResolver = $queueResolver;
- $this->pipeline = new Pipeline($container);
- }
-
- /**
- * Dispatch a command to its appropriate handler.
- *
- * @param mixed $command
- * @return mixed
- */
- public function dispatch($command)
- {
- if ($this->queueResolver && $this->commandShouldBeQueued($command)) {
- return $this->dispatchToQueue($command);
- }
-
- return $this->dispatchNow($command);
- }
-
- /**
- * Dispatch a command to its appropriate handler in the current process.
- *
- * @param mixed $command
- * @param mixed $handler
- * @return mixed
- */
- public function dispatchNow($command, $handler = null)
- {
- if ($handler || $handler = $this->getCommandHandler($command)) {
- $callback = function ($command) use ($handler) {
- return $handler->handle($command);
- };
- } else {
- $callback = function ($command) {
- return $this->container->call([$command, 'handle']);
- };
- }
-
- return $this->pipeline->send($command)->through($this->pipes)->then($callback);
- }
-
- /**
- * Determine if the given command has a handler.
- *
- * @param mixed $command
- * @return bool
- */
- public function hasCommandHandler($command)
- {
- return array_key_exists(get_class($command), $this->handlers);
- }
-
- /**
- * Retrieve the handler for a command.
- *
- * @param mixed $command
- * @return bool|mixed
- */
- public function getCommandHandler($command)
- {
- if ($this->hasCommandHandler($command)) {
- return $this->container->make($this->handlers[get_class($command)]);
- }
-
- return false;
- }
-
- /**
- * Determine if the given command should be queued.
- *
- * @param mixed $command
- * @return bool
- */
- protected function commandShouldBeQueued($command)
- {
- return $command instanceof ShouldQueue;
- }
-
- /**
- * Dispatch a command to its appropriate handler behind a queue.
- *
- * @param mixed $command
- * @return mixed
- *
- * @throws \RuntimeException
- */
- public function dispatchToQueue($command)
- {
- $connection = $command->connection ?? null;
-
- $queue = call_user_func($this->queueResolver, $connection);
-
- if (! $queue instanceof Queue) {
- throw new RuntimeException('Queue resolver did not return a Queue implementation.');
- }
-
- if (method_exists($command, 'queue')) {
- return $command->queue($queue, $command);
- }
-
- return $this->pushCommandToQueue($queue, $command);
- }
-
- /**
- * Push the command onto the given queue instance.
- *
- * @param \Illuminate\Contracts\Queue\Queue $queue
- * @param mixed $command
- * @return mixed
- */
- protected function pushCommandToQueue($queue, $command)
- {
- if (isset($command->queue, $command->delay)) {
- return $queue->laterOn($command->queue, $command->delay, $command);
- }
-
- if (isset($command->queue)) {
- return $queue->pushOn($command->queue, $command);
- }
-
- if (isset($command->delay)) {
- return $queue->later($command->delay, $command);
- }
-
- return $queue->push($command);
- }
-
- /**
- * Set the pipes through which commands should be piped before dispatching.
- *
- * @param array $pipes
- * @return $this
- */
- public function pipeThrough(array $pipes)
- {
- $this->pipes = $pipes;
-
- return $this;
- }
-
- /**
- * Map a command to a handler.
- *
- * @param array $map
- * @return $this
- */
- public function map(array $map)
- {
- $this->handlers = array_merge($this->handlers, $map);
-
- return $this;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Bus/Queueable.php b/vendor/laravel/framework/src/Illuminate/Bus/Queueable.php
deleted file mode 100644
index 48cee18..0000000
--- a/vendor/laravel/framework/src/Illuminate/Bus/Queueable.php
+++ /dev/null
@@ -1,150 +0,0 @@
-connection = $connection;
-
- return $this;
- }
-
- /**
- * Set the desired queue for the job.
- *
- * @param string|null $queue
- * @return $this
- */
- public function onQueue($queue)
- {
- $this->queue = $queue;
-
- return $this;
- }
-
- /**
- * Set the desired connection for the chain.
- *
- * @param string|null $connection
- * @return $this
- */
- public function allOnConnection($connection)
- {
- $this->chainConnection = $connection;
- $this->connection = $connection;
-
- return $this;
- }
-
- /**
- * Set the desired queue for the chain.
- *
- * @param string|null $queue
- * @return $this
- */
- public function allOnQueue($queue)
- {
- $this->chainQueue = $queue;
- $this->queue = $queue;
-
- return $this;
- }
-
- /**
- * Set the desired delay for the job.
- *
- * @param \DateTimeInterface|\DateInterval|int|null $delay
- * @return $this
- */
- public function delay($delay)
- {
- $this->delay = $delay;
-
- return $this;
- }
-
- /**
- * Set the jobs that should run if this job is successful.
- *
- * @param array $chain
- * @return $this
- */
- public function chain($chain)
- {
- $this->chained = collect($chain)->map(function ($job) {
- return serialize($job);
- })->all();
-
- return $this;
- }
-
- /**
- * Dispatch the next job on the chain.
- *
- * @return void
- */
- public function dispatchNextJobInChain()
- {
- if (! empty($this->chained)) {
- dispatch(tap(unserialize(array_shift($this->chained)), function ($next) {
- $next->chained = $this->chained;
-
- $next->onConnection($next->connection ?: $this->chainConnection);
- $next->onQueue($next->queue ?: $this->chainQueue);
-
- $next->chainConnection = $this->chainConnection;
- $next->chainQueue = $this->chainQueue;
- }));
- }
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Bus/composer.json b/vendor/laravel/framework/src/Illuminate/Bus/composer.json
deleted file mode 100644
index da911fd..0000000
--- a/vendor/laravel/framework/src/Illuminate/Bus/composer.json
+++ /dev/null
@@ -1,36 +0,0 @@
-{
- "name": "illuminate/bus",
- "description": "The Illuminate Bus package.",
- "license": "MIT",
- "homepage": "https://laravel.com",
- "support": {
- "issues": "https://github.com/laravel/framework/issues",
- "source": "https://github.com/laravel/framework"
- },
- "authors": [
- {
- "name": "Taylor Otwell",
- "email": "taylor@laravel.com"
- }
- ],
- "require": {
- "php": "^7.1.3",
- "illuminate/contracts": "5.7.*",
- "illuminate/pipeline": "5.7.*",
- "illuminate/support": "5.7.*"
- },
- "autoload": {
- "psr-4": {
- "Illuminate\\Bus\\": ""
- }
- },
- "extra": {
- "branch-alias": {
- "dev-master": "5.7-dev"
- }
- },
- "config": {
- "sort-packages": true
- },
- "minimum-stability": "dev"
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/ApcStore.php b/vendor/laravel/framework/src/Illuminate/Cache/ApcStore.php
deleted file mode 100755
index db11ea4..0000000
--- a/vendor/laravel/framework/src/Illuminate/Cache/ApcStore.php
+++ /dev/null
@@ -1,132 +0,0 @@
-apc = $apc;
- $this->prefix = $prefix;
- }
-
- /**
- * Retrieve an item from the cache by key.
- *
- * @param string|array $key
- * @return mixed
- */
- public function get($key)
- {
- $value = $this->apc->get($this->prefix.$key);
-
- if ($value !== false) {
- return $value;
- }
- }
-
- /**
- * Store an item in the cache for a given number of minutes.
- *
- * @param string $key
- * @param mixed $value
- * @param float|int $minutes
- * @return void
- */
- public function put($key, $value, $minutes)
- {
- $this->apc->put($this->prefix.$key, $value, (int) ($minutes * 60));
- }
-
- /**
- * Increment the value of an item in the cache.
- *
- * @param string $key
- * @param mixed $value
- * @return int|bool
- */
- public function increment($key, $value = 1)
- {
- return $this->apc->increment($this->prefix.$key, $value);
- }
-
- /**
- * Decrement the value of an item in the cache.
- *
- * @param string $key
- * @param mixed $value
- * @return int|bool
- */
- public function decrement($key, $value = 1)
- {
- return $this->apc->decrement($this->prefix.$key, $value);
- }
-
- /**
- * Store an item in the cache indefinitely.
- *
- * @param string $key
- * @param mixed $value
- * @return void
- */
- public function forever($key, $value)
- {
- $this->put($key, $value, 0);
- }
-
- /**
- * Remove an item from the cache.
- *
- * @param string $key
- * @return bool
- */
- public function forget($key)
- {
- return $this->apc->delete($this->prefix.$key);
- }
-
- /**
- * Remove all items from the cache.
- *
- * @return bool
- */
- public function flush()
- {
- return $this->apc->flush();
- }
-
- /**
- * Get the cache key prefix.
- *
- * @return string
- */
- public function getPrefix()
- {
- return $this->prefix;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/ApcWrapper.php b/vendor/laravel/framework/src/Illuminate/Cache/ApcWrapper.php
deleted file mode 100755
index 42e76aa..0000000
--- a/vendor/laravel/framework/src/Illuminate/Cache/ApcWrapper.php
+++ /dev/null
@@ -1,92 +0,0 @@
-apcu = function_exists('apcu_fetch');
- }
-
- /**
- * Get an item from the cache.
- *
- * @param string $key
- * @return mixed
- */
- public function get($key)
- {
- return $this->apcu ? apcu_fetch($key) : apc_fetch($key);
- }
-
- /**
- * Store an item in the cache.
- *
- * @param string $key
- * @param mixed $value
- * @param int $seconds
- * @return array|bool
- */
- public function put($key, $value, $seconds)
- {
- return $this->apcu ? apcu_store($key, $value, $seconds) : apc_store($key, $value, $seconds);
- }
-
- /**
- * Increment the value of an item in the cache.
- *
- * @param string $key
- * @param mixed $value
- * @return int|bool
- */
- public function increment($key, $value)
- {
- return $this->apcu ? apcu_inc($key, $value) : apc_inc($key, $value);
- }
-
- /**
- * Decrement the value of an item in the cache.
- *
- * @param string $key
- * @param mixed $value
- * @return int|bool
- */
- public function decrement($key, $value)
- {
- return $this->apcu ? apcu_dec($key, $value) : apc_dec($key, $value);
- }
-
- /**
- * Remove an item from the cache.
- *
- * @param string $key
- * @return bool
- */
- public function delete($key)
- {
- return $this->apcu ? apcu_delete($key) : apc_delete($key);
- }
-
- /**
- * Remove all items from the cache.
- *
- * @return bool
- */
- public function flush()
- {
- return $this->apcu ? apcu_clear_cache() : apc_clear_cache('user');
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/ArrayStore.php b/vendor/laravel/framework/src/Illuminate/Cache/ArrayStore.php
deleted file mode 100644
index 806f971..0000000
--- a/vendor/laravel/framework/src/Illuminate/Cache/ArrayStore.php
+++ /dev/null
@@ -1,115 +0,0 @@
-storage[$key] ?? null;
- }
-
- /**
- * Store an item in the cache for a given number of minutes.
- *
- * @param string $key
- * @param mixed $value
- * @param float|int $minutes
- * @return void
- */
- public function put($key, $value, $minutes)
- {
- $this->storage[$key] = $value;
- }
-
- /**
- * Increment the value of an item in the cache.
- *
- * @param string $key
- * @param mixed $value
- * @return int
- */
- public function increment($key, $value = 1)
- {
- $this->storage[$key] = ! isset($this->storage[$key])
- ? $value : ((int) $this->storage[$key]) + $value;
-
- return $this->storage[$key];
- }
-
- /**
- * Decrement the value of an item in the cache.
- *
- * @param string $key
- * @param mixed $value
- * @return int
- */
- public function decrement($key, $value = 1)
- {
- return $this->increment($key, $value * -1);
- }
-
- /**
- * Store an item in the cache indefinitely.
- *
- * @param string $key
- * @param mixed $value
- * @return void
- */
- public function forever($key, $value)
- {
- $this->put($key, $value, 0);
- }
-
- /**
- * Remove an item from the cache.
- *
- * @param string $key
- * @return bool
- */
- public function forget($key)
- {
- unset($this->storage[$key]);
-
- return true;
- }
-
- /**
- * Remove all items from the cache.
- *
- * @return bool
- */
- public function flush()
- {
- $this->storage = [];
-
- return true;
- }
-
- /**
- * Get the cache key prefix.
- *
- * @return string
- */
- public function getPrefix()
- {
- return '';
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php b/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php
deleted file mode 100755
index 2d8f7c4..0000000
--- a/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php
+++ /dev/null
@@ -1,325 +0,0 @@
-app = $app;
- }
-
- /**
- * Get a cache store instance by name, wrapped in a repository.
- *
- * @param string|null $name
- * @return \Illuminate\Contracts\Cache\Repository
- */
- public function store($name = null)
- {
- $name = $name ?: $this->getDefaultDriver();
-
- return $this->stores[$name] = $this->get($name);
- }
-
- /**
- * Get a cache driver instance.
- *
- * @param string|null $driver
- * @return \Illuminate\Contracts\Cache\Repository
- */
- public function driver($driver = null)
- {
- return $this->store($driver);
- }
-
- /**
- * Attempt to get the store from the local cache.
- *
- * @param string $name
- * @return \Illuminate\Contracts\Cache\Repository
- */
- protected function get($name)
- {
- return $this->stores[$name] ?? $this->resolve($name);
- }
-
- /**
- * Resolve the given store.
- *
- * @param string $name
- * @return \Illuminate\Contracts\Cache\Repository
- *
- * @throws \InvalidArgumentException
- */
- protected function resolve($name)
- {
- $config = $this->getConfig($name);
-
- if (is_null($config)) {
- throw new InvalidArgumentException("Cache store [{$name}] is not defined.");
- }
-
- if (isset($this->customCreators[$config['driver']])) {
- return $this->callCustomCreator($config);
- } else {
- $driverMethod = 'create'.ucfirst($config['driver']).'Driver';
-
- if (method_exists($this, $driverMethod)) {
- return $this->{$driverMethod}($config);
- } else {
- throw new InvalidArgumentException("Driver [{$config['driver']}] is not supported.");
- }
- }
- }
-
- /**
- * Call a custom driver creator.
- *
- * @param array $config
- * @return mixed
- */
- protected function callCustomCreator(array $config)
- {
- return $this->customCreators[$config['driver']]($this->app, $config);
- }
-
- /**
- * Create an instance of the APC cache driver.
- *
- * @param array $config
- * @return \Illuminate\Cache\Repository
- */
- protected function createApcDriver(array $config)
- {
- $prefix = $this->getPrefix($config);
-
- return $this->repository(new ApcStore(new ApcWrapper, $prefix));
- }
-
- /**
- * Create an instance of the array cache driver.
- *
- * @return \Illuminate\Cache\Repository
- */
- protected function createArrayDriver()
- {
- return $this->repository(new ArrayStore);
- }
-
- /**
- * Create an instance of the file cache driver.
- *
- * @param array $config
- * @return \Illuminate\Cache\Repository
- */
- protected function createFileDriver(array $config)
- {
- return $this->repository(new FileStore($this->app['files'], $config['path']));
- }
-
- /**
- * Create an instance of the Memcached cache driver.
- *
- * @param array $config
- * @return \Illuminate\Cache\Repository
- */
- protected function createMemcachedDriver(array $config)
- {
- $prefix = $this->getPrefix($config);
-
- $memcached = $this->app['memcached.connector']->connect(
- $config['servers'],
- $config['persistent_id'] ?? null,
- $config['options'] ?? [],
- array_filter($config['sasl'] ?? [])
- );
-
- return $this->repository(new MemcachedStore($memcached, $prefix));
- }
-
- /**
- * Create an instance of the Null cache driver.
- *
- * @return \Illuminate\Cache\Repository
- */
- protected function createNullDriver()
- {
- return $this->repository(new NullStore);
- }
-
- /**
- * Create an instance of the Redis cache driver.
- *
- * @param array $config
- * @return \Illuminate\Cache\Repository
- */
- protected function createRedisDriver(array $config)
- {
- $redis = $this->app['redis'];
-
- $connection = $config['connection'] ?? 'default';
-
- return $this->repository(new RedisStore($redis, $this->getPrefix($config), $connection));
- }
-
- /**
- * Create an instance of the database cache driver.
- *
- * @param array $config
- * @return \Illuminate\Cache\Repository
- */
- protected function createDatabaseDriver(array $config)
- {
- $connection = $this->app['db']->connection($config['connection'] ?? null);
-
- return $this->repository(
- new DatabaseStore(
- $connection, $config['table'], $this->getPrefix($config)
- )
- );
- }
-
- /**
- * Create a new cache repository with the given implementation.
- *
- * @param \Illuminate\Contracts\Cache\Store $store
- * @return \Illuminate\Cache\Repository
- */
- public function repository(Store $store)
- {
- $repository = new Repository($store);
-
- if ($this->app->bound(DispatcherContract::class)) {
- $repository->setEventDispatcher(
- $this->app[DispatcherContract::class]
- );
- }
-
- return $repository;
- }
-
- /**
- * Get the cache prefix.
- *
- * @param array $config
- * @return string
- */
- protected function getPrefix(array $config)
- {
- return $config['prefix'] ?? $this->app['config']['cache.prefix'];
- }
-
- /**
- * Get the cache connection configuration.
- *
- * @param string $name
- * @return array
- */
- protected function getConfig($name)
- {
- return $this->app['config']["cache.stores.{$name}"];
- }
-
- /**
- * Get the default cache driver name.
- *
- * @return string
- */
- public function getDefaultDriver()
- {
- return $this->app['config']['cache.default'];
- }
-
- /**
- * Set the default cache driver name.
- *
- * @param string $name
- * @return void
- */
- public function setDefaultDriver($name)
- {
- $this->app['config']['cache.default'] = $name;
- }
-
- /**
- * Unset the given driver instances.
- *
- * @param array|string|null $name
- * @return $this
- */
- public function forgetDriver($name = null)
- {
- $name = $name ?? $this->getDefaultDriver();
-
- foreach ((array) $name as $cacheName) {
- if (isset($this->stores[$cacheName])) {
- unset($this->stores[$cacheName]);
- }
- }
-
- return $this;
- }
-
- /**
- * Register a custom driver creator Closure.
- *
- * @param string $driver
- * @param \Closure $callback
- * @return $this
- */
- public function extend($driver, Closure $callback)
- {
- $this->customCreators[$driver] = $callback->bindTo($this, $this);
-
- return $this;
- }
-
- /**
- * Dynamically call the default driver instance.
- *
- * @param string $method
- * @param array $parameters
- * @return mixed
- */
- public function __call($method, $parameters)
- {
- return $this->store()->$method(...$parameters);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/CacheServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Cache/CacheServiceProvider.php
deleted file mode 100755
index 8eb5ed6..0000000
--- a/vendor/laravel/framework/src/Illuminate/Cache/CacheServiceProvider.php
+++ /dev/null
@@ -1,47 +0,0 @@
-app->singleton('cache', function ($app) {
- return new CacheManager($app);
- });
-
- $this->app->singleton('cache.store', function ($app) {
- return $app['cache']->driver();
- });
-
- $this->app->singleton('memcached.connector', function () {
- return new MemcachedConnector;
- });
- }
-
- /**
- * Get the services provided by the provider.
- *
- * @return array
- */
- public function provides()
- {
- return [
- 'cache', 'cache.store', 'memcached.connector',
- ];
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Console/CacheTableCommand.php b/vendor/laravel/framework/src/Illuminate/Cache/Console/CacheTableCommand.php
deleted file mode 100644
index bde2d4b..0000000
--- a/vendor/laravel/framework/src/Illuminate/Cache/Console/CacheTableCommand.php
+++ /dev/null
@@ -1,81 +0,0 @@
-files = $files;
- $this->composer = $composer;
- }
-
- /**
- * Execute the console command.
- *
- * @return void
- */
- public function handle()
- {
- $fullPath = $this->createBaseMigration();
-
- $this->files->put($fullPath, $this->files->get(__DIR__.'/stubs/cache.stub'));
-
- $this->info('Migration created successfully!');
-
- $this->composer->dumpAutoloads();
- }
-
- /**
- * Create a base migration file for the table.
- *
- * @return string
- */
- protected function createBaseMigration()
- {
- $name = 'create_cache_table';
-
- $path = $this->laravel->databasePath().'/migrations';
-
- return $this->laravel['migration.creator']->create($name, $path);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Console/ClearCommand.php b/vendor/laravel/framework/src/Illuminate/Cache/Console/ClearCommand.php
deleted file mode 100755
index 4feeb17..0000000
--- a/vendor/laravel/framework/src/Illuminate/Cache/Console/ClearCommand.php
+++ /dev/null
@@ -1,145 +0,0 @@
-cache = $cache;
- $this->files = $files;
- }
-
- /**
- * Execute the console command.
- *
- * @return void
- */
- public function handle()
- {
- $this->laravel['events']->dispatch(
- 'cache:clearing', [$this->argument('store'), $this->tags()]
- );
-
- $successful = $this->cache()->flush();
-
- $this->flushFacades();
-
- if (! $successful) {
- return $this->error('Failed to clear cache. Make sure you have the appropriate permissions.');
- }
-
- $this->laravel['events']->dispatch(
- 'cache:cleared', [$this->argument('store'), $this->tags()]
- );
-
- $this->info('Application cache cleared!');
- }
-
- /**
- * Flush the real-time facades stored in the cache directory.
- *
- * @return void
- */
- public function flushFacades()
- {
- if (! $this->files->exists($storagePath = storage_path('framework/cache'))) {
- return;
- }
-
- foreach ($this->files->files($storagePath) as $file) {
- if (preg_match('/facade-.*\.php$/', $file)) {
- $this->files->delete($file);
- }
- }
- }
-
- /**
- * Get the cache instance for the command.
- *
- * @return \Illuminate\Cache\Repository
- */
- protected function cache()
- {
- $cache = $this->cache->store($this->argument('store'));
-
- return empty($this->tags()) ? $cache : $cache->tags($this->tags());
- }
-
- /**
- * Get the tags passed to the command.
- *
- * @return array
- */
- protected function tags()
- {
- return array_filter(explode(',', $this->option('tags')));
- }
-
- /**
- * Get the console command arguments.
- *
- * @return array
- */
- protected function getArguments()
- {
- return [
- ['store', InputArgument::OPTIONAL, 'The name of the store you would like to clear'],
- ];
- }
-
- /**
- * Get the console command options.
- *
- * @return array
- */
- protected function getOptions()
- {
- return [
- ['tags', null, InputOption::VALUE_OPTIONAL, 'The cache tags you would like to clear', null],
- ];
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Console/ForgetCommand.php b/vendor/laravel/framework/src/Illuminate/Cache/Console/ForgetCommand.php
deleted file mode 100755
index 646dc14..0000000
--- a/vendor/laravel/framework/src/Illuminate/Cache/Console/ForgetCommand.php
+++ /dev/null
@@ -1,57 +0,0 @@
-cache = $cache;
- }
-
- /**
- * Execute the console command.
- *
- * @return void
- */
- public function handle()
- {
- $this->cache->store($this->argument('store'))->forget(
- $this->argument('key')
- );
-
- $this->info('The ['.$this->argument('key').'] key has been removed from the cache.');
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Console/stubs/cache.stub b/vendor/laravel/framework/src/Illuminate/Cache/Console/stubs/cache.stub
deleted file mode 100644
index 058afe6..0000000
--- a/vendor/laravel/framework/src/Illuminate/Cache/Console/stubs/cache.stub
+++ /dev/null
@@ -1,32 +0,0 @@
-string('key')->unique();
- $table->mediumText('value');
- $table->integer('expiration');
- });
- }
-
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('cache');
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/DatabaseStore.php b/vendor/laravel/framework/src/Illuminate/Cache/DatabaseStore.php
deleted file mode 100755
index 8a68c50..0000000
--- a/vendor/laravel/framework/src/Illuminate/Cache/DatabaseStore.php
+++ /dev/null
@@ -1,292 +0,0 @@
-table = $table;
- $this->prefix = $prefix;
- $this->connection = $connection;
- }
-
- /**
- * Retrieve an item from the cache by key.
- *
- * @param string|array $key
- * @return mixed
- */
- public function get($key)
- {
- $prefixed = $this->prefix.$key;
-
- $cache = $this->table()->where('key', '=', $prefixed)->first();
-
- // If we have a cache record we will check the expiration time against current
- // time on the system and see if the record has expired. If it has, we will
- // remove the records from the database table so it isn't returned again.
- if (is_null($cache)) {
- return;
- }
-
- $cache = is_array($cache) ? (object) $cache : $cache;
-
- // If this cache expiration date is past the current time, we will remove this
- // item from the cache. Then we will return a null value since the cache is
- // expired. We will use "Carbon" to make this comparison with the column.
- if ($this->currentTime() >= $cache->expiration) {
- $this->forget($key);
-
- return;
- }
-
- return $this->unserialize($cache->value);
- }
-
- /**
- * Store an item in the cache for a given number of minutes.
- *
- * @param string $key
- * @param mixed $value
- * @param float|int $minutes
- * @return void
- */
- public function put($key, $value, $minutes)
- {
- $key = $this->prefix.$key;
-
- $value = $this->serialize($value);
-
- $expiration = $this->getTime() + (int) ($minutes * 60);
-
- try {
- $this->table()->insert(compact('key', 'value', 'expiration'));
- } catch (Exception $e) {
- $this->table()->where('key', $key)->update(compact('value', 'expiration'));
- }
- }
-
- /**
- * Increment the value of an item in the cache.
- *
- * @param string $key
- * @param mixed $value
- * @return int|bool
- */
- public function increment($key, $value = 1)
- {
- return $this->incrementOrDecrement($key, $value, function ($current, $value) {
- return $current + $value;
- });
- }
-
- /**
- * Decrement the value of an item in the cache.
- *
- * @param string $key
- * @param mixed $value
- * @return int|bool
- */
- public function decrement($key, $value = 1)
- {
- return $this->incrementOrDecrement($key, $value, function ($current, $value) {
- return $current - $value;
- });
- }
-
- /**
- * Increment or decrement an item in the cache.
- *
- * @param string $key
- * @param mixed $value
- * @param \Closure $callback
- * @return int|bool
- */
- protected function incrementOrDecrement($key, $value, Closure $callback)
- {
- return $this->connection->transaction(function () use ($key, $value, $callback) {
- $prefixed = $this->prefix.$key;
-
- $cache = $this->table()->where('key', $prefixed)
- ->lockForUpdate()->first();
-
- // If there is no value in the cache, we will return false here. Otherwise the
- // value will be decrypted and we will proceed with this function to either
- // increment or decrement this value based on the given action callbacks.
- if (is_null($cache)) {
- return false;
- }
-
- $cache = is_array($cache) ? (object) $cache : $cache;
-
- $current = $this->unserialize($cache->value);
-
- // Here we'll call this callback function that was given to the function which
- // is used to either increment or decrement the function. We use a callback
- // so we do not have to recreate all this logic in each of the functions.
- $new = $callback((int) $current, $value);
-
- if (! is_numeric($current)) {
- return false;
- }
-
- // Here we will update the values in the table. We will also encrypt the value
- // since database cache values are encrypted by default with secure storage
- // that can't be easily read. We will return the new value after storing.
- $this->table()->where('key', $prefixed)->update([
- 'value' => $this->serialize($new),
- ]);
-
- return $new;
- });
- }
-
- /**
- * Get the current system time.
- *
- * @return int
- */
- protected function getTime()
- {
- return $this->currentTime();
- }
-
- /**
- * Store an item in the cache indefinitely.
- *
- * @param string $key
- * @param mixed $value
- * @return void
- */
- public function forever($key, $value)
- {
- $this->put($key, $value, 5256000);
- }
-
- /**
- * Remove an item from the cache.
- *
- * @param string $key
- * @return bool
- */
- public function forget($key)
- {
- $this->table()->where('key', '=', $this->prefix.$key)->delete();
-
- return true;
- }
-
- /**
- * Remove all items from the cache.
- *
- * @return bool
- */
- public function flush()
- {
- $this->table()->delete();
-
- return true;
- }
-
- /**
- * Get a query builder for the cache table.
- *
- * @return \Illuminate\Database\Query\Builder
- */
- protected function table()
- {
- return $this->connection->table($this->table);
- }
-
- /**
- * Get the underlying database connection.
- *
- * @return \Illuminate\Database\ConnectionInterface
- */
- public function getConnection()
- {
- return $this->connection;
- }
-
- /**
- * Get the cache key prefix.
- *
- * @return string
- */
- public function getPrefix()
- {
- return $this->prefix;
- }
-
- /**
- * Serialize the given value.
- *
- * @param mixed $value
- * @return string
- */
- protected function serialize($value)
- {
- $result = serialize($value);
-
- if ($this->connection instanceof PostgresConnection && Str::contains($result, "\0")) {
- $result = base64_encode($result);
- }
-
- return $result;
- }
-
- /**
- * Unserialize the given value.
- *
- * @param string $value
- * @return mixed
- */
- protected function unserialize($value)
- {
- if ($this->connection instanceof PostgresConnection && ! Str::contains($value, [':', ';'])) {
- $value = base64_decode($value);
- }
-
- return unserialize($value);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Events/CacheEvent.php b/vendor/laravel/framework/src/Illuminate/Cache/Events/CacheEvent.php
deleted file mode 100644
index 6c9d42c..0000000
--- a/vendor/laravel/framework/src/Illuminate/Cache/Events/CacheEvent.php
+++ /dev/null
@@ -1,46 +0,0 @@
-key = $key;
- $this->tags = $tags;
- }
-
- /**
- * Set the tags for the cache event.
- *
- * @param array $tags
- * @return $this
- */
- public function setTags($tags)
- {
- $this->tags = $tags;
-
- return $this;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Events/CacheHit.php b/vendor/laravel/framework/src/Illuminate/Cache/Events/CacheHit.php
deleted file mode 100644
index 976c9e4..0000000
--- a/vendor/laravel/framework/src/Illuminate/Cache/Events/CacheHit.php
+++ /dev/null
@@ -1,28 +0,0 @@
-value = $value;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Events/CacheMissed.php b/vendor/laravel/framework/src/Illuminate/Cache/Events/CacheMissed.php
deleted file mode 100644
index d2a5c9f..0000000
--- a/vendor/laravel/framework/src/Illuminate/Cache/Events/CacheMissed.php
+++ /dev/null
@@ -1,8 +0,0 @@
-value = $value;
- $this->minutes = $minutes;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php b/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php
deleted file mode 100755
index cead4ac..0000000
--- a/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php
+++ /dev/null
@@ -1,262 +0,0 @@
-files = $files;
- $this->directory = $directory;
- }
-
- /**
- * Retrieve an item from the cache by key.
- *
- * @param string|array $key
- * @return mixed
- */
- public function get($key)
- {
- return $this->getPayload($key)['data'] ?? null;
- }
-
- /**
- * Store an item in the cache for a given number of minutes.
- *
- * @param string $key
- * @param mixed $value
- * @param float|int $minutes
- * @return void
- */
- public function put($key, $value, $minutes)
- {
- $this->ensureCacheDirectoryExists($path = $this->path($key));
-
- $this->files->put(
- $path, $this->expiration($minutes).serialize($value), true
- );
- }
-
- /**
- * Create the file cache directory if necessary.
- *
- * @param string $path
- * @return void
- */
- protected function ensureCacheDirectoryExists($path)
- {
- if (! $this->files->exists(dirname($path))) {
- $this->files->makeDirectory(dirname($path), 0777, true, true);
- }
- }
-
- /**
- * Increment the value of an item in the cache.
- *
- * @param string $key
- * @param mixed $value
- * @return int
- */
- public function increment($key, $value = 1)
- {
- $raw = $this->getPayload($key);
-
- return tap(((int) $raw['data']) + $value, function ($newValue) use ($key, $raw) {
- $this->put($key, $newValue, $raw['time'] ?? 0);
- });
- }
-
- /**
- * Decrement the value of an item in the cache.
- *
- * @param string $key
- * @param mixed $value
- * @return int
- */
- public function decrement($key, $value = 1)
- {
- return $this->increment($key, $value * -1);
- }
-
- /**
- * Store an item in the cache indefinitely.
- *
- * @param string $key
- * @param mixed $value
- * @return void
- */
- public function forever($key, $value)
- {
- $this->put($key, $value, 0);
- }
-
- /**
- * Remove an item from the cache.
- *
- * @param string $key
- * @return bool
- */
- public function forget($key)
- {
- if ($this->files->exists($file = $this->path($key))) {
- return $this->files->delete($file);
- }
-
- return false;
- }
-
- /**
- * Remove all items from the cache.
- *
- * @return bool
- */
- public function flush()
- {
- if (! $this->files->isDirectory($this->directory)) {
- return false;
- }
-
- foreach ($this->files->directories($this->directory) as $directory) {
- if (! $this->files->deleteDirectory($directory)) {
- return false;
- }
- }
-
- return true;
- }
-
- /**
- * Retrieve an item and expiry time from the cache by key.
- *
- * @param string $key
- * @return array
- */
- protected function getPayload($key)
- {
- $path = $this->path($key);
-
- // If the file doesn't exist, we obviously cannot return the cache so we will
- // just return null. Otherwise, we'll get the contents of the file and get
- // the expiration UNIX timestamps from the start of the file's contents.
- try {
- $expire = substr(
- $contents = $this->files->get($path, true), 0, 10
- );
- } catch (Exception $e) {
- return $this->emptyPayload();
- }
-
- // If the current time is greater than expiration timestamps we will delete
- // the file and return null. This helps clean up the old files and keeps
- // this directory much cleaner for us as old files aren't hanging out.
- if ($this->currentTime() >= $expire) {
- $this->forget($key);
-
- return $this->emptyPayload();
- }
-
- $data = unserialize(substr($contents, 10));
-
- // Next, we'll extract the number of minutes that are remaining for a cache
- // so that we can properly retain the time for things like the increment
- // operation that may be performed on this cache on a later operation.
- $time = ($expire - $this->currentTime()) / 60;
-
- return compact('data', 'time');
- }
-
- /**
- * Get a default empty payload for the cache.
- *
- * @return array
- */
- protected function emptyPayload()
- {
- return ['data' => null, 'time' => null];
- }
-
- /**
- * Get the full path for the given cache key.
- *
- * @param string $key
- * @return string
- */
- protected function path($key)
- {
- $parts = array_slice(str_split($hash = sha1($key), 2), 0, 2);
-
- return $this->directory.'/'.implode('/', $parts).'/'.$hash;
- }
-
- /**
- * Get the expiration time based on the given minutes.
- *
- * @param float|int $minutes
- * @return int
- */
- protected function expiration($minutes)
- {
- $time = $this->availableAt((int) ($minutes * 60));
-
- return $minutes === 0 || $time > 9999999999 ? 9999999999 : (int) $time;
- }
-
- /**
- * Get the Filesystem instance.
- *
- * @return \Illuminate\Filesystem\Filesystem
- */
- public function getFilesystem()
- {
- return $this->files;
- }
-
- /**
- * Get the working directory of the cache.
- *
- * @return string
- */
- public function getDirectory()
- {
- return $this->directory;
- }
-
- /**
- * Get the cache key prefix.
- *
- * @return string
- */
- public function getPrefix()
- {
- return '';
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Lock.php b/vendor/laravel/framework/src/Illuminate/Cache/Lock.php
deleted file mode 100644
index f117246..0000000
--- a/vendor/laravel/framework/src/Illuminate/Cache/Lock.php
+++ /dev/null
@@ -1,102 +0,0 @@
-name = $name;
- $this->seconds = $seconds;
- }
-
- /**
- * Attempt to acquire the lock.
- *
- * @return bool
- */
- abstract public function acquire();
-
- /**
- * Release the lock.
- *
- * @return void
- */
- abstract public function release();
-
- /**
- * Attempt to acquire the lock.
- *
- * @param callable|null $callback
- * @return bool
- */
- public function get($callback = null)
- {
- $result = $this->acquire();
-
- if ($result && is_callable($callback)) {
- return tap($callback(), function () {
- $this->release();
- });
- }
-
- return $result;
- }
-
- /**
- * Attempt to acquire the lock for the given number of seconds.
- *
- * @param int $seconds
- * @param callable|null $callback
- * @return bool
- *
- * @throws \Illuminate\Contracts\Cache\LockTimeoutException
- */
- public function block($seconds, $callback = null)
- {
- $starting = $this->currentTime();
-
- while (! $this->acquire()) {
- usleep(250 * 1000);
-
- if ($this->currentTime() - $seconds >= $starting) {
- throw new LockTimeoutException;
- }
- }
-
- if (is_callable($callback)) {
- return tap($callback(), function () {
- $this->release();
- });
- }
-
- return true;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/MemcachedConnector.php b/vendor/laravel/framework/src/Illuminate/Cache/MemcachedConnector.php
deleted file mode 100755
index 224d940..0000000
--- a/vendor/laravel/framework/src/Illuminate/Cache/MemcachedConnector.php
+++ /dev/null
@@ -1,87 +0,0 @@
-getMemcached(
- $connectionId, $credentials, $options
- );
-
- if (! $memcached->getServerList()) {
- // For each server in the array, we'll just extract the configuration and add
- // the server to the Memcached connection. Once we have added all of these
- // servers we'll verify the connection is successful and return it back.
- foreach ($servers as $server) {
- $memcached->addServer(
- $server['host'], $server['port'], $server['weight']
- );
- }
- }
-
- return $memcached;
- }
-
- /**
- * Get a new Memcached instance.
- *
- * @param string|null $connectionId
- * @param array $credentials
- * @param array $options
- * @return \Memcached
- */
- protected function getMemcached($connectionId, array $credentials, array $options)
- {
- $memcached = $this->createMemcachedInstance($connectionId);
-
- if (count($credentials) === 2) {
- $this->setCredentials($memcached, $credentials);
- }
-
- if (count($options)) {
- $memcached->setOptions($options);
- }
-
- return $memcached;
- }
-
- /**
- * Create the Memcached instance.
- *
- * @param string|null $connectionId
- * @return \Memcached
- */
- protected function createMemcachedInstance($connectionId)
- {
- return empty($connectionId) ? new Memcached : new Memcached($connectionId);
- }
-
- /**
- * Set the SASL credentials on the Memcached connection.
- *
- * @param \Memcached $memcached
- * @param array $credentials
- * @return void
- */
- protected function setCredentials($memcached, $credentials)
- {
- [$username, $password] = $credentials;
-
- $memcached->setOption(Memcached::OPT_BINARY_PROTOCOL, true);
-
- $memcached->setSaslAuthData($username, $password);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/MemcachedLock.php b/vendor/laravel/framework/src/Illuminate/Cache/MemcachedLock.php
deleted file mode 100644
index c0db841..0000000
--- a/vendor/laravel/framework/src/Illuminate/Cache/MemcachedLock.php
+++ /dev/null
@@ -1,50 +0,0 @@
-memcached = $memcached;
- }
-
- /**
- * Attempt to acquire the lock.
- *
- * @return bool
- */
- public function acquire()
- {
- return $this->memcached->add(
- $this->name, 1, $this->seconds
- );
- }
-
- /**
- * Release the lock.
- *
- * @return void
- */
- public function release()
- {
- $this->memcached->delete($this->name);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/MemcachedStore.php b/vendor/laravel/framework/src/Illuminate/Cache/MemcachedStore.php
deleted file mode 100755
index 0d2d8c0..0000000
--- a/vendor/laravel/framework/src/Illuminate/Cache/MemcachedStore.php
+++ /dev/null
@@ -1,274 +0,0 @@
-= 3.0.0.
- *
- * @var bool
- */
- protected $onVersionThree;
-
- /**
- * Create a new Memcached store.
- *
- * @param \Memcached $memcached
- * @param string $prefix
- * @return void
- */
- public function __construct($memcached, $prefix = '')
- {
- $this->setPrefix($prefix);
- $this->memcached = $memcached;
-
- $this->onVersionThree = (new ReflectionMethod('Memcached', 'getMulti'))
- ->getNumberOfParameters() == 2;
- }
-
- /**
- * Retrieve an item from the cache by key.
- *
- * @param string $key
- * @return mixed
- */
- public function get($key)
- {
- $value = $this->memcached->get($this->prefix.$key);
-
- if ($this->memcached->getResultCode() == 0) {
- return $value;
- }
- }
-
- /**
- * Retrieve multiple items from the cache by key.
- *
- * Items not found in the cache will have a null value.
- *
- * @param array $keys
- * @return array
- */
- public function many(array $keys)
- {
- $prefixedKeys = array_map(function ($key) {
- return $this->prefix.$key;
- }, $keys);
-
- if ($this->onVersionThree) {
- $values = $this->memcached->getMulti($prefixedKeys, Memcached::GET_PRESERVE_ORDER);
- } else {
- $null = null;
-
- $values = $this->memcached->getMulti($prefixedKeys, $null, Memcached::GET_PRESERVE_ORDER);
- }
-
- if ($this->memcached->getResultCode() != 0) {
- return array_fill_keys($keys, null);
- }
-
- return array_combine($keys, $values);
- }
-
- /**
- * Store an item in the cache for a given number of minutes.
- *
- * @param string $key
- * @param mixed $value
- * @param float|int $minutes
- * @return void
- */
- public function put($key, $value, $minutes)
- {
- $this->memcached->set(
- $this->prefix.$key, $value, $this->calculateExpiration($minutes)
- );
- }
-
- /**
- * Store multiple items in the cache for a given number of minutes.
- *
- * @param array $values
- * @param float|int $minutes
- * @return void
- */
- public function putMany(array $values, $minutes)
- {
- $prefixedValues = [];
-
- foreach ($values as $key => $value) {
- $prefixedValues[$this->prefix.$key] = $value;
- }
-
- $this->memcached->setMulti(
- $prefixedValues, $this->calculateExpiration($minutes)
- );
- }
-
- /**
- * Store an item in the cache if the key doesn't exist.
- *
- * @param string $key
- * @param mixed $value
- * @param float|int $minutes
- * @return bool
- */
- public function add($key, $value, $minutes)
- {
- return $this->memcached->add(
- $this->prefix.$key, $value, $this->calculateExpiration($minutes)
- );
- }
-
- /**
- * Increment the value of an item in the cache.
- *
- * @param string $key
- * @param mixed $value
- * @return int|bool
- */
- public function increment($key, $value = 1)
- {
- return $this->memcached->increment($this->prefix.$key, $value);
- }
-
- /**
- * Decrement the value of an item in the cache.
- *
- * @param string $key
- * @param mixed $value
- * @return int|bool
- */
- public function decrement($key, $value = 1)
- {
- return $this->memcached->decrement($this->prefix.$key, $value);
- }
-
- /**
- * Store an item in the cache indefinitely.
- *
- * @param string $key
- * @param mixed $value
- * @return void
- */
- public function forever($key, $value)
- {
- $this->put($key, $value, 0);
- }
-
- /**
- * Get a lock instance.
- *
- * @param string $name
- * @param int $seconds
- * @return \Illuminate\Contracts\Cache\Lock
- */
- public function lock($name, $seconds = 0)
- {
- return new MemcachedLock($this->memcached, $this->prefix.$name, $seconds);
- }
-
- /**
- * Remove an item from the cache.
- *
- * @param string $key
- * @return bool
- */
- public function forget($key)
- {
- return $this->memcached->delete($this->prefix.$key);
- }
-
- /**
- * Remove all items from the cache.
- *
- * @return bool
- */
- public function flush()
- {
- return $this->memcached->flush();
- }
-
- /**
- * Get the expiration time of the key.
- *
- * @param int $minutes
- * @return int
- */
- protected function calculateExpiration($minutes)
- {
- return $this->toTimestamp($minutes);
- }
-
- /**
- * Get the UNIX timestamp for the given number of minutes.
- *
- * @param int $minutes
- * @return int
- */
- protected function toTimestamp($minutes)
- {
- return $minutes > 0 ? $this->availableAt($minutes * 60) : 0;
- }
-
- /**
- * Get the underlying Memcached connection.
- *
- * @return \Memcached
- */
- public function getMemcached()
- {
- return $this->memcached;
- }
-
- /**
- * Get the cache key prefix.
- *
- * @return string
- */
- public function getPrefix()
- {
- return $this->prefix;
- }
-
- /**
- * Set the cache key prefix.
- *
- * @param string $prefix
- * @return void
- */
- public function setPrefix($prefix)
- {
- $this->prefix = ! empty($prefix) ? $prefix.':' : '';
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/NullStore.php b/vendor/laravel/framework/src/Illuminate/Cache/NullStore.php
deleted file mode 100755
index 16e869c..0000000
--- a/vendor/laravel/framework/src/Illuminate/Cache/NullStore.php
+++ /dev/null
@@ -1,108 +0,0 @@
-cache = $cache;
- }
-
- /**
- * Determine if the given key has been "accessed" too many times.
- *
- * @param string $key
- * @param int $maxAttempts
- * @return bool
- */
- public function tooManyAttempts($key, $maxAttempts)
- {
- if ($this->attempts($key) >= $maxAttempts) {
- if ($this->cache->has($key.':timer')) {
- return true;
- }
-
- $this->resetAttempts($key);
- }
-
- return false;
- }
-
- /**
- * Increment the counter for a given key for a given decay time.
- *
- * @param string $key
- * @param float|int $decayMinutes
- * @return int
- */
- public function hit($key, $decayMinutes = 1)
- {
- $this->cache->add(
- $key.':timer', $this->availableAt($decayMinutes * 60), $decayMinutes
- );
-
- $added = $this->cache->add($key, 0, $decayMinutes);
-
- $hits = (int) $this->cache->increment($key);
-
- if (! $added && $hits == 1) {
- $this->cache->put($key, 1, $decayMinutes);
- }
-
- return $hits;
- }
-
- /**
- * Get the number of attempts for the given key.
- *
- * @param string $key
- * @return mixed
- */
- public function attempts($key)
- {
- return $this->cache->get($key, 0);
- }
-
- /**
- * Reset the number of attempts for the given key.
- *
- * @param string $key
- * @return mixed
- */
- public function resetAttempts($key)
- {
- return $this->cache->forget($key);
- }
-
- /**
- * Get the number of retries left for the given key.
- *
- * @param string $key
- * @param int $maxAttempts
- * @return int
- */
- public function retriesLeft($key, $maxAttempts)
- {
- $attempts = $this->attempts($key);
-
- return $maxAttempts - $attempts;
- }
-
- /**
- * Clear the hits and lockout timer for the given key.
- *
- * @param string $key
- * @return void
- */
- public function clear($key)
- {
- $this->resetAttempts($key);
-
- $this->cache->forget($key.':timer');
- }
-
- /**
- * Get the number of seconds until the "key" is accessible again.
- *
- * @param string $key
- * @return int
- */
- public function availableIn($key)
- {
- return $this->cache->get($key.':timer') - $this->currentTime();
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/RedisLock.php b/vendor/laravel/framework/src/Illuminate/Cache/RedisLock.php
deleted file mode 100644
index 6ce5afe..0000000
--- a/vendor/laravel/framework/src/Illuminate/Cache/RedisLock.php
+++ /dev/null
@@ -1,54 +0,0 @@
-redis = $redis;
- }
-
- /**
- * Attempt to acquire the lock.
- *
- * @return bool
- */
- public function acquire()
- {
- $result = $this->redis->setnx($this->name, 1);
-
- if ($result === 1 && $this->seconds > 0) {
- $this->redis->expire($this->name, $this->seconds);
- }
-
- return $result === 1;
- }
-
- /**
- * Release the lock.
- *
- * @return void
- */
- public function release()
- {
- $this->redis->del($this->name);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php b/vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php
deleted file mode 100755
index b448e46..0000000
--- a/vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php
+++ /dev/null
@@ -1,289 +0,0 @@
-redis = $redis;
- $this->setPrefix($prefix);
- $this->setConnection($connection);
- }
-
- /**
- * Retrieve an item from the cache by key.
- *
- * @param string|array $key
- * @return mixed
- */
- public function get($key)
- {
- $value = $this->connection()->get($this->prefix.$key);
-
- return ! is_null($value) ? $this->unserialize($value) : null;
- }
-
- /**
- * Retrieve multiple items from the cache by key.
- *
- * Items not found in the cache will have a null value.
- *
- * @param array $keys
- * @return array
- */
- public function many(array $keys)
- {
- $results = [];
-
- $values = $this->connection()->mget(array_map(function ($key) {
- return $this->prefix.$key;
- }, $keys));
-
- foreach ($values as $index => $value) {
- $results[$keys[$index]] = ! is_null($value) ? $this->unserialize($value) : null;
- }
-
- return $results;
- }
-
- /**
- * Store an item in the cache for a given number of minutes.
- *
- * @param string $key
- * @param mixed $value
- * @param float|int $minutes
- * @return void
- */
- public function put($key, $value, $minutes)
- {
- $this->connection()->setex(
- $this->prefix.$key, (int) max(1, $minutes * 60), $this->serialize($value)
- );
- }
-
- /**
- * Store multiple items in the cache for a given number of minutes.
- *
- * @param array $values
- * @param float|int $minutes
- * @return void
- */
- public function putMany(array $values, $minutes)
- {
- $this->connection()->multi();
-
- foreach ($values as $key => $value) {
- $this->put($key, $value, $minutes);
- }
-
- $this->connection()->exec();
- }
-
- /**
- * Store an item in the cache if the key doesn't exist.
- *
- * @param string $key
- * @param mixed $value
- * @param float|int $minutes
- * @return bool
- */
- public function add($key, $value, $minutes)
- {
- $lua = "return redis.call('exists',KEYS[1])<1 and redis.call('setex',KEYS[1],ARGV[2],ARGV[1])";
-
- return (bool) $this->connection()->eval(
- $lua, 1, $this->prefix.$key, $this->serialize($value), (int) max(1, $minutes * 60)
- );
- }
-
- /**
- * Increment the value of an item in the cache.
- *
- * @param string $key
- * @param mixed $value
- * @return int
- */
- public function increment($key, $value = 1)
- {
- return $this->connection()->incrby($this->prefix.$key, $value);
- }
-
- /**
- * Decrement the value of an item in the cache.
- *
- * @param string $key
- * @param mixed $value
- * @return int
- */
- public function decrement($key, $value = 1)
- {
- return $this->connection()->decrby($this->prefix.$key, $value);
- }
-
- /**
- * Store an item in the cache indefinitely.
- *
- * @param string $key
- * @param mixed $value
- * @return void
- */
- public function forever($key, $value)
- {
- $this->connection()->set($this->prefix.$key, $this->serialize($value));
- }
-
- /**
- * Get a lock instance.
- *
- * @param string $name
- * @param int $seconds
- * @return \Illuminate\Contracts\Cache\Lock
- */
- public function lock($name, $seconds = 0)
- {
- return new RedisLock($this->connection(), $this->prefix.$name, $seconds);
- }
-
- /**
- * Remove an item from the cache.
- *
- * @param string $key
- * @return bool
- */
- public function forget($key)
- {
- return (bool) $this->connection()->del($this->prefix.$key);
- }
-
- /**
- * Remove all items from the cache.
- *
- * @return bool
- */
- public function flush()
- {
- $this->connection()->flushdb();
-
- return true;
- }
-
- /**
- * Begin executing a new tags operation.
- *
- * @param array|mixed $names
- * @return \Illuminate\Cache\RedisTaggedCache
- */
- public function tags($names)
- {
- return new RedisTaggedCache(
- $this, new TagSet($this, is_array($names) ? $names : func_get_args())
- );
- }
-
- /**
- * Get the Redis connection instance.
- *
- * @return \Predis\ClientInterface
- */
- public function connection()
- {
- return $this->redis->connection($this->connection);
- }
-
- /**
- * Set the connection name to be used.
- *
- * @param string $connection
- * @return void
- */
- public function setConnection($connection)
- {
- $this->connection = $connection;
- }
-
- /**
- * Get the Redis database instance.
- *
- * @return \Illuminate\Contracts\Redis\Factory
- */
- public function getRedis()
- {
- return $this->redis;
- }
-
- /**
- * Get the cache key prefix.
- *
- * @return string
- */
- public function getPrefix()
- {
- return $this->prefix;
- }
-
- /**
- * Set the cache key prefix.
- *
- * @param string $prefix
- * @return void
- */
- public function setPrefix($prefix)
- {
- $this->prefix = ! empty($prefix) ? $prefix.':' : '';
- }
-
- /**
- * Serialize the value.
- *
- * @param mixed $value
- * @return mixed
- */
- protected function serialize($value)
- {
- return is_numeric($value) ? $value : serialize($value);
- }
-
- /**
- * Unserialize the value.
- *
- * @param mixed $value
- * @return mixed
- */
- protected function unserialize($value)
- {
- return is_numeric($value) ? $value : unserialize($value);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/RedisTaggedCache.php b/vendor/laravel/framework/src/Illuminate/Cache/RedisTaggedCache.php
deleted file mode 100644
index 7a28d82..0000000
--- a/vendor/laravel/framework/src/Illuminate/Cache/RedisTaggedCache.php
+++ /dev/null
@@ -1,194 +0,0 @@
-pushStandardKeys($this->tags->getNamespace(), $key);
-
- parent::put($key, $value, $minutes);
- }
-
- /**
- * Increment the value of an item in the cache.
- *
- * @param string $key
- * @param mixed $value
- * @return void
- */
- public function increment($key, $value = 1)
- {
- $this->pushStandardKeys($this->tags->getNamespace(), $key);
-
- parent::increment($key, $value);
- }
-
- /**
- * Decrement the value of an item in the cache.
- *
- * @param string $key
- * @param mixed $value
- * @return void
- */
- public function decrement($key, $value = 1)
- {
- $this->pushStandardKeys($this->tags->getNamespace(), $key);
-
- parent::decrement($key, $value);
- }
-
- /**
- * Store an item in the cache indefinitely.
- *
- * @param string $key
- * @param mixed $value
- * @return void
- */
- public function forever($key, $value)
- {
- $this->pushForeverKeys($this->tags->getNamespace(), $key);
-
- parent::forever($key, $value);
- }
-
- /**
- * Remove all items from the cache.
- *
- * @return bool
- */
- public function flush()
- {
- $this->deleteForeverKeys();
- $this->deleteStandardKeys();
-
- return parent::flush();
- }
-
- /**
- * Store standard key references into store.
- *
- * @param string $namespace
- * @param string $key
- * @return void
- */
- protected function pushStandardKeys($namespace, $key)
- {
- $this->pushKeys($namespace, $key, self::REFERENCE_KEY_STANDARD);
- }
-
- /**
- * Store forever key references into store.
- *
- * @param string $namespace
- * @param string $key
- * @return void
- */
- protected function pushForeverKeys($namespace, $key)
- {
- $this->pushKeys($namespace, $key, self::REFERENCE_KEY_FOREVER);
- }
-
- /**
- * Store a reference to the cache key against the reference key.
- *
- * @param string $namespace
- * @param string $key
- * @param string $reference
- * @return void
- */
- protected function pushKeys($namespace, $key, $reference)
- {
- $fullKey = $this->store->getPrefix().sha1($namespace).':'.$key;
-
- foreach (explode('|', $namespace) as $segment) {
- $this->store->connection()->sadd($this->referenceKey($segment, $reference), $fullKey);
- }
- }
-
- /**
- * Delete all of the items that were stored forever.
- *
- * @return void
- */
- protected function deleteForeverKeys()
- {
- $this->deleteKeysByReference(self::REFERENCE_KEY_FOREVER);
- }
-
- /**
- * Delete all standard items.
- *
- * @return void
- */
- protected function deleteStandardKeys()
- {
- $this->deleteKeysByReference(self::REFERENCE_KEY_STANDARD);
- }
-
- /**
- * Find and delete all of the items that were stored against a reference.
- *
- * @param string $reference
- * @return void
- */
- protected function deleteKeysByReference($reference)
- {
- foreach (explode('|', $this->tags->getNamespace()) as $segment) {
- $this->deleteValues($segment = $this->referenceKey($segment, $reference));
-
- $this->store->connection()->del($segment);
- }
- }
-
- /**
- * Delete item keys that have been stored against a reference.
- *
- * @param string $referenceKey
- * @return void
- */
- protected function deleteValues($referenceKey)
- {
- $values = array_unique($this->store->connection()->smembers($referenceKey));
-
- if (count($values) > 0) {
- foreach (array_chunk($values, 1000) as $valuesChunk) {
- call_user_func_array([$this->store->connection(), 'del'], $valuesChunk);
- }
- }
- }
-
- /**
- * Get the reference key for the segment.
- *
- * @param string $segment
- * @param string $suffix
- * @return string
- */
- protected function referenceKey($segment, $suffix)
- {
- return $this->store->getPrefix().$segment.':'.$suffix;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Repository.php b/vendor/laravel/framework/src/Illuminate/Cache/Repository.php
deleted file mode 100755
index afb0d2e..0000000
--- a/vendor/laravel/framework/src/Illuminate/Cache/Repository.php
+++ /dev/null
@@ -1,599 +0,0 @@
-store = $store;
- }
-
- /**
- * Determine if an item exists in the cache.
- *
- * @param string $key
- * @return bool
- */
- public function has($key)
- {
- return ! is_null($this->get($key));
- }
-
- /**
- * Determine if an item doesn't exist in the cache.
- *
- * @param string $key
- * @return bool
- */
- public function missing($key)
- {
- return ! $this->has($key);
- }
-
- /**
- * Retrieve an item from the cache by key.
- *
- * @param string $key
- * @param mixed $default
- * @return mixed
- */
- public function get($key, $default = null)
- {
- if (is_array($key)) {
- return $this->many($key);
- }
-
- $value = $this->store->get($this->itemKey($key));
-
- // If we could not find the cache value, we will fire the missed event and get
- // the default value for this cache value. This default could be a callback
- // so we will execute the value function which will resolve it if needed.
- if (is_null($value)) {
- $this->event(new CacheMissed($key));
-
- $value = value($default);
- } else {
- $this->event(new CacheHit($key, $value));
- }
-
- return $value;
- }
-
- /**
- * Retrieve multiple items from the cache by key.
- *
- * Items not found in the cache will have a null value.
- *
- * @param array $keys
- * @return array
- */
- public function many(array $keys)
- {
- $values = $this->store->many(collect($keys)->map(function ($value, $key) {
- return is_string($key) ? $key : $value;
- })->values()->all());
-
- return collect($values)->map(function ($value, $key) use ($keys) {
- return $this->handleManyResult($keys, $key, $value);
- })->all();
- }
-
- /**
- * {@inheritdoc}
- */
- public function getMultiple($keys, $default = null)
- {
- if (is_null($default)) {
- return $this->many($keys);
- }
-
- foreach ($keys as $key) {
- if (! isset($default[$key])) {
- $default[$key] = null;
- }
- }
-
- return $this->many($default);
- }
-
- /**
- * Handle a result for the "many" method.
- *
- * @param array $keys
- * @param string $key
- * @param mixed $value
- * @return mixed
- */
- protected function handleManyResult($keys, $key, $value)
- {
- // If we could not find the cache value, we will fire the missed event and get
- // the default value for this cache value. This default could be a callback
- // so we will execute the value function which will resolve it if needed.
- if (is_null($value)) {
- $this->event(new CacheMissed($key));
-
- return isset($keys[$key]) ? value($keys[$key]) : null;
- }
-
- // If we found a valid value we will fire the "hit" event and return the value
- // back from this function. The "hit" event gives developers an opportunity
- // to listen for every possible cache "hit" throughout this applications.
- $this->event(new CacheHit($key, $value));
-
- return $value;
- }
-
- /**
- * Retrieve an item from the cache and delete it.
- *
- * @param string $key
- * @param mixed $default
- * @return mixed
- */
- public function pull($key, $default = null)
- {
- return tap($this->get($key, $default), function () use ($key) {
- $this->forget($key);
- });
- }
-
- /**
- * Store an item in the cache.
- *
- * @param string $key
- * @param mixed $value
- * @param \DateTimeInterface|\DateInterval|float|int|null $minutes
- * @return void
- */
- public function put($key, $value, $minutes = null)
- {
- if (is_array($key)) {
- $this->putMany($key, $value);
-
- return;
- }
-
- if (! is_null($minutes = $this->getMinutes($minutes))) {
- $this->store->put($this->itemKey($key), $value, $minutes);
-
- $this->event(new KeyWritten($key, $value, $minutes));
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function set($key, $value, $ttl = null)
- {
- $this->put($key, $value, $ttl);
- }
-
- /**
- * Store multiple items in the cache for a given number of minutes.
- *
- * @param array $values
- * @param \DateTimeInterface|\DateInterval|float|int $minutes
- * @return void
- */
- public function putMany(array $values, $minutes)
- {
- if (! is_null($minutes = $this->getMinutes($minutes))) {
- $this->store->putMany($values, $minutes);
-
- foreach ($values as $key => $value) {
- $this->event(new KeyWritten($key, $value, $minutes));
- }
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function setMultiple($values, $ttl = null)
- {
- $this->putMany($values, $ttl);
- }
-
- /**
- * Store an item in the cache if the key does not exist.
- *
- * @param string $key
- * @param mixed $value
- * @param \DateTimeInterface|\DateInterval|float|int $minutes
- * @return bool
- */
- public function add($key, $value, $minutes)
- {
- if (is_null($minutes = $this->getMinutes($minutes))) {
- return false;
- }
-
- // If the store has an "add" method we will call the method on the store so it
- // has a chance to override this logic. Some drivers better support the way
- // this operation should work with a total "atomic" implementation of it.
- if (method_exists($this->store, 'add')) {
- return $this->store->add(
- $this->itemKey($key), $value, $minutes
- );
- }
-
- // If the value did not exist in the cache, we will put the value in the cache
- // so it exists for subsequent requests. Then, we will return true so it is
- // easy to know if the value gets added. Otherwise, we will return false.
- if (is_null($this->get($key))) {
- $this->put($key, $value, $minutes);
-
- return true;
- }
-
- return false;
- }
-
- /**
- * Increment the value of an item in the cache.
- *
- * @param string $key
- * @param mixed $value
- * @return int|bool
- */
- public function increment($key, $value = 1)
- {
- return $this->store->increment($key, $value);
- }
-
- /**
- * Decrement the value of an item in the cache.
- *
- * @param string $key
- * @param mixed $value
- * @return int|bool
- */
- public function decrement($key, $value = 1)
- {
- return $this->store->decrement($key, $value);
- }
-
- /**
- * Store an item in the cache indefinitely.
- *
- * @param string $key
- * @param mixed $value
- * @return void
- */
- public function forever($key, $value)
- {
- $this->store->forever($this->itemKey($key), $value);
-
- $this->event(new KeyWritten($key, $value, 0));
- }
-
- /**
- * Get an item from the cache, or execute the given Closure and store the result.
- *
- * @param string $key
- * @param \DateTimeInterface|\DateInterval|float|int $minutes
- * @param \Closure $callback
- * @return mixed
- */
- public function remember($key, $minutes, Closure $callback)
- {
- $value = $this->get($key);
-
- // If the item exists in the cache we will just return this immediately and if
- // not we will execute the given Closure and cache the result of that for a
- // given number of minutes so it's available for all subsequent requests.
- if (! is_null($value)) {
- return $value;
- }
-
- $this->put($key, $value = $callback(), $minutes);
-
- return $value;
- }
-
- /**
- * Get an item from the cache, or execute the given Closure and store the result forever.
- *
- * @param string $key
- * @param \Closure $callback
- * @return mixed
- */
- public function sear($key, Closure $callback)
- {
- return $this->rememberForever($key, $callback);
- }
-
- /**
- * Get an item from the cache, or execute the given Closure and store the result forever.
- *
- * @param string $key
- * @param \Closure $callback
- * @return mixed
- */
- public function rememberForever($key, Closure $callback)
- {
- $value = $this->get($key);
-
- // If the item exists in the cache we will just return this immediately and if
- // not we will execute the given Closure and cache the result of that for a
- // given number of minutes so it's available for all subsequent requests.
- if (! is_null($value)) {
- return $value;
- }
-
- $this->forever($key, $value = $callback());
-
- return $value;
- }
-
- /**
- * Remove an item from the cache.
- *
- * @param string $key
- * @return bool
- */
- public function forget($key)
- {
- return tap($this->store->forget($this->itemKey($key)), function () use ($key) {
- $this->event(new KeyForgotten($key));
- });
- }
-
- /**
- * {@inheritdoc}
- */
- public function delete($key)
- {
- return $this->forget($key);
- }
-
- /**
- * {@inheritdoc}
- */
- public function deleteMultiple($keys)
- {
- foreach ($keys as $key) {
- $this->forget($key);
- }
-
- return true;
- }
-
- /**
- * {@inheritdoc}
- */
- public function clear()
- {
- return $this->store->flush();
- }
-
- /**
- * Begin executing a new tags operation if the store supports it.
- *
- * @param array|mixed $names
- * @return \Illuminate\Cache\TaggedCache
- *
- * @throws \BadMethodCallException
- */
- public function tags($names)
- {
- if (! method_exists($this->store, 'tags')) {
- throw new BadMethodCallException('This cache store does not support tagging.');
- }
-
- $cache = $this->store->tags(is_array($names) ? $names : func_get_args());
-
- if (! is_null($this->events)) {
- $cache->setEventDispatcher($this->events);
- }
-
- return $cache->setDefaultCacheTime($this->default);
- }
-
- /**
- * Format the key for a cache item.
- *
- * @param string $key
- * @return string
- */
- protected function itemKey($key)
- {
- return $key;
- }
-
- /**
- * Get the default cache time.
- *
- * @return float|int
- */
- public function getDefaultCacheTime()
- {
- return $this->default;
- }
-
- /**
- * Set the default cache time in minutes.
- *
- * @param float|int $minutes
- * @return $this
- */
- public function setDefaultCacheTime($minutes)
- {
- $this->default = $minutes;
-
- return $this;
- }
-
- /**
- * Get the cache store implementation.
- *
- * @return \Illuminate\Contracts\Cache\Store
- */
- public function getStore()
- {
- return $this->store;
- }
-
- /**
- * Fire an event for this cache instance.
- *
- * @param string $event
- * @return void
- */
- protected function event($event)
- {
- if (isset($this->events)) {
- $this->events->dispatch($event);
- }
- }
-
- /**
- * Set the event dispatcher instance.
- *
- * @param \Illuminate\Contracts\Events\Dispatcher $events
- * @return void
- */
- public function setEventDispatcher(Dispatcher $events)
- {
- $this->events = $events;
- }
-
- /**
- * Determine if a cached value exists.
- *
- * @param string $key
- * @return bool
- */
- public function offsetExists($key)
- {
- return $this->has($key);
- }
-
- /**
- * Retrieve an item from the cache by key.
- *
- * @param string $key
- * @return mixed
- */
- public function offsetGet($key)
- {
- return $this->get($key);
- }
-
- /**
- * Store an item in the cache for the default time.
- *
- * @param string $key
- * @param mixed $value
- * @return void
- */
- public function offsetSet($key, $value)
- {
- $this->put($key, $value, $this->default);
- }
-
- /**
- * Remove an item from the cache.
- *
- * @param string $key
- * @return void
- */
- public function offsetUnset($key)
- {
- $this->forget($key);
- }
-
- /**
- * Calculate the number of minutes with the given duration.
- *
- * @param \DateTimeInterface|\DateInterval|float|int $duration
- * @return float|int|null
- */
- protected function getMinutes($duration)
- {
- $duration = $this->parseDateInterval($duration);
-
- if ($duration instanceof DateTimeInterface) {
- $duration = Carbon::now()->diffInRealSeconds($duration, false) / 60;
- }
-
- return (int) ($duration * 60) > 0 ? $duration : null;
- }
-
- /**
- * Handle dynamic calls into macros or pass missing methods to the store.
- *
- * @param string $method
- * @param array $parameters
- * @return mixed
- */
- public function __call($method, $parameters)
- {
- if (static::hasMacro($method)) {
- return $this->macroCall($method, $parameters);
- }
-
- return $this->store->$method(...$parameters);
- }
-
- /**
- * Clone cache repository instance.
- *
- * @return void
- */
- public function __clone()
- {
- $this->store = clone $this->store;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/RetrievesMultipleKeys.php b/vendor/laravel/framework/src/Illuminate/Cache/RetrievesMultipleKeys.php
deleted file mode 100644
index 4d46797..0000000
--- a/vendor/laravel/framework/src/Illuminate/Cache/RetrievesMultipleKeys.php
+++ /dev/null
@@ -1,39 +0,0 @@
-get($key);
- }
-
- return $return;
- }
-
- /**
- * Store multiple items in the cache for a given number of minutes.
- *
- * @param array $values
- * @param float|int $minutes
- * @return void
- */
- public function putMany(array $values, $minutes)
- {
- foreach ($values as $key => $value) {
- $this->put($key, $value, $minutes);
- }
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/TagSet.php b/vendor/laravel/framework/src/Illuminate/Cache/TagSet.php
deleted file mode 100644
index 214d648..0000000
--- a/vendor/laravel/framework/src/Illuminate/Cache/TagSet.php
+++ /dev/null
@@ -1,110 +0,0 @@
-store = $store;
- $this->names = $names;
- }
-
- /**
- * Reset all tags in the set.
- *
- * @return void
- */
- public function reset()
- {
- array_walk($this->names, [$this, 'resetTag']);
- }
-
- /**
- * Reset the tag and return the new tag identifier.
- *
- * @param string $name
- * @return string
- */
- public function resetTag($name)
- {
- $this->store->forever($this->tagKey($name), $id = str_replace('.', '', uniqid('', true)));
-
- return $id;
- }
-
- /**
- * Get a unique namespace that changes when any of the tags are flushed.
- *
- * @return string
- */
- public function getNamespace()
- {
- return implode('|', $this->tagIds());
- }
-
- /**
- * Get an array of tag identifiers for all of the tags in the set.
- *
- * @return array
- */
- protected function tagIds()
- {
- return array_map([$this, 'tagId'], $this->names);
- }
-
- /**
- * Get the unique tag identifier for a given tag.
- *
- * @param string $name
- * @return string
- */
- public function tagId($name)
- {
- return $this->store->get($this->tagKey($name)) ?: $this->resetTag($name);
- }
-
- /**
- * Get the tag identifier key for a given tag.
- *
- * @param string $name
- * @return string
- */
- public function tagKey($name)
- {
- return 'tag:'.$name.':key';
- }
-
- /**
- * Get all of the tag names in the set.
- *
- * @return array
- */
- public function getNames()
- {
- return $this->names;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/TaggableStore.php b/vendor/laravel/framework/src/Illuminate/Cache/TaggableStore.php
deleted file mode 100644
index ba00fa4..0000000
--- a/vendor/laravel/framework/src/Illuminate/Cache/TaggableStore.php
+++ /dev/null
@@ -1,17 +0,0 @@
-tags = $tags;
- }
-
- /**
- * Increment the value of an item in the cache.
- *
- * @param string $key
- * @param mixed $value
- * @return void
- */
- public function increment($key, $value = 1)
- {
- $this->store->increment($this->itemKey($key), $value);
- }
-
- /**
- * Decrement the value of an item in the cache.
- *
- * @param string $key
- * @param mixed $value
- * @return void
- */
- public function decrement($key, $value = 1)
- {
- $this->store->decrement($this->itemKey($key), $value);
- }
-
- /**
- * Remove all items from the cache.
- *
- * @return bool
- */
- public function flush()
- {
- $this->tags->reset();
-
- return true;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function itemKey($key)
- {
- return $this->taggedItemKey($key);
- }
-
- /**
- * Get a fully qualified key for a tagged item.
- *
- * @param string $key
- * @return string
- */
- public function taggedItemKey($key)
- {
- return sha1($this->tags->getNamespace()).':'.$key;
- }
-
- /**
- * Fire an event for this cache instance.
- *
- * @param string $event
- * @return void
- */
- protected function event($event)
- {
- parent::event($event->setTags($this->tags->getNames()));
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Cache/composer.json b/vendor/laravel/framework/src/Illuminate/Cache/composer.json
deleted file mode 100755
index a461242..0000000
--- a/vendor/laravel/framework/src/Illuminate/Cache/composer.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "name": "illuminate/cache",
- "description": "The Illuminate Cache package.",
- "license": "MIT",
- "homepage": "https://laravel.com",
- "support": {
- "issues": "https://github.com/laravel/framework/issues",
- "source": "https://github.com/laravel/framework"
- },
- "authors": [
- {
- "name": "Taylor Otwell",
- "email": "taylor@laravel.com"
- }
- ],
- "require": {
- "php": "^7.1.3",
- "illuminate/contracts": "5.7.*",
- "illuminate/support": "5.7.*"
- },
- "autoload": {
- "psr-4": {
- "Illuminate\\Cache\\": ""
- }
- },
- "extra": {
- "branch-alias": {
- "dev-master": "5.7-dev"
- }
- },
- "suggest": {
- "illuminate/database": "Required to use the database cache driver (5.7.*).",
- "illuminate/filesystem": "Required to use the file cache driver (5.7.*).",
- "illuminate/redis": "Required to use the redis cache driver (5.7.*)."
- },
- "config": {
- "sort-packages": true
- },
- "minimum-stability": "dev"
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Config/Repository.php b/vendor/laravel/framework/src/Illuminate/Config/Repository.php
deleted file mode 100644
index cadcd64..0000000
--- a/vendor/laravel/framework/src/Illuminate/Config/Repository.php
+++ /dev/null
@@ -1,179 +0,0 @@
-items = $items;
- }
-
- /**
- * Determine if the given configuration value exists.
- *
- * @param string $key
- * @return bool
- */
- public function has($key)
- {
- return Arr::has($this->items, $key);
- }
-
- /**
- * Get the specified configuration value.
- *
- * @param array|string $key
- * @param mixed $default
- * @return mixed
- */
- public function get($key, $default = null)
- {
- if (is_array($key)) {
- return $this->getMany($key);
- }
-
- return Arr::get($this->items, $key, $default);
- }
-
- /**
- * Get many configuration values.
- *
- * @param array $keys
- * @return array
- */
- public function getMany($keys)
- {
- $config = [];
-
- foreach ($keys as $key => $default) {
- if (is_numeric($key)) {
- [$key, $default] = [$default, null];
- }
-
- $config[$key] = Arr::get($this->items, $key, $default);
- }
-
- return $config;
- }
-
- /**
- * Set a given configuration value.
- *
- * @param array|string $key
- * @param mixed $value
- * @return void
- */
- public function set($key, $value = null)
- {
- $keys = is_array($key) ? $key : [$key => $value];
-
- foreach ($keys as $key => $value) {
- Arr::set($this->items, $key, $value);
- }
- }
-
- /**
- * Prepend a value onto an array configuration value.
- *
- * @param string $key
- * @param mixed $value
- * @return void
- */
- public function prepend($key, $value)
- {
- $array = $this->get($key);
-
- array_unshift($array, $value);
-
- $this->set($key, $array);
- }
-
- /**
- * Push a value onto an array configuration value.
- *
- * @param string $key
- * @param mixed $value
- * @return void
- */
- public function push($key, $value)
- {
- $array = $this->get($key);
-
- $array[] = $value;
-
- $this->set($key, $array);
- }
-
- /**
- * Get all of the configuration items for the application.
- *
- * @return array
- */
- public function all()
- {
- return $this->items;
- }
-
- /**
- * Determine if the given configuration option exists.
- *
- * @param string $key
- * @return bool
- */
- public function offsetExists($key)
- {
- return $this->has($key);
- }
-
- /**
- * Get a configuration option.
- *
- * @param string $key
- * @return mixed
- */
- public function offsetGet($key)
- {
- return $this->get($key);
- }
-
- /**
- * Set a configuration option.
- *
- * @param string $key
- * @param mixed $value
- * @return void
- */
- public function offsetSet($key, $value)
- {
- $this->set($key, $value);
- }
-
- /**
- * Unset a configuration option.
- *
- * @param string $key
- * @return void
- */
- public function offsetUnset($key)
- {
- $this->set($key, null);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Config/composer.json b/vendor/laravel/framework/src/Illuminate/Config/composer.json
deleted file mode 100755
index 1dbdd4b..0000000
--- a/vendor/laravel/framework/src/Illuminate/Config/composer.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "name": "illuminate/config",
- "description": "The Illuminate Config package.",
- "license": "MIT",
- "homepage": "https://laravel.com",
- "support": {
- "issues": "https://github.com/laravel/framework/issues",
- "source": "https://github.com/laravel/framework"
- },
- "authors": [
- {
- "name": "Taylor Otwell",
- "email": "taylor@laravel.com"
- }
- ],
- "require": {
- "php": "^7.1.3",
- "illuminate/contracts": "5.7.*",
- "illuminate/support": "5.7.*"
- },
- "autoload": {
- "psr-4": {
- "Illuminate\\Config\\": ""
- }
- },
- "extra": {
- "branch-alias": {
- "dev-master": "5.7-dev"
- }
- },
- "config": {
- "sort-packages": true
- },
- "minimum-stability": "dev"
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Console/Application.php b/vendor/laravel/framework/src/Illuminate/Console/Application.php
deleted file mode 100755
index f8b9ca4..0000000
--- a/vendor/laravel/framework/src/Illuminate/Console/Application.php
+++ /dev/null
@@ -1,296 +0,0 @@
-laravel = $laravel;
- $this->events = $events;
- $this->setAutoExit(false);
- $this->setCatchExceptions(false);
-
- $this->events->dispatch(new Events\ArtisanStarting($this));
-
- $this->bootstrap();
- }
-
- /**
- * {@inheritdoc}
- */
- public function run(InputInterface $input = null, OutputInterface $output = null)
- {
- $commandName = $this->getCommandName(
- $input = $input ?: new ArgvInput
- );
-
- $this->events->dispatch(
- new Events\CommandStarting(
- $commandName, $input, $output = $output ?: new ConsoleOutput
- )
- );
-
- $exitCode = parent::run($input, $output);
-
- $this->events->dispatch(
- new Events\CommandFinished($commandName, $input, $output, $exitCode)
- );
-
- return $exitCode;
- }
-
- /**
- * Determine the proper PHP executable.
- *
- * @return string
- */
- public static function phpBinary()
- {
- return ProcessUtils::escapeArgument((new PhpExecutableFinder)->find(false));
- }
-
- /**
- * Determine the proper Artisan executable.
- *
- * @return string
- */
- public static function artisanBinary()
- {
- return defined('ARTISAN_BINARY') ? ProcessUtils::escapeArgument(ARTISAN_BINARY) : 'artisan';
- }
-
- /**
- * Format the given command as a fully-qualified executable command.
- *
- * @param string $string
- * @return string
- */
- public static function formatCommandString($string)
- {
- return sprintf('%s %s %s', static::phpBinary(), static::artisanBinary(), $string);
- }
-
- /**
- * Register a console "starting" bootstrapper.
- *
- * @param \Closure $callback
- * @return void
- */
- public static function starting(Closure $callback)
- {
- static::$bootstrappers[] = $callback;
- }
-
- /**
- * Bootstrap the console application.
- *
- * @return void
- */
- protected function bootstrap()
- {
- foreach (static::$bootstrappers as $bootstrapper) {
- $bootstrapper($this);
- }
- }
-
- /**
- * Clear the console application bootstrappers.
- *
- * @return void
- */
- public static function forgetBootstrappers()
- {
- static::$bootstrappers = [];
- }
-
- /**
- * Run an Artisan console command by name.
- *
- * @param string $command
- * @param array $parameters
- * @param \Symfony\Component\Console\Output\OutputInterface|null $outputBuffer
- * @return int
- *
- * @throws \Symfony\Component\Console\Exception\CommandNotFoundException
- */
- public function call($command, array $parameters = [], $outputBuffer = null)
- {
- if (is_subclass_of($command, SymfonyCommand::class)) {
- $command = $this->laravel->make($command)->getName();
- }
-
- if (! $this->has($command)) {
- throw new CommandNotFoundException(sprintf('The command "%s" does not exist.', $command));
- }
-
- array_unshift($parameters, $command);
-
- $this->lastOutput = $outputBuffer ?: new BufferedOutput;
-
- $this->setCatchExceptions(false);
-
- $result = $this->run(new ArrayInput($parameters), $this->lastOutput);
-
- $this->setCatchExceptions(true);
-
- return $result;
- }
-
- /**
- * Get the output for the last run command.
- *
- * @return string
- */
- public function output()
- {
- return $this->lastOutput && method_exists($this->lastOutput, 'fetch')
- ? $this->lastOutput->fetch()
- : '';
- }
-
- /**
- * Add a command to the console.
- *
- * @param \Symfony\Component\Console\Command\Command $command
- * @return \Symfony\Component\Console\Command\Command
- */
- public function add(SymfonyCommand $command)
- {
- if ($command instanceof Command) {
- $command->setLaravel($this->laravel);
- }
-
- return $this->addToParent($command);
- }
-
- /**
- * Add the command to the parent instance.
- *
- * @param \Symfony\Component\Console\Command\Command $command
- * @return \Symfony\Component\Console\Command\Command
- */
- protected function addToParent(SymfonyCommand $command)
- {
- return parent::add($command);
- }
-
- /**
- * Add a command, resolving through the application.
- *
- * @param string $command
- * @return \Symfony\Component\Console\Command\Command
- */
- public function resolve($command)
- {
- return $this->add($this->laravel->make($command));
- }
-
- /**
- * Resolve an array of commands through the application.
- *
- * @param array|mixed $commands
- * @return $this
- */
- public function resolveCommands($commands)
- {
- $commands = is_array($commands) ? $commands : func_get_args();
-
- foreach ($commands as $command) {
- $this->resolve($command);
- }
-
- return $this;
- }
-
- /**
- * Get the default input definition for the application.
- *
- * This is used to add the --env option to every available command.
- *
- * @return \Symfony\Component\Console\Input\InputDefinition
- */
- protected function getDefaultInputDefinition()
- {
- return tap(parent::getDefaultInputDefinition(), function ($definition) {
- $definition->addOption($this->getEnvironmentOption());
- });
- }
-
- /**
- * Get the global environment option for the definition.
- *
- * @return \Symfony\Component\Console\Input\InputOption
- */
- protected function getEnvironmentOption()
- {
- $message = 'The environment the command should run under';
-
- return new InputOption('--env', null, InputOption::VALUE_OPTIONAL, $message);
- }
-
- /**
- * Get the Laravel application instance.
- *
- * @return \Illuminate\Contracts\Foundation\Application
- */
- public function getLaravel()
- {
- return $this->laravel;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Console/Command.php b/vendor/laravel/framework/src/Illuminate/Console/Command.php
deleted file mode 100755
index b35fcf0..0000000
--- a/vendor/laravel/framework/src/Illuminate/Console/Command.php
+++ /dev/null
@@ -1,632 +0,0 @@
- OutputInterface::VERBOSITY_VERBOSE,
- 'vv' => OutputInterface::VERBOSITY_VERY_VERBOSE,
- 'vvv' => OutputInterface::VERBOSITY_DEBUG,
- 'quiet' => OutputInterface::VERBOSITY_QUIET,
- 'normal' => OutputInterface::VERBOSITY_NORMAL,
- ];
-
- /**
- * Create a new console command instance.
- *
- * @return void
- */
- public function __construct()
- {
- // We will go ahead and set the name, description, and parameters on console
- // commands just to make things a little easier on the developer. This is
- // so they don't have to all be manually specified in the constructors.
- if (isset($this->signature)) {
- $this->configureUsingFluentDefinition();
- } else {
- parent::__construct($this->name);
- }
-
- // Once we have constructed the command, we'll set the description and other
- // related properties of the command. If a signature wasn't used to build
- // the command we'll set the arguments and the options on this command.
- $this->setDescription($this->description);
-
- $this->setHidden($this->isHidden());
-
- if (! isset($this->signature)) {
- $this->specifyParameters();
- }
- }
-
- /**
- * Configure the console command using a fluent definition.
- *
- * @return void
- */
- protected function configureUsingFluentDefinition()
- {
- [$name, $arguments, $options] = Parser::parse($this->signature);
-
- parent::__construct($this->name = $name);
-
- // After parsing the signature we will spin through the arguments and options
- // and set them on this command. These will already be changed into proper
- // instances of these "InputArgument" and "InputOption" Symfony classes.
- $this->getDefinition()->addArguments($arguments);
- $this->getDefinition()->addOptions($options);
- }
-
- /**
- * Specify the arguments and options on the command.
- *
- * @return void
- */
- protected function specifyParameters()
- {
- // We will loop through all of the arguments and options for the command and
- // set them all on the base command instance. This specifies what can get
- // passed into these commands as "parameters" to control the execution.
- foreach ($this->getArguments() as $arguments) {
- call_user_func_array([$this, 'addArgument'], $arguments);
- }
-
- foreach ($this->getOptions() as $options) {
- call_user_func_array([$this, 'addOption'], $options);
- }
- }
-
- /**
- * Run the console command.
- *
- * @param \Symfony\Component\Console\Input\InputInterface $input
- * @param \Symfony\Component\Console\Output\OutputInterface $output
- * @return int
- */
- public function run(InputInterface $input, OutputInterface $output)
- {
- $this->output = $this->laravel->make(
- OutputStyle::class, ['input' => $input, 'output' => $output]
- );
-
- return parent::run(
- $this->input = $input, $this->output
- );
- }
-
- /**
- * Execute the console command.
- *
- * @param \Symfony\Component\Console\Input\InputInterface $input
- * @param \Symfony\Component\Console\Output\OutputInterface $output
- * @return mixed
- */
- protected function execute(InputInterface $input, OutputInterface $output)
- {
- return $this->laravel->call([$this, 'handle']);
- }
-
- /**
- * Call another console command.
- *
- * @param string $command
- * @param array $arguments
- * @return int
- */
- public function call($command, array $arguments = [])
- {
- $arguments['command'] = $command;
-
- return $this->getApplication()->find($command)->run(
- $this->createInputFromArguments($arguments), $this->output
- );
- }
-
- /**
- * Call another console command silently.
- *
- * @param string $command
- * @param array $arguments
- * @return int
- */
- public function callSilent($command, array $arguments = [])
- {
- $arguments['command'] = $command;
-
- return $this->getApplication()->find($command)->run(
- $this->createInputFromArguments($arguments), new NullOutput
- );
- }
-
- /**
- * Create an input instance from the given arguments.
- *
- * @param array $arguments
- * @return \Symfony\Component\Console\Input\ArrayInput
- */
- protected function createInputFromArguments(array $arguments)
- {
- return tap(new ArrayInput(array_merge($this->context(), $arguments)), function ($input) {
- if ($input->hasParameterOption(['--no-interaction'], true)) {
- $input->setInteractive(false);
- }
- });
- }
-
- /**
- * Get all of the context passed to the command.
- *
- * @return array
- */
- protected function context()
- {
- return collect($this->option())->only([
- 'ansi',
- 'no-ansi',
- 'no-interaction',
- 'quiet',
- 'verbose',
- ])->filter()->mapWithKeys(function ($value, $key) {
- return ["--{$key}" => $value];
- })->all();
- }
-
- /**
- * Determine if the given argument is present.
- *
- * @param string|int $name
- * @return bool
- */
- public function hasArgument($name)
- {
- return $this->input->hasArgument($name);
- }
-
- /**
- * Get the value of a command argument.
- *
- * @param string|null $key
- * @return string|array|null
- */
- public function argument($key = null)
- {
- if (is_null($key)) {
- return $this->input->getArguments();
- }
-
- return $this->input->getArgument($key);
- }
-
- /**
- * Get all of the arguments passed to the command.
- *
- * @return array
- */
- public function arguments()
- {
- return $this->argument();
- }
-
- /**
- * Determine if the given option is present.
- *
- * @param string $name
- * @return bool
- */
- public function hasOption($name)
- {
- return $this->input->hasOption($name);
- }
-
- /**
- * Get the value of a command option.
- *
- * @param string|null $key
- * @return string|array|null
- */
- public function option($key = null)
- {
- if (is_null($key)) {
- return $this->input->getOptions();
- }
-
- return $this->input->getOption($key);
- }
-
- /**
- * Get all of the options passed to the command.
- *
- * @return array
- */
- public function options()
- {
- return $this->option();
- }
-
- /**
- * Confirm a question with the user.
- *
- * @param string $question
- * @param bool $default
- * @return bool
- */
- public function confirm($question, $default = false)
- {
- return $this->output->confirm($question, $default);
- }
-
- /**
- * Prompt the user for input.
- *
- * @param string $question
- * @param string|null $default
- * @return mixed
- */
- public function ask($question, $default = null)
- {
- return $this->output->ask($question, $default);
- }
-
- /**
- * Prompt the user for input with auto completion.
- *
- * @param string $question
- * @param array $choices
- * @param string|null $default
- * @return mixed
- */
- public function anticipate($question, array $choices, $default = null)
- {
- return $this->askWithCompletion($question, $choices, $default);
- }
-
- /**
- * Prompt the user for input with auto completion.
- *
- * @param string $question
- * @param array $choices
- * @param string|null $default
- * @return mixed
- */
- public function askWithCompletion($question, array $choices, $default = null)
- {
- $question = new Question($question, $default);
-
- $question->setAutocompleterValues($choices);
-
- return $this->output->askQuestion($question);
- }
-
- /**
- * Prompt the user for input but hide the answer from the console.
- *
- * @param string $question
- * @param bool $fallback
- * @return mixed
- */
- public function secret($question, $fallback = true)
- {
- $question = new Question($question);
-
- $question->setHidden(true)->setHiddenFallback($fallback);
-
- return $this->output->askQuestion($question);
- }
-
- /**
- * Give the user a single choice from an array of answers.
- *
- * @param string $question
- * @param array $choices
- * @param string|null $default
- * @param mixed|null $attempts
- * @param bool|null $multiple
- * @return string
- */
- public function choice($question, array $choices, $default = null, $attempts = null, $multiple = null)
- {
- $question = new ChoiceQuestion($question, $choices, $default);
-
- $question->setMaxAttempts($attempts)->setMultiselect($multiple);
-
- return $this->output->askQuestion($question);
- }
-
- /**
- * Format input to textual table.
- *
- * @param array $headers
- * @param \Illuminate\Contracts\Support\Arrayable|array $rows
- * @param string $tableStyle
- * @param array $columnStyles
- * @return void
- */
- public function table($headers, $rows, $tableStyle = 'default', array $columnStyles = [])
- {
- $table = new Table($this->output);
-
- if ($rows instanceof Arrayable) {
- $rows = $rows->toArray();
- }
-
- $table->setHeaders((array) $headers)->setRows($rows)->setStyle($tableStyle);
-
- foreach ($columnStyles as $columnIndex => $columnStyle) {
- $table->setColumnStyle($columnIndex, $columnStyle);
- }
-
- $table->render();
- }
-
- /**
- * Write a string as information output.
- *
- * @param string $string
- * @param int|string|null $verbosity
- * @return void
- */
- public function info($string, $verbosity = null)
- {
- $this->line($string, 'info', $verbosity);
- }
-
- /**
- * Write a string as standard output.
- *
- * @param string $string
- * @param string $style
- * @param int|string|null $verbosity
- * @return void
- */
- public function line($string, $style = null, $verbosity = null)
- {
- $styled = $style ? "<$style>$string$style>" : $string;
-
- $this->output->writeln($styled, $this->parseVerbosity($verbosity));
- }
-
- /**
- * Write a string as comment output.
- *
- * @param string $string
- * @param int|string|null $verbosity
- * @return void
- */
- public function comment($string, $verbosity = null)
- {
- $this->line($string, 'comment', $verbosity);
- }
-
- /**
- * Write a string as question output.
- *
- * @param string $string
- * @param int|string|null $verbosity
- * @return void
- */
- public function question($string, $verbosity = null)
- {
- $this->line($string, 'question', $verbosity);
- }
-
- /**
- * Write a string as error output.
- *
- * @param string $string
- * @param int|string|null $verbosity
- * @return void
- */
- public function error($string, $verbosity = null)
- {
- $this->line($string, 'error', $verbosity);
- }
-
- /**
- * Write a string as warning output.
- *
- * @param string $string
- * @param int|string|null $verbosity
- * @return void
- */
- public function warn($string, $verbosity = null)
- {
- if (! $this->output->getFormatter()->hasStyle('warning')) {
- $style = new OutputFormatterStyle('yellow');
-
- $this->output->getFormatter()->setStyle('warning', $style);
- }
-
- $this->line($string, 'warning', $verbosity);
- }
-
- /**
- * Write a string in an alert box.
- *
- * @param string $string
- * @return void
- */
- public function alert($string)
- {
- $length = Str::length(strip_tags($string)) + 12;
-
- $this->comment(str_repeat('*', $length));
- $this->comment('* '.$string.' *');
- $this->comment(str_repeat('*', $length));
-
- $this->output->newLine();
- }
-
- /**
- * Set the verbosity level.
- *
- * @param string|int $level
- * @return void
- */
- protected function setVerbosity($level)
- {
- $this->verbosity = $this->parseVerbosity($level);
- }
-
- /**
- * Get the verbosity level in terms of Symfony's OutputInterface level.
- *
- * @param string|int|null $level
- * @return int
- */
- protected function parseVerbosity($level = null)
- {
- if (isset($this->verbosityMap[$level])) {
- $level = $this->verbosityMap[$level];
- } elseif (! is_int($level)) {
- $level = $this->verbosity;
- }
-
- return $level;
- }
-
- /**
- * {@inheritdoc}
- */
- public function isHidden()
- {
- return $this->hidden;
- }
-
- /**
- * {@inheritdoc}
- */
- public function setHidden($hidden)
- {
- parent::setHidden($this->hidden = $hidden);
-
- return $this;
- }
-
- /**
- * Get the console command arguments.
- *
- * @return array
- */
- protected function getArguments()
- {
- return [];
- }
-
- /**
- * Get the console command options.
- *
- * @return array
- */
- protected function getOptions()
- {
- return [];
- }
-
- /**
- * Get the output implementation.
- *
- * @return \Illuminate\Console\OutputStyle
- */
- public function getOutput()
- {
- return $this->output;
- }
-
- /**
- * Get the Laravel application instance.
- *
- * @return \Illuminate\Contracts\Foundation\Application
- */
- public function getLaravel()
- {
- return $this->laravel;
- }
-
- /**
- * Set the Laravel application instance.
- *
- * @param \Illuminate\Contracts\Container\Container $laravel
- * @return void
- */
- public function setLaravel($laravel)
- {
- $this->laravel = $laravel;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Console/ConfirmableTrait.php b/vendor/laravel/framework/src/Illuminate/Console/ConfirmableTrait.php
deleted file mode 100644
index 1a5308e..0000000
--- a/vendor/laravel/framework/src/Illuminate/Console/ConfirmableTrait.php
+++ /dev/null
@@ -1,54 +0,0 @@
-getDefaultConfirmCallback() : $callback;
-
- $shouldConfirm = $callback instanceof Closure ? call_user_func($callback) : $callback;
-
- if ($shouldConfirm) {
- if ($this->option('force')) {
- return true;
- }
-
- $this->alert($warning);
-
- $confirmed = $this->confirm('Do you really wish to run this command?');
-
- if (! $confirmed) {
- $this->comment('Command Cancelled!');
-
- return false;
- }
- }
-
- return true;
- }
-
- /**
- * Get the default confirmation callback.
- *
- * @return \Closure
- */
- protected function getDefaultConfirmCallback()
- {
- return function () {
- return $this->getLaravel()->environment() === 'production';
- };
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Console/DetectsApplicationNamespace.php b/vendor/laravel/framework/src/Illuminate/Console/DetectsApplicationNamespace.php
deleted file mode 100644
index cb5e8e8..0000000
--- a/vendor/laravel/framework/src/Illuminate/Console/DetectsApplicationNamespace.php
+++ /dev/null
@@ -1,18 +0,0 @@
-getNamespace();
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Console/Events/ArtisanStarting.php b/vendor/laravel/framework/src/Illuminate/Console/Events/ArtisanStarting.php
deleted file mode 100644
index f228ac5..0000000
--- a/vendor/laravel/framework/src/Illuminate/Console/Events/ArtisanStarting.php
+++ /dev/null
@@ -1,24 +0,0 @@
-artisan = $artisan;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Console/Events/CommandFinished.php b/vendor/laravel/framework/src/Illuminate/Console/Events/CommandFinished.php
deleted file mode 100644
index ef066af..0000000
--- a/vendor/laravel/framework/src/Illuminate/Console/Events/CommandFinished.php
+++ /dev/null
@@ -1,54 +0,0 @@
-input = $input;
- $this->output = $output;
- $this->command = $command;
- $this->exitCode = $exitCode;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Console/Events/CommandStarting.php b/vendor/laravel/framework/src/Illuminate/Console/Events/CommandStarting.php
deleted file mode 100644
index c6238b5..0000000
--- a/vendor/laravel/framework/src/Illuminate/Console/Events/CommandStarting.php
+++ /dev/null
@@ -1,45 +0,0 @@
-input = $input;
- $this->output = $output;
- $this->command = $command;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Console/GeneratorCommand.php b/vendor/laravel/framework/src/Illuminate/Console/GeneratorCommand.php
deleted file mode 100644
index ec5eb8c..0000000
--- a/vendor/laravel/framework/src/Illuminate/Console/GeneratorCommand.php
+++ /dev/null
@@ -1,253 +0,0 @@
-files = $files;
- }
-
- /**
- * Get the stub file for the generator.
- *
- * @return string
- */
- abstract protected function getStub();
-
- /**
- * Execute the console command.
- *
- * @return bool|null
- * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
- */
- public function handle()
- {
- $name = $this->qualifyClass($this->getNameInput());
-
- $path = $this->getPath($name);
-
- // First we will check to see if the class already exists. If it does, we don't want
- // to create the class and overwrite the user's code. So, we will bail out so the
- // code is untouched. Otherwise, we will continue generating this class' files.
- if ((! $this->hasOption('force') ||
- ! $this->option('force')) &&
- $this->alreadyExists($this->getNameInput())) {
- $this->error($this->type.' already exists!');
-
- return false;
- }
-
- // Next, we will generate the path to the location where this class' file should get
- // written. Then, we will build the class and make the proper replacements on the
- // stub files so that it gets the correctly formatted namespace and class name.
- $this->makeDirectory($path);
-
- $this->files->put($path, $this->buildClass($name));
-
- $this->info($this->type.' created successfully.');
- }
-
- /**
- * Parse the class name and format according to the root namespace.
- *
- * @param string $name
- * @return string
- */
- protected function qualifyClass($name)
- {
- $name = ltrim($name, '\\/');
-
- $rootNamespace = $this->rootNamespace();
-
- if (Str::startsWith($name, $rootNamespace)) {
- return $name;
- }
-
- $name = str_replace('/', '\\', $name);
-
- return $this->qualifyClass(
- $this->getDefaultNamespace(trim($rootNamespace, '\\')).'\\'.$name
- );
- }
-
- /**
- * Get the default namespace for the class.
- *
- * @param string $rootNamespace
- * @return string
- */
- protected function getDefaultNamespace($rootNamespace)
- {
- return $rootNamespace;
- }
-
- /**
- * Determine if the class already exists.
- *
- * @param string $rawName
- * @return bool
- */
- protected function alreadyExists($rawName)
- {
- return $this->files->exists($this->getPath($this->qualifyClass($rawName)));
- }
-
- /**
- * Get the destination class path.
- *
- * @param string $name
- * @return string
- */
- protected function getPath($name)
- {
- $name = Str::replaceFirst($this->rootNamespace(), '', $name);
-
- return $this->laravel['path'].'/'.str_replace('\\', '/', $name).'.php';
- }
-
- /**
- * Build the directory for the class if necessary.
- *
- * @param string $path
- * @return string
- */
- protected function makeDirectory($path)
- {
- if (! $this->files->isDirectory(dirname($path))) {
- $this->files->makeDirectory(dirname($path), 0777, true, true);
- }
-
- return $path;
- }
-
- /**
- * Build the class with the given name.
- *
- * @param string $name
- * @return string
- * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
- */
- protected function buildClass($name)
- {
- $stub = $this->files->get($this->getStub());
-
- return $this->replaceNamespace($stub, $name)->replaceClass($stub, $name);
- }
-
- /**
- * Replace the namespace for the given stub.
- *
- * @param string $stub
- * @param string $name
- * @return $this
- */
- protected function replaceNamespace(&$stub, $name)
- {
- $stub = str_replace(
- ['DummyNamespace', 'DummyRootNamespace', 'NamespacedDummyUserModel'],
- [$this->getNamespace($name), $this->rootNamespace(), $this->userProviderModel()],
- $stub
- );
-
- return $this;
- }
-
- /**
- * Get the full namespace for a given class, without the class name.
- *
- * @param string $name
- * @return string
- */
- protected function getNamespace($name)
- {
- return trim(implode('\\', array_slice(explode('\\', $name), 0, -1)), '\\');
- }
-
- /**
- * Replace the class name for the given stub.
- *
- * @param string $stub
- * @param string $name
- * @return string
- */
- protected function replaceClass($stub, $name)
- {
- $class = str_replace($this->getNamespace($name).'\\', '', $name);
-
- return str_replace('DummyClass', $class, $stub);
- }
-
- /**
- * Get the desired class name from the input.
- *
- * @return string
- */
- protected function getNameInput()
- {
- return trim($this->argument('name'));
- }
-
- /**
- * Get the root namespace for the class.
- *
- * @return string
- */
- protected function rootNamespace()
- {
- return $this->laravel->getNamespace();
- }
-
- /**
- * Get the model for the default guard's user provider.
- *
- * @return string|null
- */
- protected function userProviderModel()
- {
- $guard = config('auth.defaults.guard');
-
- $provider = config("auth.guards.{$guard}.provider");
-
- return config("auth.providers.{$provider}.model");
- }
-
- /**
- * Get the console command arguments.
- *
- * @return array
- */
- protected function getArguments()
- {
- return [
- ['name', InputArgument::REQUIRED, 'The name of the class'],
- ];
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Console/OutputStyle.php b/vendor/laravel/framework/src/Illuminate/Console/OutputStyle.php
deleted file mode 100644
index 925e66d..0000000
--- a/vendor/laravel/framework/src/Illuminate/Console/OutputStyle.php
+++ /dev/null
@@ -1,71 +0,0 @@
-output = $output;
-
- parent::__construct($input, $output);
- }
-
- /**
- * Returns whether verbosity is quiet (-q).
- *
- * @return bool
- */
- public function isQuiet()
- {
- return $this->output->isQuiet();
- }
-
- /**
- * Returns whether verbosity is verbose (-v).
- *
- * @return bool
- */
- public function isVerbose()
- {
- return $this->output->isVerbose();
- }
-
- /**
- * Returns whether verbosity is very verbose (-vv).
- *
- * @return bool
- */
- public function isVeryVerbose()
- {
- return $this->output->isVeryVerbose();
- }
-
- /**
- * Returns whether verbosity is debug (-vvv).
- *
- * @return bool
- */
- public function isDebug()
- {
- return $this->output->isDebug();
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Console/Parser.php b/vendor/laravel/framework/src/Illuminate/Console/Parser.php
deleted file mode 100644
index 7764310..0000000
--- a/vendor/laravel/framework/src/Illuminate/Console/Parser.php
+++ /dev/null
@@ -1,148 +0,0 @@
-cache = $cache;
- }
-
- /**
- * Attempt to obtain an event mutex for the given event.
- *
- * @param \Illuminate\Console\Scheduling\Event $event
- * @return bool
- */
- public function create(Event $event)
- {
- return $this->cache->store($this->store)->add(
- $event->mutexName(), true, $event->expiresAt
- );
- }
-
- /**
- * Determine if an event mutex exists for the given event.
- *
- * @param \Illuminate\Console\Scheduling\Event $event
- * @return bool
- */
- public function exists(Event $event)
- {
- return $this->cache->store($this->store)->has($event->mutexName());
- }
-
- /**
- * Clear the event mutex for the given event.
- *
- * @param \Illuminate\Console\Scheduling\Event $event
- * @return void
- */
- public function forget(Event $event)
- {
- $this->cache->store($this->store)->forget($event->mutexName());
- }
-
- /**
- * Specify the cache store that should be used.
- *
- * @param string $store
- * @return $this
- */
- public function useStore($store)
- {
- $this->store = $store;
-
- return $this;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/CacheSchedulingMutex.php b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/CacheSchedulingMutex.php
deleted file mode 100644
index dfa2034..0000000
--- a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/CacheSchedulingMutex.php
+++ /dev/null
@@ -1,75 +0,0 @@
-cache = $cache;
- }
-
- /**
- * Attempt to obtain a scheduling mutex for the given event.
- *
- * @param \Illuminate\Console\Scheduling\Event $event
- * @param \DateTimeInterface $time
- * @return bool
- */
- public function create(Event $event, DateTimeInterface $time)
- {
- return $this->cache->store($this->store)->add(
- $event->mutexName().$time->format('Hi'), true, 60
- );
- }
-
- /**
- * Determine if a scheduling mutex exists for the given event.
- *
- * @param \Illuminate\Console\Scheduling\Event $event
- * @param \DateTimeInterface $time
- * @return bool
- */
- public function exists(Event $event, DateTimeInterface $time)
- {
- return $this->cache->store($this->store)->has(
- $event->mutexName().$time->format('Hi')
- );
- }
-
- /**
- * Specify the cache store that should be used.
- *
- * @param string $store
- * @return $this
- */
- public function useStore($store)
- {
- $this->store = $store;
-
- return $this;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/CallbackEvent.php b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/CallbackEvent.php
deleted file mode 100644
index ba6395b..0000000
--- a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/CallbackEvent.php
+++ /dev/null
@@ -1,166 +0,0 @@
-mutex = $mutex;
- $this->callback = $callback;
- $this->parameters = $parameters;
- }
-
- /**
- * Run the given event.
- *
- * @param \Illuminate\Contracts\Container\Container $container
- * @return mixed
- *
- * @throws \Exception
- */
- public function run(Container $container)
- {
- if ($this->description && $this->withoutOverlapping &&
- ! $this->mutex->create($this)) {
- return;
- }
-
- $pid = getmypid();
-
- register_shutdown_function(function () use ($pid) {
- if ($pid === getmypid()) {
- $this->removeMutex();
- }
- });
-
- parent::callBeforeCallbacks($container);
-
- try {
- $response = is_object($this->callback)
- ? $container->call([$this->callback, '__invoke'], $this->parameters)
- : $container->call($this->callback, $this->parameters);
- } finally {
- $this->removeMutex();
-
- parent::callAfterCallbacks($container);
- }
-
- return $response;
- }
-
- /**
- * Clear the mutex for the event.
- *
- * @return void
- */
- protected function removeMutex()
- {
- if ($this->description) {
- $this->mutex->forget($this);
- }
- }
-
- /**
- * Do not allow the event to overlap each other.
- *
- * @param int $expiresAt
- * @return $this
- *
- * @throws \LogicException
- */
- public function withoutOverlapping($expiresAt = 1440)
- {
- if (! isset($this->description)) {
- throw new LogicException(
- "A scheduled event name is required to prevent overlapping. Use the 'name' method before 'withoutOverlapping'."
- );
- }
-
- $this->withoutOverlapping = true;
-
- $this->expiresAt = $expiresAt;
-
- return $this->skip(function () {
- return $this->mutex->exists($this);
- });
- }
-
- /**
- * Allow the event to only run on one server for each cron expression.
- *
- * @return $this
- *
- * @throws \LogicException
- */
- public function onOneServer()
- {
- if (! isset($this->description)) {
- throw new LogicException(
- "A scheduled event name is required to only run on one server. Use the 'name' method before 'onOneServer'."
- );
- }
-
- $this->onOneServer = true;
-
- return $this;
- }
-
- /**
- * Get the mutex name for the scheduled command.
- *
- * @return string
- */
- public function mutexName()
- {
- return 'framework/schedule-'.sha1($this->description);
- }
-
- /**
- * Get the summary of the event for display.
- *
- * @return string
- */
- public function getSummaryForDisplay()
- {
- if (is_string($this->description)) {
- return $this->description;
- }
-
- return is_string($this->callback) ? $this->callback : 'Closure';
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/CommandBuilder.php b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/CommandBuilder.php
deleted file mode 100644
index df7cdf6..0000000
--- a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/CommandBuilder.php
+++ /dev/null
@@ -1,71 +0,0 @@
-runInBackground) {
- return $this->buildBackgroundCommand($event);
- }
-
- return $this->buildForegroundCommand($event);
- }
-
- /**
- * Build the command for running the event in the foreground.
- *
- * @param \Illuminate\Console\Scheduling\Event $event
- * @return string
- */
- protected function buildForegroundCommand(Event $event)
- {
- $output = ProcessUtils::escapeArgument($event->output);
-
- return $this->ensureCorrectUser(
- $event, $event->command.($event->shouldAppendOutput ? ' >> ' : ' > ').$output.' 2>&1'
- );
- }
-
- /**
- * Build the command for running the event in the background.
- *
- * @param \Illuminate\Console\Scheduling\Event $event
- * @return string
- */
- protected function buildBackgroundCommand(Event $event)
- {
- $output = ProcessUtils::escapeArgument($event->output);
-
- $redirect = $event->shouldAppendOutput ? ' >> ' : ' > ';
-
- $finished = Application::formatCommandString('schedule:finish').' "'.$event->mutexName().'"';
-
- return $this->ensureCorrectUser($event,
- '('.$event->command.$redirect.$output.' 2>&1 '.(windows_os() ? '&' : ';').' '.$finished.') > '
- .ProcessUtils::escapeArgument($event->getDefaultOutput()).' 2>&1 &'
- );
- }
-
- /**
- * Finalize the event's command syntax with the correct user.
- *
- * @param \Illuminate\Console\Scheduling\Event $event
- * @param string $command
- * @return string
- */
- protected function ensureCorrectUser(Event $event, $command)
- {
- return $event->user && ! windows_os() ? 'sudo -u '.$event->user.' -- sh -c \''.$command.'\'' : $command;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/Event.php b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/Event.php
deleted file mode 100644
index d21defd..0000000
--- a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/Event.php
+++ /dev/null
@@ -1,745 +0,0 @@
-mutex = $mutex;
- $this->command = $command;
- $this->output = $this->getDefaultOutput();
- }
-
- /**
- * Get the default output depending on the OS.
- *
- * @return string
- */
- public function getDefaultOutput()
- {
- return (DIRECTORY_SEPARATOR === '\\') ? 'NUL' : '/dev/null';
- }
-
- /**
- * Run the given event.
- *
- * @param \Illuminate\Contracts\Container\Container $container
- * @return void
- */
- public function run(Container $container)
- {
- if ($this->withoutOverlapping &&
- ! $this->mutex->create($this)) {
- return;
- }
-
- $this->runInBackground
- ? $this->runCommandInBackground($container)
- : $this->runCommandInForeground($container);
- }
-
- /**
- * Get the mutex name for the scheduled command.
- *
- * @return string
- */
- public function mutexName()
- {
- return 'framework'.DIRECTORY_SEPARATOR.'schedule-'.sha1($this->expression.$this->command);
- }
-
- /**
- * Run the command in the foreground.
- *
- * @param \Illuminate\Contracts\Container\Container $container
- * @return void
- */
- protected function runCommandInForeground(Container $container)
- {
- $this->callBeforeCallbacks($container);
-
- (new Process(
- $this->buildCommand(), base_path(), null, null, null
- ))->run();
-
- $this->callAfterCallbacks($container);
- }
-
- /**
- * Run the command in the background.
- *
- * @param \Illuminate\Contracts\Container\Container $container
- * @return void
- */
- protected function runCommandInBackground(Container $container)
- {
- $this->callBeforeCallbacks($container);
-
- (new Process(
- $this->buildCommand(), base_path(), null, null, null
- ))->run();
- }
-
- /**
- * Call all of the "before" callbacks for the event.
- *
- * @param \Illuminate\Contracts\Container\Container $container
- * @return void
- */
- public function callBeforeCallbacks(Container $container)
- {
- foreach ($this->beforeCallbacks as $callback) {
- $container->call($callback);
- }
- }
-
- /**
- * Call all of the "after" callbacks for the event.
- *
- * @param \Illuminate\Contracts\Container\Container $container
- * @return void
- */
- public function callAfterCallbacks(Container $container)
- {
- foreach ($this->afterCallbacks as $callback) {
- $container->call($callback);
- }
- }
-
- /**
- * Build the command string.
- *
- * @return string
- */
- public function buildCommand()
- {
- return (new CommandBuilder)->buildCommand($this);
- }
-
- /**
- * Determine if the given event should run based on the Cron expression.
- *
- * @param \Illuminate\Contracts\Foundation\Application $app
- * @return bool
- */
- public function isDue($app)
- {
- if (! $this->runsInMaintenanceMode() && $app->isDownForMaintenance()) {
- return false;
- }
-
- return $this->expressionPasses() &&
- $this->runsInEnvironment($app->environment());
- }
-
- /**
- * Determine if the event runs in maintenance mode.
- *
- * @return bool
- */
- public function runsInMaintenanceMode()
- {
- return $this->evenInMaintenanceMode;
- }
-
- /**
- * Determine if the Cron expression passes.
- *
- * @return bool
- */
- protected function expressionPasses()
- {
- $date = Carbon::now();
-
- if ($this->timezone) {
- $date->setTimezone($this->timezone);
- }
-
- return CronExpression::factory($this->expression)->isDue($date->toDateTimeString());
- }
-
- /**
- * Determine if the event runs in the given environment.
- *
- * @param string $environment
- * @return bool
- */
- public function runsInEnvironment($environment)
- {
- return empty($this->environments) || in_array($environment, $this->environments);
- }
-
- /**
- * Determine if the filters pass for the event.
- *
- * @param \Illuminate\Contracts\Foundation\Application $app
- * @return bool
- */
- public function filtersPass($app)
- {
- foreach ($this->filters as $callback) {
- if (! $app->call($callback)) {
- return false;
- }
- }
-
- foreach ($this->rejects as $callback) {
- if ($app->call($callback)) {
- return false;
- }
- }
-
- return true;
- }
-
- /**
- * Ensure that the output is stored on disk in a log file.
- *
- * @return $this
- */
- public function storeOutput()
- {
- $this->ensureOutputIsBeingCaptured();
-
- return $this;
- }
-
- /**
- * Send the output of the command to a given location.
- *
- * @param string $location
- * @param bool $append
- * @return $this
- */
- public function sendOutputTo($location, $append = false)
- {
- $this->output = $location;
-
- $this->shouldAppendOutput = $append;
-
- return $this;
- }
-
- /**
- * Append the output of the command to a given location.
- *
- * @param string $location
- * @return $this
- */
- public function appendOutputTo($location)
- {
- return $this->sendOutputTo($location, true);
- }
-
- /**
- * E-mail the results of the scheduled operation.
- *
- * @param array|mixed $addresses
- * @param bool $onlyIfOutputExists
- * @return $this
- *
- * @throws \LogicException
- */
- public function emailOutputTo($addresses, $onlyIfOutputExists = false)
- {
- $this->ensureOutputIsBeingCapturedForEmail();
-
- $addresses = Arr::wrap($addresses);
-
- return $this->then(function (Mailer $mailer) use ($addresses, $onlyIfOutputExists) {
- $this->emailOutput($mailer, $addresses, $onlyIfOutputExists);
- });
- }
-
- /**
- * E-mail the results of the scheduled operation if it produces output.
- *
- * @param array|mixed $addresses
- * @return $this
- *
- * @throws \LogicException
- */
- public function emailWrittenOutputTo($addresses)
- {
- return $this->emailOutputTo($addresses, true);
- }
-
- /**
- * Ensure that output is being captured for email.
- *
- * @return void
- *
- * @deprecated See ensureOutputIsBeingCaptured.
- */
- protected function ensureOutputIsBeingCapturedForEmail()
- {
- $this->ensureOutputIsBeingCaptured();
- }
-
- /**
- * Ensure that the command output is being captured.
- *
- * @return void
- */
- protected function ensureOutputIsBeingCaptured()
- {
- if (is_null($this->output) || $this->output == $this->getDefaultOutput()) {
- $this->sendOutputTo(storage_path('logs/schedule-'.sha1($this->mutexName()).'.log'));
- }
- }
-
- /**
- * E-mail the output of the event to the recipients.
- *
- * @param \Illuminate\Contracts\Mail\Mailer $mailer
- * @param array $addresses
- * @param bool $onlyIfOutputExists
- * @return void
- */
- protected function emailOutput(Mailer $mailer, $addresses, $onlyIfOutputExists = false)
- {
- $text = file_exists($this->output) ? file_get_contents($this->output) : '';
-
- if ($onlyIfOutputExists && empty($text)) {
- return;
- }
-
- $mailer->raw($text, function ($m) use ($addresses) {
- $m->to($addresses)->subject($this->getEmailSubject());
- });
- }
-
- /**
- * Get the e-mail subject line for output results.
- *
- * @return string
- */
- protected function getEmailSubject()
- {
- if ($this->description) {
- return $this->description;
- }
-
- return "Scheduled Job Output For [{$this->command}]";
- }
-
- /**
- * Register a callback to ping a given URL before the job runs.
- *
- * @param string $url
- * @return $this
- */
- public function pingBefore($url)
- {
- return $this->before(function () use ($url) {
- (new HttpClient)->get($url);
- });
- }
-
- /**
- * Register a callback to ping a given URL before the job runs if the given condition is true.
- *
- * @param bool $value
- * @param string $url
- * @return $this
- */
- public function pingBeforeIf($value, $url)
- {
- return $value ? $this->pingBefore($url) : $this;
- }
-
- /**
- * Register a callback to ping a given URL after the job runs.
- *
- * @param string $url
- * @return $this
- */
- public function thenPing($url)
- {
- return $this->then(function () use ($url) {
- (new HttpClient)->get($url);
- });
- }
-
- /**
- * Register a callback to ping a given URL after the job runs if the given condition is true.
- *
- * @param bool $value
- * @param string $url
- * @return $this
- */
- public function thenPingIf($value, $url)
- {
- return $value ? $this->thenPing($url) : $this;
- }
-
- /**
- * State that the command should run in background.
- *
- * @return $this
- */
- public function runInBackground()
- {
- $this->runInBackground = true;
-
- return $this;
- }
-
- /**
- * Set which user the command should run as.
- *
- * @param string $user
- * @return $this
- */
- public function user($user)
- {
- $this->user = $user;
-
- return $this;
- }
-
- /**
- * Limit the environments the command should run in.
- *
- * @param array|mixed $environments
- * @return $this
- */
- public function environments($environments)
- {
- $this->environments = is_array($environments) ? $environments : func_get_args();
-
- return $this;
- }
-
- /**
- * State that the command should run even in maintenance mode.
- *
- * @return $this
- */
- public function evenInMaintenanceMode()
- {
- $this->evenInMaintenanceMode = true;
-
- return $this;
- }
-
- /**
- * Do not allow the event to overlap each other.
- *
- * @param int $expiresAt
- * @return $this
- */
- public function withoutOverlapping($expiresAt = 1440)
- {
- $this->withoutOverlapping = true;
-
- $this->expiresAt = $expiresAt;
-
- return $this->then(function () {
- $this->mutex->forget($this);
- })->skip(function () {
- return $this->mutex->exists($this);
- });
- }
-
- /**
- * Allow the event to only run on one server for each cron expression.
- *
- * @return $this
- */
- public function onOneServer()
- {
- $this->onOneServer = true;
-
- return $this;
- }
-
- /**
- * Register a callback to further filter the schedule.
- *
- * @param \Closure|bool $callback
- * @return $this
- */
- public function when($callback)
- {
- $this->filters[] = is_callable($callback) ? $callback : function () use ($callback) {
- return $callback;
- };
-
- return $this;
- }
-
- /**
- * Register a callback to further filter the schedule.
- *
- * @param \Closure|bool $callback
- * @return $this
- */
- public function skip($callback)
- {
- $this->rejects[] = is_callable($callback) ? $callback : function () use ($callback) {
- return $callback;
- };
-
- return $this;
- }
-
- /**
- * Register a callback to be called before the operation.
- *
- * @param \Closure $callback
- * @return $this
- */
- public function before(Closure $callback)
- {
- $this->beforeCallbacks[] = $callback;
-
- return $this;
- }
-
- /**
- * Register a callback to be called after the operation.
- *
- * @param \Closure $callback
- * @return $this
- */
- public function after(Closure $callback)
- {
- return $this->then($callback);
- }
-
- /**
- * Register a callback to be called after the operation.
- *
- * @param \Closure $callback
- * @return $this
- */
- public function then(Closure $callback)
- {
- $this->afterCallbacks[] = $callback;
-
- return $this;
- }
-
- /**
- * Set the human-friendly description of the event.
- *
- * @param string $description
- * @return $this
- */
- public function name($description)
- {
- return $this->description($description);
- }
-
- /**
- * Set the human-friendly description of the event.
- *
- * @param string $description
- * @return $this
- */
- public function description($description)
- {
- $this->description = $description;
-
- return $this;
- }
-
- /**
- * Get the summary of the event for display.
- *
- * @return string
- */
- public function getSummaryForDisplay()
- {
- if (is_string($this->description)) {
- return $this->description;
- }
-
- return $this->buildCommand();
- }
-
- /**
- * Determine the next due date for an event.
- *
- * @param \DateTime|string $currentTime
- * @param int $nth
- * @param bool $allowCurrentDate
- * @return \Illuminate\Support\Carbon
- */
- public function nextRunDate($currentTime = 'now', $nth = 0, $allowCurrentDate = false)
- {
- return Carbon::instance(CronExpression::factory(
- $this->getExpression()
- )->getNextRunDate($currentTime, $nth, $allowCurrentDate, $this->timezone));
- }
-
- /**
- * Get the Cron expression for the event.
- *
- * @return string
- */
- public function getExpression()
- {
- return $this->expression;
- }
-
- /**
- * Set the event mutex implementation to be used.
- *
- * @param \Illuminate\Console\Scheduling\EventMutex $mutex
- * @return $this
- */
- public function preventOverlapsUsing(EventMutex $mutex)
- {
- $this->mutex = $mutex;
-
- return $this;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/EventMutex.php b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/EventMutex.php
deleted file mode 100644
index 1840e24..0000000
--- a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/EventMutex.php
+++ /dev/null
@@ -1,30 +0,0 @@
-expression = $expression;
-
- return $this;
- }
-
- /**
- * Schedule the event to run between start and end time.
- *
- * @param string $startTime
- * @param string $endTime
- * @return $this
- */
- public function between($startTime, $endTime)
- {
- return $this->when($this->inTimeInterval($startTime, $endTime));
- }
-
- /**
- * Schedule the event to not run between start and end time.
- *
- * @param string $startTime
- * @param string $endTime
- * @return $this
- */
- public function unlessBetween($startTime, $endTime)
- {
- return $this->skip($this->inTimeInterval($startTime, $endTime));
- }
-
- /**
- * Schedule the event to run between start and end time.
- *
- * @param string $startTime
- * @param string $endTime
- * @return \Closure
- */
- private function inTimeInterval($startTime, $endTime)
- {
- return function () use ($startTime, $endTime) {
- return Carbon::now($this->timezone)->between(
- Carbon::parse($startTime, $this->timezone),
- Carbon::parse($endTime, $this->timezone),
- true
- );
- };
- }
-
- /**
- * Schedule the event to run every minute.
- *
- * @return $this
- */
- public function everyMinute()
- {
- return $this->spliceIntoPosition(1, '*');
- }
-
- /**
- * Schedule the event to run every five minutes.
- *
- * @return $this
- */
- public function everyFiveMinutes()
- {
- return $this->spliceIntoPosition(1, '*/5');
- }
-
- /**
- * Schedule the event to run every ten minutes.
- *
- * @return $this
- */
- public function everyTenMinutes()
- {
- return $this->spliceIntoPosition(1, '*/10');
- }
-
- /**
- * Schedule the event to run every fifteen minutes.
- *
- * @return $this
- */
- public function everyFifteenMinutes()
- {
- return $this->spliceIntoPosition(1, '*/15');
- }
-
- /**
- * Schedule the event to run every thirty minutes.
- *
- * @return $this
- */
- public function everyThirtyMinutes()
- {
- return $this->spliceIntoPosition(1, '0,30');
- }
-
- /**
- * Schedule the event to run hourly.
- *
- * @return $this
- */
- public function hourly()
- {
- return $this->spliceIntoPosition(1, 0);
- }
-
- /**
- * Schedule the event to run hourly at a given offset in the hour.
- *
- * @param int $offset
- * @return $this
- */
- public function hourlyAt($offset)
- {
- return $this->spliceIntoPosition(1, $offset);
- }
-
- /**
- * Schedule the event to run daily.
- *
- * @return $this
- */
- public function daily()
- {
- return $this->spliceIntoPosition(1, 0)
- ->spliceIntoPosition(2, 0);
- }
-
- /**
- * Schedule the command at a given time.
- *
- * @param string $time
- * @return $this
- */
- public function at($time)
- {
- return $this->dailyAt($time);
- }
-
- /**
- * Schedule the event to run daily at a given time (10:00, 19:30, etc).
- *
- * @param string $time
- * @return $this
- */
- public function dailyAt($time)
- {
- $segments = explode(':', $time);
-
- return $this->spliceIntoPosition(2, (int) $segments[0])
- ->spliceIntoPosition(1, count($segments) === 2 ? (int) $segments[1] : '0');
- }
-
- /**
- * Schedule the event to run twice daily.
- *
- * @param int $first
- * @param int $second
- * @return $this
- */
- public function twiceDaily($first = 1, $second = 13)
- {
- $hours = $first.','.$second;
-
- return $this->spliceIntoPosition(1, 0)
- ->spliceIntoPosition(2, $hours);
- }
-
- /**
- * Schedule the event to run only on weekdays.
- *
- * @return $this
- */
- public function weekdays()
- {
- return $this->spliceIntoPosition(5, '1-5');
- }
-
- /**
- * Schedule the event to run only on weekends.
- *
- * @return $this
- */
- public function weekends()
- {
- return $this->spliceIntoPosition(5, '0,6');
- }
-
- /**
- * Schedule the event to run only on Mondays.
- *
- * @return $this
- */
- public function mondays()
- {
- return $this->days(1);
- }
-
- /**
- * Schedule the event to run only on Tuesdays.
- *
- * @return $this
- */
- public function tuesdays()
- {
- return $this->days(2);
- }
-
- /**
- * Schedule the event to run only on Wednesdays.
- *
- * @return $this
- */
- public function wednesdays()
- {
- return $this->days(3);
- }
-
- /**
- * Schedule the event to run only on Thursdays.
- *
- * @return $this
- */
- public function thursdays()
- {
- return $this->days(4);
- }
-
- /**
- * Schedule the event to run only on Fridays.
- *
- * @return $this
- */
- public function fridays()
- {
- return $this->days(5);
- }
-
- /**
- * Schedule the event to run only on Saturdays.
- *
- * @return $this
- */
- public function saturdays()
- {
- return $this->days(6);
- }
-
- /**
- * Schedule the event to run only on Sundays.
- *
- * @return $this
- */
- public function sundays()
- {
- return $this->days(0);
- }
-
- /**
- * Schedule the event to run weekly.
- *
- * @return $this
- */
- public function weekly()
- {
- return $this->spliceIntoPosition(1, 0)
- ->spliceIntoPosition(2, 0)
- ->spliceIntoPosition(5, 0);
- }
-
- /**
- * Schedule the event to run weekly on a given day and time.
- *
- * @param int $day
- * @param string $time
- * @return $this
- */
- public function weeklyOn($day, $time = '0:0')
- {
- $this->dailyAt($time);
-
- return $this->spliceIntoPosition(5, $day);
- }
-
- /**
- * Schedule the event to run monthly.
- *
- * @return $this
- */
- public function monthly()
- {
- return $this->spliceIntoPosition(1, 0)
- ->spliceIntoPosition(2, 0)
- ->spliceIntoPosition(3, 1);
- }
-
- /**
- * Schedule the event to run monthly on a given day and time.
- *
- * @param int $day
- * @param string $time
- * @return $this
- */
- public function monthlyOn($day = 1, $time = '0:0')
- {
- $this->dailyAt($time);
-
- return $this->spliceIntoPosition(3, $day);
- }
-
- /**
- * Schedule the event to run twice monthly.
- *
- * @param int $first
- * @param int $second
- * @return $this
- */
- public function twiceMonthly($first = 1, $second = 16)
- {
- $days = $first.','.$second;
-
- return $this->spliceIntoPosition(1, 0)
- ->spliceIntoPosition(2, 0)
- ->spliceIntoPosition(3, $days);
- }
-
- /**
- * Schedule the event to run quarterly.
- *
- * @return $this
- */
- public function quarterly()
- {
- return $this->spliceIntoPosition(1, 0)
- ->spliceIntoPosition(2, 0)
- ->spliceIntoPosition(3, 1)
- ->spliceIntoPosition(4, '1-12/3');
- }
-
- /**
- * Schedule the event to run yearly.
- *
- * @return $this
- */
- public function yearly()
- {
- return $this->spliceIntoPosition(1, 0)
- ->spliceIntoPosition(2, 0)
- ->spliceIntoPosition(3, 1)
- ->spliceIntoPosition(4, 1);
- }
-
- /**
- * Set the days of the week the command should run on.
- *
- * @param array|mixed $days
- * @return $this
- */
- public function days($days)
- {
- $days = is_array($days) ? $days : func_get_args();
-
- return $this->spliceIntoPosition(5, implode(',', $days));
- }
-
- /**
- * Set the timezone the date should be evaluated on.
- *
- * @param \DateTimeZone|string $timezone
- * @return $this
- */
- public function timezone($timezone)
- {
- $this->timezone = $timezone;
-
- return $this;
- }
-
- /**
- * Splice the given value into the given position of the expression.
- *
- * @param int $position
- * @param string $value
- * @return $this
- */
- protected function spliceIntoPosition($position, $value)
- {
- $segments = explode(' ', $this->expression);
-
- $segments[$position - 1] = $value;
-
- return $this->cron(implode(' ', $segments));
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/Schedule.php b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/Schedule.php
deleted file mode 100644
index 3855f17..0000000
--- a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/Schedule.php
+++ /dev/null
@@ -1,199 +0,0 @@
-eventMutex = $container->bound(EventMutex::class)
- ? $container->make(EventMutex::class)
- : $container->make(CacheEventMutex::class);
-
- $this->schedulingMutex = $container->bound(SchedulingMutex::class)
- ? $container->make(SchedulingMutex::class)
- : $container->make(CacheSchedulingMutex::class);
- }
-
- /**
- * Add a new callback event to the schedule.
- *
- * @param string|callable $callback
- * @param array $parameters
- * @return \Illuminate\Console\Scheduling\CallbackEvent
- */
- public function call($callback, array $parameters = [])
- {
- $this->events[] = $event = new CallbackEvent(
- $this->eventMutex, $callback, $parameters
- );
-
- return $event;
- }
-
- /**
- * Add a new Artisan command event to the schedule.
- *
- * @param string $command
- * @param array $parameters
- * @return \Illuminate\Console\Scheduling\Event
- */
- public function command($command, array $parameters = [])
- {
- if (class_exists($command)) {
- $command = Container::getInstance()->make($command)->getName();
- }
-
- return $this->exec(
- Application::formatCommandString($command), $parameters
- );
- }
-
- /**
- * Add a new job callback event to the schedule.
- *
- * @param object|string $job
- * @param string|null $queue
- * @param string|null $connection
- * @return \Illuminate\Console\Scheduling\CallbackEvent
- */
- public function job($job, $queue = null, $connection = null)
- {
- return $this->call(function () use ($job, $queue, $connection) {
- $job = is_string($job) ? resolve($job) : $job;
-
- if ($job instanceof ShouldQueue) {
- dispatch($job)
- ->onConnection($connection ?? $job->connection)
- ->onQueue($queue ?? $job->queue);
- } else {
- dispatch_now($job);
- }
- })->name(is_string($job) ? $job : get_class($job));
- }
-
- /**
- * Add a new command event to the schedule.
- *
- * @param string $command
- * @param array $parameters
- * @return \Illuminate\Console\Scheduling\Event
- */
- public function exec($command, array $parameters = [])
- {
- if (count($parameters)) {
- $command .= ' '.$this->compileParameters($parameters);
- }
-
- $this->events[] = $event = new Event($this->eventMutex, $command);
-
- return $event;
- }
-
- /**
- * Compile parameters for a command.
- *
- * @param array $parameters
- * @return string
- */
- protected function compileParameters(array $parameters)
- {
- return collect($parameters)->map(function ($value, $key) {
- if (is_array($value)) {
- $value = collect($value)->map(function ($value) {
- return ProcessUtils::escapeArgument($value);
- })->implode(' ');
- } elseif (! is_numeric($value) && ! preg_match('/^(-.$|--.*)/i', $value)) {
- $value = ProcessUtils::escapeArgument($value);
- }
-
- return is_numeric($key) ? $value : "{$key}={$value}";
- })->implode(' ');
- }
-
- /**
- * Determine if the server is allowed to run this event.
- *
- * @param \Illuminate\Console\Scheduling\Event $event
- * @param \DateTimeInterface $time
- * @return bool
- */
- public function serverShouldRun(Event $event, DateTimeInterface $time)
- {
- return $this->schedulingMutex->create($event, $time);
- }
-
- /**
- * Get all of the events on the schedule that are due.
- *
- * @param \Illuminate\Contracts\Foundation\Application $app
- * @return \Illuminate\Support\Collection
- */
- public function dueEvents($app)
- {
- return collect($this->events)->filter->isDue($app);
- }
-
- /**
- * Get all of the events on the schedule.
- *
- * @return \Illuminate\Console\Scheduling\Event[]
- */
- public function events()
- {
- return $this->events;
- }
-
- /**
- * Specify the cache store that should be used to store mutexes.
- *
- * @param string $store
- * @return $this
- */
- public function useCache($store)
- {
- if ($this->eventMutex instanceof CacheEventMutex) {
- $this->eventMutex->useStore($store);
- }
-
- if ($this->schedulingMutex instanceof CacheSchedulingMutex) {
- $this->schedulingMutex->useStore($store);
- }
-
- return $this;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleFinishCommand.php b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleFinishCommand.php
deleted file mode 100644
index f697ea8..0000000
--- a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleFinishCommand.php
+++ /dev/null
@@ -1,61 +0,0 @@
-schedule = $schedule;
-
- parent::__construct();
- }
-
- /**
- * Execute the console command.
- *
- * @return void
- */
- public function handle()
- {
- collect($this->schedule->events())->filter(function ($value) {
- return $value->mutexName() == $this->argument('id');
- })->each->callAfterCallbacks($this->laravel);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleRunCommand.php b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleRunCommand.php
deleted file mode 100644
index 2169543..0000000
--- a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/ScheduleRunCommand.php
+++ /dev/null
@@ -1,115 +0,0 @@
-schedule = $schedule;
-
- $this->startedAt = Carbon::now();
-
- parent::__construct();
- }
-
- /**
- * Execute the console command.
- *
- * @return void
- */
- public function handle()
- {
- foreach ($this->schedule->dueEvents($this->laravel) as $event) {
- if (! $event->filtersPass($this->laravel)) {
- continue;
- }
-
- if ($event->onOneServer) {
- $this->runSingleServerEvent($event);
- } else {
- $this->runEvent($event);
- }
-
- $this->eventsRan = true;
- }
-
- if (! $this->eventsRan) {
- $this->info('No scheduled commands are ready to run.');
- }
- }
-
- /**
- * Run the given single server event.
- *
- * @param \Illuminate\Console\Scheduling\Event $event
- * @return void
- */
- protected function runSingleServerEvent($event)
- {
- if ($this->schedule->serverShouldRun($event, $this->startedAt)) {
- $this->runEvent($event);
- } else {
- $this->line('Skipping command (has already run on another server): '.$event->getSummaryForDisplay());
- }
- }
-
- /**
- * Run the given event.
- *
- * @param \Illuminate\Console\Scheduling\Event $event
- * @return void
- */
- protected function runEvent($event)
- {
- $this->line('Running scheduled command: '.$event->getSummaryForDisplay());
-
- $event->run($this->laravel);
-
- $this->eventsRan = true;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/SchedulingMutex.php b/vendor/laravel/framework/src/Illuminate/Console/Scheduling/SchedulingMutex.php
deleted file mode 100644
index ab4e87d..0000000
--- a/vendor/laravel/framework/src/Illuminate/Console/Scheduling/SchedulingMutex.php
+++ /dev/null
@@ -1,26 +0,0 @@
-make($segments[0]), $method], $parameters
- );
- }
-
- /**
- * Call a method that has been bound to the container.
- *
- * @param \Illuminate\Container\Container $container
- * @param callable $callback
- * @param mixed $default
- * @return mixed
- */
- protected static function callBoundMethod($container, $callback, $default)
- {
- if (! is_array($callback)) {
- return $default instanceof Closure ? $default() : $default;
- }
-
- // Here we need to turn the array callable into a Class@method string we can use to
- // examine the container and see if there are any method bindings for this given
- // method. If there are, we can call this method binding callback immediately.
- $method = static::normalizeMethod($callback);
-
- if ($container->hasMethodBinding($method)) {
- return $container->callMethodBinding($method, $callback[0]);
- }
-
- return $default instanceof Closure ? $default() : $default;
- }
-
- /**
- * Normalize the given callback into a Class@method string.
- *
- * @param callable $callback
- * @return string
- */
- protected static function normalizeMethod($callback)
- {
- $class = is_string($callback[0]) ? $callback[0] : get_class($callback[0]);
-
- return "{$class}@{$callback[1]}";
- }
-
- /**
- * Get all dependencies for a given method.
- *
- * @param \Illuminate\Container\Container $container
- * @param callable|string $callback
- * @param array $parameters
- * @return array
- */
- protected static function getMethodDependencies($container, $callback, array $parameters = [])
- {
- $dependencies = [];
-
- foreach (static::getCallReflector($callback)->getParameters() as $parameter) {
- static::addDependencyForCallParameter($container, $parameter, $parameters, $dependencies);
- }
-
- return array_merge($dependencies, $parameters);
- }
-
- /**
- * Get the proper reflection instance for the given callback.
- *
- * @param callable|string $callback
- * @return \ReflectionFunctionAbstract
- *
- * @throws \ReflectionException
- */
- protected static function getCallReflector($callback)
- {
- if (is_string($callback) && strpos($callback, '::') !== false) {
- $callback = explode('::', $callback);
- }
-
- return is_array($callback)
- ? new ReflectionMethod($callback[0], $callback[1])
- : new ReflectionFunction($callback);
- }
-
- /**
- * Get the dependency for the given call parameter.
- *
- * @param \Illuminate\Container\Container $container
- * @param \ReflectionParameter $parameter
- * @param array $parameters
- * @param array $dependencies
- * @return mixed
- */
- protected static function addDependencyForCallParameter($container, $parameter,
- array &$parameters, &$dependencies)
- {
- if (array_key_exists($parameter->name, $parameters)) {
- $dependencies[] = $parameters[$parameter->name];
-
- unset($parameters[$parameter->name]);
- } elseif ($parameter->getClass() && array_key_exists($parameter->getClass()->name, $parameters)) {
- $dependencies[] = $parameters[$parameter->getClass()->name];
-
- unset($parameters[$parameter->getClass()->name]);
- } elseif ($parameter->getClass()) {
- $dependencies[] = $container->make($parameter->getClass()->name);
- } elseif ($parameter->isDefaultValueAvailable()) {
- $dependencies[] = $parameter->getDefaultValue();
- }
- }
-
- /**
- * Determine if the given string is in Class@method syntax.
- *
- * @param mixed $callback
- * @return bool
- */
- protected static function isCallableWithAtSign($callback)
- {
- return is_string($callback) && strpos($callback, '@') !== false;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Container/Container.php b/vendor/laravel/framework/src/Illuminate/Container/Container.php
deleted file mode 100755
index 0f1becd..0000000
--- a/vendor/laravel/framework/src/Illuminate/Container/Container.php
+++ /dev/null
@@ -1,1272 +0,0 @@
-getAlias($c);
- }
-
- return new ContextualBindingBuilder($this, $aliases);
- }
-
- /**
- * Determine if the given abstract type has been bound.
- *
- * @param string $abstract
- * @return bool
- */
- public function bound($abstract)
- {
- return isset($this->bindings[$abstract]) ||
- isset($this->instances[$abstract]) ||
- $this->isAlias($abstract);
- }
-
- /**
- * {@inheritdoc}
- */
- public function has($id)
- {
- return $this->bound($id);
- }
-
- /**
- * Determine if the given abstract type has been resolved.
- *
- * @param string $abstract
- * @return bool
- */
- public function resolved($abstract)
- {
- if ($this->isAlias($abstract)) {
- $abstract = $this->getAlias($abstract);
- }
-
- return isset($this->resolved[$abstract]) ||
- isset($this->instances[$abstract]);
- }
-
- /**
- * Determine if a given type is shared.
- *
- * @param string $abstract
- * @return bool
- */
- public function isShared($abstract)
- {
- return isset($this->instances[$abstract]) ||
- (isset($this->bindings[$abstract]['shared']) &&
- $this->bindings[$abstract]['shared'] === true);
- }
-
- /**
- * Determine if a given string is an alias.
- *
- * @param string $name
- * @return bool
- */
- public function isAlias($name)
- {
- return isset($this->aliases[$name]);
- }
-
- /**
- * Register a binding with the container.
- *
- * @param string $abstract
- * @param \Closure|string|null $concrete
- * @param bool $shared
- * @return void
- */
- public function bind($abstract, $concrete = null, $shared = false)
- {
- $this->dropStaleInstances($abstract);
-
- // If no concrete type was given, we will simply set the concrete type to the
- // abstract type. After that, the concrete type to be registered as shared
- // without being forced to state their classes in both of the parameters.
- if (is_null($concrete)) {
- $concrete = $abstract;
- }
-
- // If the factory is not a Closure, it means it is just a class name which is
- // bound into this container to the abstract type and we will just wrap it
- // up inside its own Closure to give us more convenience when extending.
- if (! $concrete instanceof Closure) {
- $concrete = $this->getClosure($abstract, $concrete);
- }
-
- $this->bindings[$abstract] = compact('concrete', 'shared');
-
- // If the abstract type was already resolved in this container we'll fire the
- // rebound listener so that any objects which have already gotten resolved
- // can have their copy of the object updated via the listener callbacks.
- if ($this->resolved($abstract)) {
- $this->rebound($abstract);
- }
- }
-
- /**
- * Get the Closure to be used when building a type.
- *
- * @param string $abstract
- * @param string $concrete
- * @return \Closure
- */
- protected function getClosure($abstract, $concrete)
- {
- return function ($container, $parameters = []) use ($abstract, $concrete) {
- if ($abstract == $concrete) {
- return $container->build($concrete);
- }
-
- return $container->make($concrete, $parameters);
- };
- }
-
- /**
- * Determine if the container has a method binding.
- *
- * @param string $method
- * @return bool
- */
- public function hasMethodBinding($method)
- {
- return isset($this->methodBindings[$method]);
- }
-
- /**
- * Bind a callback to resolve with Container::call.
- *
- * @param array|string $method
- * @param \Closure $callback
- * @return void
- */
- public function bindMethod($method, $callback)
- {
- $this->methodBindings[$this->parseBindMethod($method)] = $callback;
- }
-
- /**
- * Get the method to be bound in class@method format.
- *
- * @param array|string $method
- * @return string
- */
- protected function parseBindMethod($method)
- {
- if (is_array($method)) {
- return $method[0].'@'.$method[1];
- }
-
- return $method;
- }
-
- /**
- * Get the method binding for the given method.
- *
- * @param string $method
- * @param mixed $instance
- * @return mixed
- */
- public function callMethodBinding($method, $instance)
- {
- return call_user_func($this->methodBindings[$method], $instance, $this);
- }
-
- /**
- * Add a contextual binding to the container.
- *
- * @param string $concrete
- * @param string $abstract
- * @param \Closure|string $implementation
- * @return void
- */
- public function addContextualBinding($concrete, $abstract, $implementation)
- {
- $this->contextual[$concrete][$this->getAlias($abstract)] = $implementation;
- }
-
- /**
- * Register a binding if it hasn't already been registered.
- *
- * @param string $abstract
- * @param \Closure|string|null $concrete
- * @param bool $shared
- * @return void
- */
- public function bindIf($abstract, $concrete = null, $shared = false)
- {
- if (! $this->bound($abstract)) {
- $this->bind($abstract, $concrete, $shared);
- }
- }
-
- /**
- * Register a shared binding in the container.
- *
- * @param string $abstract
- * @param \Closure|string|null $concrete
- * @return void
- */
- public function singleton($abstract, $concrete = null)
- {
- $this->bind($abstract, $concrete, true);
- }
-
- /**
- * "Extend" an abstract type in the container.
- *
- * @param string $abstract
- * @param \Closure $closure
- * @return void
- *
- * @throws \InvalidArgumentException
- */
- public function extend($abstract, Closure $closure)
- {
- $abstract = $this->getAlias($abstract);
-
- if (isset($this->instances[$abstract])) {
- $this->instances[$abstract] = $closure($this->instances[$abstract], $this);
-
- $this->rebound($abstract);
- } else {
- $this->extenders[$abstract][] = $closure;
-
- if ($this->resolved($abstract)) {
- $this->rebound($abstract);
- }
- }
- }
-
- /**
- * Register an existing instance as shared in the container.
- *
- * @param string $abstract
- * @param mixed $instance
- * @return mixed
- */
- public function instance($abstract, $instance)
- {
- $this->removeAbstractAlias($abstract);
-
- $isBound = $this->bound($abstract);
-
- unset($this->aliases[$abstract]);
-
- // We'll check to determine if this type has been bound before, and if it has
- // we will fire the rebound callbacks registered with the container and it
- // can be updated with consuming classes that have gotten resolved here.
- $this->instances[$abstract] = $instance;
-
- if ($isBound) {
- $this->rebound($abstract);
- }
-
- return $instance;
- }
-
- /**
- * Remove an alias from the contextual binding alias cache.
- *
- * @param string $searched
- * @return void
- */
- protected function removeAbstractAlias($searched)
- {
- if (! isset($this->aliases[$searched])) {
- return;
- }
-
- foreach ($this->abstractAliases as $abstract => $aliases) {
- foreach ($aliases as $index => $alias) {
- if ($alias == $searched) {
- unset($this->abstractAliases[$abstract][$index]);
- }
- }
- }
- }
-
- /**
- * Assign a set of tags to a given binding.
- *
- * @param array|string $abstracts
- * @param array|mixed ...$tags
- * @return void
- */
- public function tag($abstracts, $tags)
- {
- $tags = is_array($tags) ? $tags : array_slice(func_get_args(), 1);
-
- foreach ($tags as $tag) {
- if (! isset($this->tags[$tag])) {
- $this->tags[$tag] = [];
- }
-
- foreach ((array) $abstracts as $abstract) {
- $this->tags[$tag][] = $abstract;
- }
- }
- }
-
- /**
- * Resolve all of the bindings for a given tag.
- *
- * @param string $tag
- * @return array
- */
- public function tagged($tag)
- {
- $results = [];
-
- if (isset($this->tags[$tag])) {
- foreach ($this->tags[$tag] as $abstract) {
- $results[] = $this->make($abstract);
- }
- }
-
- return $results;
- }
-
- /**
- * Alias a type to a different name.
- *
- * @param string $abstract
- * @param string $alias
- * @return void
- */
- public function alias($abstract, $alias)
- {
- $this->aliases[$alias] = $abstract;
-
- $this->abstractAliases[$abstract][] = $alias;
- }
-
- /**
- * Bind a new callback to an abstract's rebind event.
- *
- * @param string $abstract
- * @param \Closure $callback
- * @return mixed
- */
- public function rebinding($abstract, Closure $callback)
- {
- $this->reboundCallbacks[$abstract = $this->getAlias($abstract)][] = $callback;
-
- if ($this->bound($abstract)) {
- return $this->make($abstract);
- }
- }
-
- /**
- * Refresh an instance on the given target and method.
- *
- * @param string $abstract
- * @param mixed $target
- * @param string $method
- * @return mixed
- */
- public function refresh($abstract, $target, $method)
- {
- return $this->rebinding($abstract, function ($app, $instance) use ($target, $method) {
- $target->{$method}($instance);
- });
- }
-
- /**
- * Fire the "rebound" callbacks for the given abstract type.
- *
- * @param string $abstract
- * @return void
- */
- protected function rebound($abstract)
- {
- $instance = $this->make($abstract);
-
- foreach ($this->getReboundCallbacks($abstract) as $callback) {
- call_user_func($callback, $this, $instance);
- }
- }
-
- /**
- * Get the rebound callbacks for a given type.
- *
- * @param string $abstract
- * @return array
- */
- protected function getReboundCallbacks($abstract)
- {
- if (isset($this->reboundCallbacks[$abstract])) {
- return $this->reboundCallbacks[$abstract];
- }
-
- return [];
- }
-
- /**
- * Wrap the given closure such that its dependencies will be injected when executed.
- *
- * @param \Closure $callback
- * @param array $parameters
- * @return \Closure
- */
- public function wrap(Closure $callback, array $parameters = [])
- {
- return function () use ($callback, $parameters) {
- return $this->call($callback, $parameters);
- };
- }
-
- /**
- * Call the given Closure / class@method and inject its dependencies.
- *
- * @param callable|string $callback
- * @param array $parameters
- * @param string|null $defaultMethod
- * @return mixed
- */
- public function call($callback, array $parameters = [], $defaultMethod = null)
- {
- return BoundMethod::call($this, $callback, $parameters, $defaultMethod);
- }
-
- /**
- * Get a closure to resolve the given type from the container.
- *
- * @param string $abstract
- * @return \Closure
- */
- public function factory($abstract)
- {
- return function () use ($abstract) {
- return $this->make($abstract);
- };
- }
-
- /**
- * An alias function name for make().
- *
- * @param string $abstract
- * @param array $parameters
- * @return mixed
- */
- public function makeWith($abstract, array $parameters = [])
- {
- return $this->make($abstract, $parameters);
- }
-
- /**
- * Resolve the given type from the container.
- *
- * @param string $abstract
- * @param array $parameters
- * @return mixed
- */
- public function make($abstract, array $parameters = [])
- {
- return $this->resolve($abstract, $parameters);
- }
-
- /**
- * {@inheritdoc}
- */
- public function get($id)
- {
- try {
- return $this->resolve($id);
- } catch (Exception $e) {
- if ($this->has($id)) {
- throw $e;
- }
-
- throw new EntryNotFoundException;
- }
- }
-
- /**
- * Resolve the given type from the container.
- *
- * @param string $abstract
- * @param array $parameters
- * @return mixed
- */
- protected function resolve($abstract, $parameters = [])
- {
- $abstract = $this->getAlias($abstract);
-
- $needsContextualBuild = ! empty($parameters) || ! is_null(
- $this->getContextualConcrete($abstract)
- );
-
- // If an instance of the type is currently being managed as a singleton we'll
- // just return an existing instance instead of instantiating new instances
- // so the developer can keep using the same objects instance every time.
- if (isset($this->instances[$abstract]) && ! $needsContextualBuild) {
- return $this->instances[$abstract];
- }
-
- $this->with[] = $parameters;
-
- $concrete = $this->getConcrete($abstract);
-
- // We're ready to instantiate an instance of the concrete type registered for
- // the binding. This will instantiate the types, as well as resolve any of
- // its "nested" dependencies recursively until all have gotten resolved.
- if ($this->isBuildable($concrete, $abstract)) {
- $object = $this->build($concrete);
- } else {
- $object = $this->make($concrete);
- }
-
- // If we defined any extenders for this type, we'll need to spin through them
- // and apply them to the object being built. This allows for the extension
- // of services, such as changing configuration or decorating the object.
- foreach ($this->getExtenders($abstract) as $extender) {
- $object = $extender($object, $this);
- }
-
- // If the requested type is registered as a singleton we'll want to cache off
- // the instances in "memory" so we can return it later without creating an
- // entirely new instance of an object on each subsequent request for it.
- if ($this->isShared($abstract) && ! $needsContextualBuild) {
- $this->instances[$abstract] = $object;
- }
-
- $this->fireResolvingCallbacks($abstract, $object);
-
- // Before returning, we will also set the resolved flag to "true" and pop off
- // the parameter overrides for this build. After those two things are done
- // we will be ready to return back the fully constructed class instance.
- $this->resolved[$abstract] = true;
-
- array_pop($this->with);
-
- return $object;
- }
-
- /**
- * Get the concrete type for a given abstract.
- *
- * @param string $abstract
- * @return mixed $concrete
- */
- protected function getConcrete($abstract)
- {
- if (! is_null($concrete = $this->getContextualConcrete($abstract))) {
- return $concrete;
- }
-
- // If we don't have a registered resolver or concrete for the type, we'll just
- // assume each type is a concrete name and will attempt to resolve it as is
- // since the container should be able to resolve concretes automatically.
- if (isset($this->bindings[$abstract])) {
- return $this->bindings[$abstract]['concrete'];
- }
-
- return $abstract;
- }
-
- /**
- * Get the contextual concrete binding for the given abstract.
- *
- * @param string $abstract
- * @return string|null
- */
- protected function getContextualConcrete($abstract)
- {
- if (! is_null($binding = $this->findInContextualBindings($abstract))) {
- return $binding;
- }
-
- // Next we need to see if a contextual binding might be bound under an alias of the
- // given abstract type. So, we will need to check if any aliases exist with this
- // type and then spin through them and check for contextual bindings on these.
- if (empty($this->abstractAliases[$abstract])) {
- return;
- }
-
- foreach ($this->abstractAliases[$abstract] as $alias) {
- if (! is_null($binding = $this->findInContextualBindings($alias))) {
- return $binding;
- }
- }
- }
-
- /**
- * Find the concrete binding for the given abstract in the contextual binding array.
- *
- * @param string $abstract
- * @return string|null
- */
- protected function findInContextualBindings($abstract)
- {
- if (isset($this->contextual[end($this->buildStack)][$abstract])) {
- return $this->contextual[end($this->buildStack)][$abstract];
- }
- }
-
- /**
- * Determine if the given concrete is buildable.
- *
- * @param mixed $concrete
- * @param string $abstract
- * @return bool
- */
- protected function isBuildable($concrete, $abstract)
- {
- return $concrete === $abstract || $concrete instanceof Closure;
- }
-
- /**
- * Instantiate a concrete instance of the given type.
- *
- * @param string $concrete
- * @return mixed
- *
- * @throws \Illuminate\Contracts\Container\BindingResolutionException
- */
- public function build($concrete)
- {
- // If the concrete type is actually a Closure, we will just execute it and
- // hand back the results of the functions, which allows functions to be
- // used as resolvers for more fine-tuned resolution of these objects.
- if ($concrete instanceof Closure) {
- return $concrete($this, $this->getLastParameterOverride());
- }
-
- $reflector = new ReflectionClass($concrete);
-
- // If the type is not instantiable, the developer is attempting to resolve
- // an abstract type such as an Interface or Abstract Class and there is
- // no binding registered for the abstractions so we need to bail out.
- if (! $reflector->isInstantiable()) {
- return $this->notInstantiable($concrete);
- }
-
- $this->buildStack[] = $concrete;
-
- $constructor = $reflector->getConstructor();
-
- // If there are no constructors, that means there are no dependencies then
- // we can just resolve the instances of the objects right away, without
- // resolving any other types or dependencies out of these containers.
- if (is_null($constructor)) {
- array_pop($this->buildStack);
-
- return new $concrete;
- }
-
- $dependencies = $constructor->getParameters();
-
- // Once we have all the constructor's parameters we can create each of the
- // dependency instances and then use the reflection instances to make a
- // new instance of this class, injecting the created dependencies in.
- $instances = $this->resolveDependencies(
- $dependencies
- );
-
- array_pop($this->buildStack);
-
- return $reflector->newInstanceArgs($instances);
- }
-
- /**
- * Resolve all of the dependencies from the ReflectionParameters.
- *
- * @param array $dependencies
- * @return array
- */
- protected function resolveDependencies(array $dependencies)
- {
- $results = [];
-
- foreach ($dependencies as $dependency) {
- // If this dependency has a override for this particular build we will use
- // that instead as the value. Otherwise, we will continue with this run
- // of resolutions and let reflection attempt to determine the result.
- if ($this->hasParameterOverride($dependency)) {
- $results[] = $this->getParameterOverride($dependency);
-
- continue;
- }
-
- // If the class is null, it means the dependency is a string or some other
- // primitive type which we can not resolve since it is not a class and
- // we will just bomb out with an error since we have no-where to go.
- $results[] = is_null($dependency->getClass())
- ? $this->resolvePrimitive($dependency)
- : $this->resolveClass($dependency);
- }
-
- return $results;
- }
-
- /**
- * Determine if the given dependency has a parameter override.
- *
- * @param \ReflectionParameter $dependency
- * @return bool
- */
- protected function hasParameterOverride($dependency)
- {
- return array_key_exists(
- $dependency->name, $this->getLastParameterOverride()
- );
- }
-
- /**
- * Get a parameter override for a dependency.
- *
- * @param \ReflectionParameter $dependency
- * @return mixed
- */
- protected function getParameterOverride($dependency)
- {
- return $this->getLastParameterOverride()[$dependency->name];
- }
-
- /**
- * Get the last parameter override.
- *
- * @return array
- */
- protected function getLastParameterOverride()
- {
- return count($this->with) ? end($this->with) : [];
- }
-
- /**
- * Resolve a non-class hinted primitive dependency.
- *
- * @param \ReflectionParameter $parameter
- * @return mixed
- *
- * @throws \Illuminate\Contracts\Container\BindingResolutionException
- */
- protected function resolvePrimitive(ReflectionParameter $parameter)
- {
- if (! is_null($concrete = $this->getContextualConcrete('$'.$parameter->name))) {
- return $concrete instanceof Closure ? $concrete($this) : $concrete;
- }
-
- if ($parameter->isDefaultValueAvailable()) {
- return $parameter->getDefaultValue();
- }
-
- $this->unresolvablePrimitive($parameter);
- }
-
- /**
- * Resolve a class based dependency from the container.
- *
- * @param \ReflectionParameter $parameter
- * @return mixed
- *
- * @throws \Illuminate\Contracts\Container\BindingResolutionException
- */
- protected function resolveClass(ReflectionParameter $parameter)
- {
- try {
- return $this->make($parameter->getClass()->name);
- }
-
- // If we can not resolve the class instance, we will check to see if the value
- // is optional, and if it is we will return the optional parameter value as
- // the value of the dependency, similarly to how we do this with scalars.
- catch (BindingResolutionException $e) {
- if ($parameter->isOptional()) {
- return $parameter->getDefaultValue();
- }
-
- throw $e;
- }
- }
-
- /**
- * Throw an exception that the concrete is not instantiable.
- *
- * @param string $concrete
- * @return void
- *
- * @throws \Illuminate\Contracts\Container\BindingResolutionException
- */
- protected function notInstantiable($concrete)
- {
- if (! empty($this->buildStack)) {
- $previous = implode(', ', $this->buildStack);
-
- $message = "Target [$concrete] is not instantiable while building [$previous].";
- } else {
- $message = "Target [$concrete] is not instantiable.";
- }
-
- throw new BindingResolutionException($message);
- }
-
- /**
- * Throw an exception for an unresolvable primitive.
- *
- * @param \ReflectionParameter $parameter
- * @return void
- *
- * @throws \Illuminate\Contracts\Container\BindingResolutionException
- */
- protected function unresolvablePrimitive(ReflectionParameter $parameter)
- {
- $message = "Unresolvable dependency resolving [$parameter] in class {$parameter->getDeclaringClass()->getName()}";
-
- throw new BindingResolutionException($message);
- }
-
- /**
- * Register a new resolving callback.
- *
- * @param \Closure|string $abstract
- * @param \Closure|null $callback
- * @return void
- */
- public function resolving($abstract, Closure $callback = null)
- {
- if (is_string($abstract)) {
- $abstract = $this->getAlias($abstract);
- }
-
- if (is_null($callback) && $abstract instanceof Closure) {
- $this->globalResolvingCallbacks[] = $abstract;
- } else {
- $this->resolvingCallbacks[$abstract][] = $callback;
- }
- }
-
- /**
- * Register a new after resolving callback for all types.
- *
- * @param \Closure|string $abstract
- * @param \Closure|null $callback
- * @return void
- */
- public function afterResolving($abstract, Closure $callback = null)
- {
- if (is_string($abstract)) {
- $abstract = $this->getAlias($abstract);
- }
-
- if ($abstract instanceof Closure && is_null($callback)) {
- $this->globalAfterResolvingCallbacks[] = $abstract;
- } else {
- $this->afterResolvingCallbacks[$abstract][] = $callback;
- }
- }
-
- /**
- * Fire all of the resolving callbacks.
- *
- * @param string $abstract
- * @param mixed $object
- * @return void
- */
- protected function fireResolvingCallbacks($abstract, $object)
- {
- $this->fireCallbackArray($object, $this->globalResolvingCallbacks);
-
- $this->fireCallbackArray(
- $object, $this->getCallbacksForType($abstract, $object, $this->resolvingCallbacks)
- );
-
- $this->fireAfterResolvingCallbacks($abstract, $object);
- }
-
- /**
- * Fire all of the after resolving callbacks.
- *
- * @param string $abstract
- * @param mixed $object
- * @return void
- */
- protected function fireAfterResolvingCallbacks($abstract, $object)
- {
- $this->fireCallbackArray($object, $this->globalAfterResolvingCallbacks);
-
- $this->fireCallbackArray(
- $object, $this->getCallbacksForType($abstract, $object, $this->afterResolvingCallbacks)
- );
- }
-
- /**
- * Get all callbacks for a given type.
- *
- * @param string $abstract
- * @param object $object
- * @param array $callbacksPerType
- *
- * @return array
- */
- protected function getCallbacksForType($abstract, $object, array $callbacksPerType)
- {
- $results = [];
-
- foreach ($callbacksPerType as $type => $callbacks) {
- if ($type === $abstract || $object instanceof $type) {
- $results = array_merge($results, $callbacks);
- }
- }
-
- return $results;
- }
-
- /**
- * Fire an array of callbacks with an object.
- *
- * @param mixed $object
- * @param array $callbacks
- * @return void
- */
- protected function fireCallbackArray($object, array $callbacks)
- {
- foreach ($callbacks as $callback) {
- $callback($object, $this);
- }
- }
-
- /**
- * Get the container's bindings.
- *
- * @return array
- */
- public function getBindings()
- {
- return $this->bindings;
- }
-
- /**
- * Get the alias for an abstract if available.
- *
- * @param string $abstract
- * @return string
- *
- * @throws \LogicException
- */
- public function getAlias($abstract)
- {
- if (! isset($this->aliases[$abstract])) {
- return $abstract;
- }
-
- if ($this->aliases[$abstract] === $abstract) {
- throw new LogicException("[{$abstract}] is aliased to itself.");
- }
-
- return $this->getAlias($this->aliases[$abstract]);
- }
-
- /**
- * Get the extender callbacks for a given type.
- *
- * @param string $abstract
- * @return array
- */
- protected function getExtenders($abstract)
- {
- $abstract = $this->getAlias($abstract);
-
- if (isset($this->extenders[$abstract])) {
- return $this->extenders[$abstract];
- }
-
- return [];
- }
-
- /**
- * Remove all of the extender callbacks for a given type.
- *
- * @param string $abstract
- * @return void
- */
- public function forgetExtenders($abstract)
- {
- unset($this->extenders[$this->getAlias($abstract)]);
- }
-
- /**
- * Drop all of the stale instances and aliases.
- *
- * @param string $abstract
- * @return void
- */
- protected function dropStaleInstances($abstract)
- {
- unset($this->instances[$abstract], $this->aliases[$abstract]);
- }
-
- /**
- * Remove a resolved instance from the instance cache.
- *
- * @param string $abstract
- * @return void
- */
- public function forgetInstance($abstract)
- {
- unset($this->instances[$abstract]);
- }
-
- /**
- * Clear all of the instances from the container.
- *
- * @return void
- */
- public function forgetInstances()
- {
- $this->instances = [];
- }
-
- /**
- * Flush the container of all bindings and resolved instances.
- *
- * @return void
- */
- public function flush()
- {
- $this->aliases = [];
- $this->resolved = [];
- $this->bindings = [];
- $this->instances = [];
- $this->abstractAliases = [];
- }
-
- /**
- * Set the globally available instance of the container.
- *
- * @return static
- */
- public static function getInstance()
- {
- if (is_null(static::$instance)) {
- static::$instance = new static;
- }
-
- return static::$instance;
- }
-
- /**
- * Set the shared instance of the container.
- *
- * @param \Illuminate\Contracts\Container\Container|null $container
- * @return \Illuminate\Contracts\Container\Container|static
- */
- public static function setInstance(ContainerContract $container = null)
- {
- return static::$instance = $container;
- }
-
- /**
- * Determine if a given offset exists.
- *
- * @param string $key
- * @return bool
- */
- public function offsetExists($key)
- {
- return $this->bound($key);
- }
-
- /**
- * Get the value at a given offset.
- *
- * @param string $key
- * @return mixed
- */
- public function offsetGet($key)
- {
- return $this->make($key);
- }
-
- /**
- * Set the value at a given offset.
- *
- * @param string $key
- * @param mixed $value
- * @return void
- */
- public function offsetSet($key, $value)
- {
- $this->bind($key, $value instanceof Closure ? $value : function () use ($value) {
- return $value;
- });
- }
-
- /**
- * Unset the value at a given offset.
- *
- * @param string $key
- * @return void
- */
- public function offsetUnset($key)
- {
- unset($this->bindings[$key], $this->instances[$key], $this->resolved[$key]);
- }
-
- /**
- * Dynamically access container services.
- *
- * @param string $key
- * @return mixed
- */
- public function __get($key)
- {
- return $this[$key];
- }
-
- /**
- * Dynamically set container services.
- *
- * @param string $key
- * @param mixed $value
- * @return void
- */
- public function __set($key, $value)
- {
- $this[$key] = $value;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Container/ContextualBindingBuilder.php b/vendor/laravel/framework/src/Illuminate/Container/ContextualBindingBuilder.php
deleted file mode 100644
index 2bd4b5a..0000000
--- a/vendor/laravel/framework/src/Illuminate/Container/ContextualBindingBuilder.php
+++ /dev/null
@@ -1,69 +0,0 @@
-concrete = $concrete;
- $this->container = $container;
- }
-
- /**
- * Define the abstract target that depends on the context.
- *
- * @param string $abstract
- * @return $this
- */
- public function needs($abstract)
- {
- $this->needs = $abstract;
-
- return $this;
- }
-
- /**
- * Define the implementation for the contextual binding.
- *
- * @param \Closure|string $implementation
- * @return void
- */
- public function give($implementation)
- {
- foreach (Arr::wrap($this->concrete) as $concrete) {
- $this->container->addContextualBinding($concrete, $this->needs, $implementation);
- }
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Container/EntryNotFoundException.php b/vendor/laravel/framework/src/Illuminate/Container/EntryNotFoundException.php
deleted file mode 100644
index 4266921..0000000
--- a/vendor/laravel/framework/src/Illuminate/Container/EntryNotFoundException.php
+++ /dev/null
@@ -1,11 +0,0 @@
-id = $id;
- $this->class = $class;
- $this->relations = $relations;
- $this->connection = $connection;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Contracts/Debug/ExceptionHandler.php b/vendor/laravel/framework/src/Illuminate/Contracts/Debug/ExceptionHandler.php
deleted file mode 100644
index e3f18a5..0000000
--- a/vendor/laravel/framework/src/Illuminate/Contracts/Debug/ExceptionHandler.php
+++ /dev/null
@@ -1,34 +0,0 @@
-getPathAndDomain($path, $domain, $secure, $sameSite);
-
- $time = ($minutes == 0) ? 0 : $this->availableAt($minutes * 60);
-
- return new Cookie($name, $value, $time, $path, $domain, $secure, $httpOnly, $raw, $sameSite);
- }
-
- /**
- * Create a cookie that lasts "forever" (five years).
- *
- * @param string $name
- * @param string $value
- * @param string $path
- * @param string $domain
- * @param bool|null $secure
- * @param bool $httpOnly
- * @param bool $raw
- * @param string|null $sameSite
- * @return \Symfony\Component\HttpFoundation\Cookie
- */
- public function forever($name, $value, $path = null, $domain = null, $secure = null, $httpOnly = true, $raw = false, $sameSite = null)
- {
- return $this->make($name, $value, 2628000, $path, $domain, $secure, $httpOnly, $raw, $sameSite);
- }
-
- /**
- * Expire the given cookie.
- *
- * @param string $name
- * @param string $path
- * @param string $domain
- * @return \Symfony\Component\HttpFoundation\Cookie
- */
- public function forget($name, $path = null, $domain = null)
- {
- return $this->make($name, null, -2628000, $path, $domain);
- }
-
- /**
- * Determine if a cookie has been queued.
- *
- * @param string $key
- * @return bool
- */
- public function hasQueued($key)
- {
- return ! is_null($this->queued($key));
- }
-
- /**
- * Get a queued cookie instance.
- *
- * @param string $key
- * @param mixed $default
- * @return \Symfony\Component\HttpFoundation\Cookie
- */
- public function queued($key, $default = null)
- {
- return Arr::get($this->queued, $key, $default);
- }
-
- /**
- * Queue a cookie to send with the next response.
- *
- * @param array $parameters
- * @return void
- */
- public function queue(...$parameters)
- {
- if (head($parameters) instanceof Cookie) {
- $cookie = head($parameters);
- } else {
- $cookie = call_user_func_array([$this, 'make'], $parameters);
- }
-
- $this->queued[$cookie->getName()] = $cookie;
- }
-
- /**
- * Remove a cookie from the queue.
- *
- * @param string $name
- * @return void
- */
- public function unqueue($name)
- {
- unset($this->queued[$name]);
- }
-
- /**
- * Get the path and domain, or the default values.
- *
- * @param string $path
- * @param string $domain
- * @param bool|null $secure
- * @param string $sameSite
- * @return array
- */
- protected function getPathAndDomain($path, $domain, $secure = null, $sameSite = null)
- {
- return [$path ?: $this->path, $domain ?: $this->domain, is_bool($secure) ? $secure : $this->secure, $sameSite ?: $this->sameSite];
- }
-
- /**
- * Set the default path and domain for the jar.
- *
- * @param string $path
- * @param string $domain
- * @param bool $secure
- * @param string $sameSite
- * @return $this
- */
- public function setDefaultPathAndDomain($path, $domain, $secure = false, $sameSite = null)
- {
- [$this->path, $this->domain, $this->secure, $this->sameSite] = [$path, $domain, $secure, $sameSite];
-
- return $this;
- }
-
- /**
- * Get the cookies which have been queued for the next request.
- *
- * @return \Symfony\Component\HttpFoundation\Cookie[]
- */
- public function getQueuedCookies()
- {
- return $this->queued;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Cookie/CookieServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Cookie/CookieServiceProvider.php
deleted file mode 100755
index 7c82dc1..0000000
--- a/vendor/laravel/framework/src/Illuminate/Cookie/CookieServiceProvider.php
+++ /dev/null
@@ -1,24 +0,0 @@
-app->singleton('cookie', function ($app) {
- $config = $app->make('config')->get('session');
-
- return (new CookieJar)->setDefaultPathAndDomain(
- $config['path'], $config['domain'], $config['secure'], $config['same_site'] ?? null
- );
- });
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php b/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php
deleted file mode 100644
index 4caa574..0000000
--- a/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php
+++ /dev/null
@@ -1,45 +0,0 @@
-cookies = $cookies;
- }
-
- /**
- * Handle an incoming request.
- *
- * @param \Illuminate\Http\Request $request
- * @param \Closure $next
- * @return mixed
- */
- public function handle($request, Closure $next)
- {
- $response = $next($request);
-
- foreach ($this->cookies->getQueuedCookies() as $cookie) {
- $response->headers->setCookie($cookie);
- }
-
- return $response;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php b/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php
deleted file mode 100644
index 1036a08..0000000
--- a/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php
+++ /dev/null
@@ -1,183 +0,0 @@
-encrypter = $encrypter;
- }
-
- /**
- * Disable encryption for the given cookie name(s).
- *
- * @param string|array $name
- * @return void
- */
- public function disableFor($name)
- {
- $this->except = array_merge($this->except, (array) $name);
- }
-
- /**
- * Handle an incoming request.
- *
- * @param \Illuminate\Http\Request $request
- * @param \Closure $next
- * @return \Symfony\Component\HttpFoundation\Response
- */
- public function handle($request, Closure $next)
- {
- return $this->encrypt($next($this->decrypt($request)));
- }
-
- /**
- * Decrypt the cookies on the request.
- *
- * @param \Symfony\Component\HttpFoundation\Request $request
- * @return \Symfony\Component\HttpFoundation\Request
- */
- protected function decrypt(Request $request)
- {
- foreach ($request->cookies as $key => $cookie) {
- if ($this->isDisabled($key)) {
- continue;
- }
-
- try {
- $request->cookies->set($key, $this->decryptCookie($key, $cookie));
- } catch (DecryptException $e) {
- $request->cookies->set($key, null);
- }
- }
-
- return $request;
- }
-
- /**
- * Decrypt the given cookie and return the value.
- *
- * @param string $name
- * @param string|array $cookie
- * @return string|array
- */
- protected function decryptCookie($name, $cookie)
- {
- return is_array($cookie)
- ? $this->decryptArray($cookie)
- : $this->encrypter->decrypt($cookie, static::serialized($name));
- }
-
- /**
- * Decrypt an array based cookie.
- *
- * @param array $cookie
- * @return array
- */
- protected function decryptArray(array $cookie)
- {
- $decrypted = [];
-
- foreach ($cookie as $key => $value) {
- if (is_string($value)) {
- $decrypted[$key] = $this->encrypter->decrypt($value, static::serialized($key));
- }
- }
-
- return $decrypted;
- }
-
- /**
- * Encrypt the cookies on an outgoing response.
- *
- * @param \Symfony\Component\HttpFoundation\Response $response
- * @return \Symfony\Component\HttpFoundation\Response
- */
- protected function encrypt(Response $response)
- {
- foreach ($response->headers->getCookies() as $cookie) {
- if ($this->isDisabled($cookie->getName())) {
- continue;
- }
-
- $response->headers->setCookie($this->duplicate(
- $cookie, $this->encrypter->encrypt($cookie->getValue(), static::serialized($cookie->getName()))
- ));
- }
-
- return $response;
- }
-
- /**
- * Duplicate a cookie with a new value.
- *
- * @param \Symfony\Component\HttpFoundation\Cookie $cookie
- * @param mixed $value
- * @return \Symfony\Component\HttpFoundation\Cookie
- */
- protected function duplicate(Cookie $cookie, $value)
- {
- return new Cookie(
- $cookie->getName(), $value, $cookie->getExpiresTime(),
- $cookie->getPath(), $cookie->getDomain(), $cookie->isSecure(),
- $cookie->isHttpOnly(), $cookie->isRaw(), $cookie->getSameSite()
- );
- }
-
- /**
- * Determine whether encryption has been disabled for the given cookie.
- *
- * @param string $name
- * @return bool
- */
- public function isDisabled($name)
- {
- return in_array($name, $this->except);
- }
-
- /**
- * Determine if the cookie contents should be serialized.
- *
- * @param string $name
- * @return bool
- */
- public static function serialized($name)
- {
- return static::$serialize;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Cookie/composer.json b/vendor/laravel/framework/src/Illuminate/Cookie/composer.json
deleted file mode 100755
index 014b7d2..0000000
--- a/vendor/laravel/framework/src/Illuminate/Cookie/composer.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "name": "illuminate/cookie",
- "description": "The Illuminate Cookie package.",
- "license": "MIT",
- "homepage": "https://laravel.com",
- "support": {
- "issues": "https://github.com/laravel/framework/issues",
- "source": "https://github.com/laravel/framework"
- },
- "authors": [
- {
- "name": "Taylor Otwell",
- "email": "taylor@laravel.com"
- }
- ],
- "require": {
- "php": "^7.1.3",
- "illuminate/contracts": "5.7.*",
- "illuminate/support": "5.7.*",
- "symfony/http-foundation": "^4.1",
- "symfony/http-kernel": "^4.1"
- },
- "autoload": {
- "psr-4": {
- "Illuminate\\Cookie\\": ""
- }
- },
- "extra": {
- "branch-alias": {
- "dev-master": "5.7-dev"
- }
- },
- "config": {
- "sort-packages": true
- },
- "minimum-stability": "dev"
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Capsule/Manager.php b/vendor/laravel/framework/src/Illuminate/Database/Capsule/Manager.php
deleted file mode 100755
index b82a792..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Capsule/Manager.php
+++ /dev/null
@@ -1,201 +0,0 @@
-setupContainer($container ?: new Container);
-
- // Once we have the container setup, we will setup the default configuration
- // options in the container "config" binding. This will make the database
- // manager work correctly out of the box without extreme configuration.
- $this->setupDefaultConfiguration();
-
- $this->setupManager();
- }
-
- /**
- * Setup the default database configuration options.
- *
- * @return void
- */
- protected function setupDefaultConfiguration()
- {
- $this->container['config']['database.fetch'] = PDO::FETCH_OBJ;
-
- $this->container['config']['database.default'] = 'default';
- }
-
- /**
- * Build the database manager instance.
- *
- * @return void
- */
- protected function setupManager()
- {
- $factory = new ConnectionFactory($this->container);
-
- $this->manager = new DatabaseManager($this->container, $factory);
- }
-
- /**
- * Get a connection instance from the global manager.
- *
- * @param string $connection
- * @return \Illuminate\Database\Connection
- */
- public static function connection($connection = null)
- {
- return static::$instance->getConnection($connection);
- }
-
- /**
- * Get a fluent query builder instance.
- *
- * @param string $table
- * @param string $connection
- * @return \Illuminate\Database\Query\Builder
- */
- public static function table($table, $connection = null)
- {
- return static::$instance->connection($connection)->table($table);
- }
-
- /**
- * Get a schema builder instance.
- *
- * @param string $connection
- * @return \Illuminate\Database\Schema\Builder
- */
- public static function schema($connection = null)
- {
- return static::$instance->connection($connection)->getSchemaBuilder();
- }
-
- /**
- * Get a registered connection instance.
- *
- * @param string $name
- * @return \Illuminate\Database\Connection
- */
- public function getConnection($name = null)
- {
- return $this->manager->connection($name);
- }
-
- /**
- * Register a connection with the manager.
- *
- * @param array $config
- * @param string $name
- * @return void
- */
- public function addConnection(array $config, $name = 'default')
- {
- $connections = $this->container['config']['database.connections'];
-
- $connections[$name] = $config;
-
- $this->container['config']['database.connections'] = $connections;
- }
-
- /**
- * Bootstrap Eloquent so it is ready for usage.
- *
- * @return void
- */
- public function bootEloquent()
- {
- Eloquent::setConnectionResolver($this->manager);
-
- // If we have an event dispatcher instance, we will go ahead and register it
- // with the Eloquent ORM, allowing for model callbacks while creating and
- // updating "model" instances; however, it is not necessary to operate.
- if ($dispatcher = $this->getEventDispatcher()) {
- Eloquent::setEventDispatcher($dispatcher);
- }
- }
-
- /**
- * Set the fetch mode for the database connections.
- *
- * @param int $fetchMode
- * @return $this
- */
- public function setFetchMode($fetchMode)
- {
- $this->container['config']['database.fetch'] = $fetchMode;
-
- return $this;
- }
-
- /**
- * Get the database manager instance.
- *
- * @return \Illuminate\Database\DatabaseManager
- */
- public function getDatabaseManager()
- {
- return $this->manager;
- }
-
- /**
- * Get the current event dispatcher instance.
- *
- * @return \Illuminate\Contracts\Events\Dispatcher|null
- */
- public function getEventDispatcher()
- {
- if ($this->container->bound('events')) {
- return $this->container['events'];
- }
- }
-
- /**
- * Set the event dispatcher instance to be used by connections.
- *
- * @param \Illuminate\Contracts\Events\Dispatcher $dispatcher
- * @return void
- */
- public function setEventDispatcher(Dispatcher $dispatcher)
- {
- $this->container->instance('events', $dispatcher);
- }
-
- /**
- * Dynamically pass methods to the default connection.
- *
- * @param string $method
- * @param array $parameters
- * @return mixed
- */
- public static function __callStatic($method, $parameters)
- {
- return static::connection()->$method(...$parameters);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php b/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php
deleted file mode 100644
index c712bbe..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php
+++ /dev/null
@@ -1,161 +0,0 @@
-enforceOrderBy();
-
- $page = 1;
-
- do {
- // We'll execute the query for the given page and get the results. If there are
- // no results we can just break and return from here. When there are results
- // we will call the callback with the current chunk of these results here.
- $results = $this->forPage($page, $count)->get();
-
- $countResults = $results->count();
-
- if ($countResults == 0) {
- break;
- }
-
- // On each chunk result set, we will pass them to the callback and then let the
- // developer take care of everything within the callback, which allows us to
- // keep the memory low for spinning through large result sets for working.
- if ($callback($results, $page) === false) {
- return false;
- }
-
- unset($results);
-
- $page++;
- } while ($countResults == $count);
-
- return true;
- }
-
- /**
- * Execute a callback over each item while chunking.
- *
- * @param callable $callback
- * @param int $count
- * @return bool
- */
- public function each(callable $callback, $count = 1000)
- {
- return $this->chunk($count, function ($results) use ($callback) {
- foreach ($results as $key => $value) {
- if ($callback($value, $key) === false) {
- return false;
- }
- }
- });
- }
-
- /**
- * Execute the query and get the first result.
- *
- * @param array $columns
- * @return \Illuminate\Database\Eloquent\Model|object|static|null
- */
- public function first($columns = ['*'])
- {
- return $this->take(1)->get($columns)->first();
- }
-
- /**
- * Apply the callback's query changes if the given "value" is true.
- *
- * @param mixed $value
- * @param callable $callback
- * @param callable $default
- * @return mixed|$this
- */
- public function when($value, $callback, $default = null)
- {
- if ($value) {
- return $callback($this, $value) ?: $this;
- } elseif ($default) {
- return $default($this, $value) ?: $this;
- }
-
- return $this;
- }
-
- /**
- * Pass the query to a given callback.
- *
- * @param \Closure $callback
- * @return \Illuminate\Database\Query\Builder
- */
- public function tap($callback)
- {
- return $this->when(true, $callback);
- }
-
- /**
- * Apply the callback's query changes if the given "value" is false.
- *
- * @param mixed $value
- * @param callable $callback
- * @param callable $default
- * @return mixed|$this
- */
- public function unless($value, $callback, $default = null)
- {
- if (! $value) {
- return $callback($this, $value) ?: $this;
- } elseif ($default) {
- return $default($this, $value) ?: $this;
- }
-
- return $this;
- }
-
- /**
- * Create a new length-aware paginator instance.
- *
- * @param \Illuminate\Support\Collection $items
- * @param int $total
- * @param int $perPage
- * @param int $currentPage
- * @param array $options
- * @return \Illuminate\Pagination\LengthAwarePaginator
- */
- protected function paginator($items, $total, $perPage, $currentPage, $options)
- {
- return Container::getInstance()->makeWith(LengthAwarePaginator::class, compact(
- 'items', 'total', 'perPage', 'currentPage', 'options'
- ));
- }
-
- /**
- * Create a new simple paginator instance.
- *
- * @param \Illuminate\Support\Collection $items
- * @param int $perPage
- * @param int $currentPage
- * @param array $options
- * @return \Illuminate\Pagination\Paginator
- */
- protected function simplePaginator($items, $perPage, $currentPage, $options)
- {
- return Container::getInstance()->makeWith(Paginator::class, compact(
- 'items', 'perPage', 'currentPage', 'options'
- ));
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php b/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php
deleted file mode 100644
index f8a3d66..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php
+++ /dev/null
@@ -1,242 +0,0 @@
-beginTransaction();
-
- // We'll simply execute the given callback within a try / catch block and if we
- // catch any exception we can rollback this transaction so that none of this
- // gets actually persisted to a database or stored in a permanent fashion.
- try {
- return tap($callback($this), function () {
- $this->commit();
- });
- }
-
- // If we catch an exception we'll rollback this transaction and try again if we
- // are not out of attempts. If we are out of attempts we will just throw the
- // exception back out and let the developer handle an uncaught exceptions.
- catch (Exception $e) {
- $this->handleTransactionException(
- $e, $currentAttempt, $attempts
- );
- } catch (Throwable $e) {
- $this->rollBack();
-
- throw $e;
- }
- }
- }
-
- /**
- * Handle an exception encountered when running a transacted statement.
- *
- * @param \Exception $e
- * @param int $currentAttempt
- * @param int $maxAttempts
- * @return void
- *
- * @throws \Exception
- */
- protected function handleTransactionException($e, $currentAttempt, $maxAttempts)
- {
- // On a deadlock, MySQL rolls back the entire transaction so we can't just
- // retry the query. We have to throw this exception all the way out and
- // let the developer handle it in another way. We will decrement too.
- if ($this->causedByDeadlock($e) &&
- $this->transactions > 1) {
- $this->transactions--;
-
- throw $e;
- }
-
- // If there was an exception we will rollback this transaction and then we
- // can check if we have exceeded the maximum attempt count for this and
- // if we haven't we will return and try this query again in our loop.
- $this->rollBack();
-
- if ($this->causedByDeadlock($e) &&
- $currentAttempt < $maxAttempts) {
- return;
- }
-
- throw $e;
- }
-
- /**
- * Start a new database transaction.
- *
- * @return void
- *
- * @throws \Exception
- */
- public function beginTransaction()
- {
- $this->createTransaction();
-
- $this->transactions++;
-
- $this->fireConnectionEvent('beganTransaction');
- }
-
- /**
- * Create a transaction within the database.
- *
- * @return void
- */
- protected function createTransaction()
- {
- if ($this->transactions == 0) {
- try {
- $this->getPdo()->beginTransaction();
- } catch (Exception $e) {
- $this->handleBeginTransactionException($e);
- }
- } elseif ($this->transactions >= 1 && $this->queryGrammar->supportsSavepoints()) {
- $this->createSavepoint();
- }
- }
-
- /**
- * Create a save point within the database.
- *
- * @return void
- */
- protected function createSavepoint()
- {
- $this->getPdo()->exec(
- $this->queryGrammar->compileSavepoint('trans'.($this->transactions + 1))
- );
- }
-
- /**
- * Handle an exception from a transaction beginning.
- *
- * @param \Throwable $e
- * @return void
- *
- * @throws \Exception
- */
- protected function handleBeginTransactionException($e)
- {
- if ($this->causedByLostConnection($e)) {
- $this->reconnect();
-
- $this->pdo->beginTransaction();
- } else {
- throw $e;
- }
- }
-
- /**
- * Commit the active database transaction.
- *
- * @return void
- */
- public function commit()
- {
- if ($this->transactions == 1) {
- $this->getPdo()->commit();
- }
-
- $this->transactions = max(0, $this->transactions - 1);
-
- $this->fireConnectionEvent('committed');
- }
-
- /**
- * Rollback the active database transaction.
- *
- * @param int|null $toLevel
- * @return void
- *
- * @throws \Exception
- */
- public function rollBack($toLevel = null)
- {
- // We allow developers to rollback to a certain transaction level. We will verify
- // that this given transaction level is valid before attempting to rollback to
- // that level. If it's not we will just return out and not attempt anything.
- $toLevel = is_null($toLevel)
- ? $this->transactions - 1
- : $toLevel;
-
- if ($toLevel < 0 || $toLevel >= $this->transactions) {
- return;
- }
-
- // Next, we will actually perform this rollback within this database and fire the
- // rollback event. We will also set the current transaction level to the given
- // level that was passed into this method so it will be right from here out.
- try {
- $this->performRollBack($toLevel);
- } catch (Exception $e) {
- $this->handleRollBackException($e);
- }
-
- $this->transactions = $toLevel;
-
- $this->fireConnectionEvent('rollingBack');
- }
-
- /**
- * Perform a rollback within the database.
- *
- * @param int $toLevel
- * @return void
- */
- protected function performRollBack($toLevel)
- {
- if ($toLevel == 0) {
- $this->getPdo()->rollBack();
- } elseif ($this->queryGrammar->supportsSavepoints()) {
- $this->getPdo()->exec(
- $this->queryGrammar->compileSavepointRollBack('trans'.($toLevel + 1))
- );
- }
- }
-
- /**
- * Handle an exception from a rollback.
- *
- * @param \Exception $e
- *
- * @throws \Exception
- */
- protected function handleRollBackException($e)
- {
- if ($this->causedByLostConnection($e)) {
- $this->transactions = 0;
- }
-
- throw $e;
- }
-
- /**
- * Get the number of active transactions.
- *
- * @return int
- */
- public function transactionLevel()
- {
- return $this->transactions;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Connection.php b/vendor/laravel/framework/src/Illuminate/Database/Connection.php
deleted file mode 100755
index 004545c..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Connection.php
+++ /dev/null
@@ -1,1263 +0,0 @@
-pdo = $pdo;
-
- // First we will setup the default properties. We keep track of the DB
- // name we are connected to since it is needed when some reflective
- // type commands are run such as checking whether a table exists.
- $this->database = $database;
-
- $this->tablePrefix = $tablePrefix;
-
- $this->config = $config;
-
- // We need to initialize a query grammar and the query post processors
- // which are both very important parts of the database abstractions
- // so we initialize these to their default values while starting.
- $this->useDefaultQueryGrammar();
-
- $this->useDefaultPostProcessor();
- }
-
- /**
- * Set the query grammar to the default implementation.
- *
- * @return void
- */
- public function useDefaultQueryGrammar()
- {
- $this->queryGrammar = $this->getDefaultQueryGrammar();
- }
-
- /**
- * Get the default query grammar instance.
- *
- * @return \Illuminate\Database\Query\Grammars\Grammar
- */
- protected function getDefaultQueryGrammar()
- {
- return new QueryGrammar;
- }
-
- /**
- * Set the schema grammar to the default implementation.
- *
- * @return void
- */
- public function useDefaultSchemaGrammar()
- {
- $this->schemaGrammar = $this->getDefaultSchemaGrammar();
- }
-
- /**
- * Get the default schema grammar instance.
- *
- * @return \Illuminate\Database\Schema\Grammars\Grammar
- */
- protected function getDefaultSchemaGrammar()
- {
- //
- }
-
- /**
- * Set the query post processor to the default implementation.
- *
- * @return void
- */
- public function useDefaultPostProcessor()
- {
- $this->postProcessor = $this->getDefaultPostProcessor();
- }
-
- /**
- * Get the default post processor instance.
- *
- * @return \Illuminate\Database\Query\Processors\Processor
- */
- protected function getDefaultPostProcessor()
- {
- return new Processor;
- }
-
- /**
- * Get a schema builder instance for the connection.
- *
- * @return \Illuminate\Database\Schema\Builder
- */
- public function getSchemaBuilder()
- {
- if (is_null($this->schemaGrammar)) {
- $this->useDefaultSchemaGrammar();
- }
-
- return new SchemaBuilder($this);
- }
-
- /**
- * Begin a fluent query against a database table.
- *
- * @param string $table
- * @return \Illuminate\Database\Query\Builder
- */
- public function table($table)
- {
- return $this->query()->from($table);
- }
-
- /**
- * Get a new query builder instance.
- *
- * @return \Illuminate\Database\Query\Builder
- */
- public function query()
- {
- return new QueryBuilder(
- $this, $this->getQueryGrammar(), $this->getPostProcessor()
- );
- }
-
- /**
- * Run a select statement and return a single result.
- *
- * @param string $query
- * @param array $bindings
- * @param bool $useReadPdo
- * @return mixed
- */
- public function selectOne($query, $bindings = [], $useReadPdo = true)
- {
- $records = $this->select($query, $bindings, $useReadPdo);
-
- return array_shift($records);
- }
-
- /**
- * Run a select statement against the database.
- *
- * @param string $query
- * @param array $bindings
- * @return array
- */
- public function selectFromWriteConnection($query, $bindings = [])
- {
- return $this->select($query, $bindings, false);
- }
-
- /**
- * Run a select statement against the database.
- *
- * @param string $query
- * @param array $bindings
- * @param bool $useReadPdo
- * @return array
- */
- public function select($query, $bindings = [], $useReadPdo = true)
- {
- return $this->run($query, $bindings, function ($query, $bindings) use ($useReadPdo) {
- if ($this->pretending()) {
- return [];
- }
-
- // For select statements, we'll simply execute the query and return an array
- // of the database result set. Each element in the array will be a single
- // row from the database table, and will either be an array or objects.
- $statement = $this->prepared($this->getPdoForSelect($useReadPdo)
- ->prepare($query));
-
- $this->bindValues($statement, $this->prepareBindings($bindings));
-
- $statement->execute();
-
- return $statement->fetchAll();
- });
- }
-
- /**
- * Run a select statement against the database and returns a generator.
- *
- * @param string $query
- * @param array $bindings
- * @param bool $useReadPdo
- * @return \Generator
- */
- public function cursor($query, $bindings = [], $useReadPdo = true)
- {
- $statement = $this->run($query, $bindings, function ($query, $bindings) use ($useReadPdo) {
- if ($this->pretending()) {
- return [];
- }
-
- // First we will create a statement for the query. Then, we will set the fetch
- // mode and prepare the bindings for the query. Once that's done we will be
- // ready to execute the query against the database and return the cursor.
- $statement = $this->prepared($this->getPdoForSelect($useReadPdo)
- ->prepare($query));
-
- $this->bindValues(
- $statement, $this->prepareBindings($bindings)
- );
-
- // Next, we'll execute the query against the database and return the statement
- // so we can return the cursor. The cursor will use a PHP generator to give
- // back one row at a time without using a bunch of memory to render them.
- $statement->execute();
-
- return $statement;
- });
-
- while ($record = $statement->fetch()) {
- yield $record;
- }
- }
-
- /**
- * Configure the PDO prepared statement.
- *
- * @param \PDOStatement $statement
- * @return \PDOStatement
- */
- protected function prepared(PDOStatement $statement)
- {
- $statement->setFetchMode($this->fetchMode);
-
- $this->event(new Events\StatementPrepared(
- $this, $statement
- ));
-
- return $statement;
- }
-
- /**
- * Get the PDO connection to use for a select query.
- *
- * @param bool $useReadPdo
- * @return \PDO
- */
- protected function getPdoForSelect($useReadPdo = true)
- {
- return $useReadPdo ? $this->getReadPdo() : $this->getPdo();
- }
-
- /**
- * Run an insert statement against the database.
- *
- * @param string $query
- * @param array $bindings
- * @return bool
- */
- public function insert($query, $bindings = [])
- {
- return $this->statement($query, $bindings);
- }
-
- /**
- * Run an update statement against the database.
- *
- * @param string $query
- * @param array $bindings
- * @return int
- */
- public function update($query, $bindings = [])
- {
- return $this->affectingStatement($query, $bindings);
- }
-
- /**
- * Run a delete statement against the database.
- *
- * @param string $query
- * @param array $bindings
- * @return int
- */
- public function delete($query, $bindings = [])
- {
- return $this->affectingStatement($query, $bindings);
- }
-
- /**
- * Execute an SQL statement and return the boolean result.
- *
- * @param string $query
- * @param array $bindings
- * @return bool
- */
- public function statement($query, $bindings = [])
- {
- return $this->run($query, $bindings, function ($query, $bindings) {
- if ($this->pretending()) {
- return true;
- }
-
- $statement = $this->getPdo()->prepare($query);
-
- $this->bindValues($statement, $this->prepareBindings($bindings));
-
- $this->recordsHaveBeenModified();
-
- return $statement->execute();
- });
- }
-
- /**
- * Run an SQL statement and get the number of rows affected.
- *
- * @param string $query
- * @param array $bindings
- * @return int
- */
- public function affectingStatement($query, $bindings = [])
- {
- return $this->run($query, $bindings, function ($query, $bindings) {
- if ($this->pretending()) {
- return 0;
- }
-
- // For update or delete statements, we want to get the number of rows affected
- // by the statement and return that back to the developer. We'll first need
- // to execute the statement and then we'll use PDO to fetch the affected.
- $statement = $this->getPdo()->prepare($query);
-
- $this->bindValues($statement, $this->prepareBindings($bindings));
-
- $statement->execute();
-
- $this->recordsHaveBeenModified(
- ($count = $statement->rowCount()) > 0
- );
-
- return $count;
- });
- }
-
- /**
- * Run a raw, unprepared query against the PDO connection.
- *
- * @param string $query
- * @return bool
- */
- public function unprepared($query)
- {
- return $this->run($query, [], function ($query) {
- if ($this->pretending()) {
- return true;
- }
-
- $this->recordsHaveBeenModified(
- $change = $this->getPdo()->exec($query) !== false
- );
-
- return $change;
- });
- }
-
- /**
- * Execute the given callback in "dry run" mode.
- *
- * @param \Closure $callback
- * @return array
- */
- public function pretend(Closure $callback)
- {
- return $this->withFreshQueryLog(function () use ($callback) {
- $this->pretending = true;
-
- // Basically to make the database connection "pretend", we will just return
- // the default values for all the query methods, then we will return an
- // array of queries that were "executed" within the Closure callback.
- $callback($this);
-
- $this->pretending = false;
-
- return $this->queryLog;
- });
- }
-
- /**
- * Execute the given callback in "dry run" mode.
- *
- * @param \Closure $callback
- * @return array
- */
- protected function withFreshQueryLog($callback)
- {
- $loggingQueries = $this->loggingQueries;
-
- // First we will back up the value of the logging queries property and then
- // we'll be ready to run callbacks. This query log will also get cleared
- // so we will have a new log of all the queries that are executed now.
- $this->enableQueryLog();
-
- $this->queryLog = [];
-
- // Now we'll execute this callback and capture the result. Once it has been
- // executed we will restore the value of query logging and give back the
- // value of the callback so the original callers can have the results.
- $result = $callback();
-
- $this->loggingQueries = $loggingQueries;
-
- return $result;
- }
-
- /**
- * Bind values to their parameters in the given statement.
- *
- * @param \PDOStatement $statement
- * @param array $bindings
- * @return void
- */
- public function bindValues($statement, $bindings)
- {
- foreach ($bindings as $key => $value) {
- $statement->bindValue(
- is_string($key) ? $key : $key + 1, $value,
- is_int($value) ? PDO::PARAM_INT : PDO::PARAM_STR
- );
- }
- }
-
- /**
- * Prepare the query bindings for execution.
- *
- * @param array $bindings
- * @return array
- */
- public function prepareBindings(array $bindings)
- {
- $grammar = $this->getQueryGrammar();
-
- foreach ($bindings as $key => $value) {
- // We need to transform all instances of DateTimeInterface into the actual
- // date string. Each query grammar maintains its own date string format
- // so we'll just ask the grammar for the format to get from the date.
- if ($value instanceof DateTimeInterface) {
- $bindings[$key] = $value->format($grammar->getDateFormat());
- } elseif (is_bool($value)) {
- $bindings[$key] = (int) $value;
- }
- }
-
- return $bindings;
- }
-
- /**
- * Run a SQL statement and log its execution context.
- *
- * @param string $query
- * @param array $bindings
- * @param \Closure $callback
- * @return mixed
- *
- * @throws \Illuminate\Database\QueryException
- */
- protected function run($query, $bindings, Closure $callback)
- {
- $this->reconnectIfMissingConnection();
-
- $start = microtime(true);
-
- // Here we will run this query. If an exception occurs we'll determine if it was
- // caused by a connection that has been lost. If that is the cause, we'll try
- // to re-establish connection and re-run the query with a fresh connection.
- try {
- $result = $this->runQueryCallback($query, $bindings, $callback);
- } catch (QueryException $e) {
- $result = $this->handleQueryException(
- $e, $query, $bindings, $callback
- );
- }
-
- // Once we have run the query we will calculate the time that it took to run and
- // then log the query, bindings, and execution time so we will report them on
- // the event that the developer needs them. We'll log time in milliseconds.
- $this->logQuery(
- $query, $bindings, $this->getElapsedTime($start)
- );
-
- return $result;
- }
-
- /**
- * Run a SQL statement.
- *
- * @param string $query
- * @param array $bindings
- * @param \Closure $callback
- * @return mixed
- *
- * @throws \Illuminate\Database\QueryException
- */
- protected function runQueryCallback($query, $bindings, Closure $callback)
- {
- // To execute the statement, we'll simply call the callback, which will actually
- // run the SQL against the PDO connection. Then we can calculate the time it
- // took to execute and log the query SQL, bindings and time in our memory.
- try {
- $result = $callback($query, $bindings);
- }
-
- // If an exception occurs when attempting to run a query, we'll format the error
- // message to include the bindings with SQL, which will make this exception a
- // lot more helpful to the developer instead of just the database's errors.
- catch (Exception $e) {
- throw new QueryException(
- $query, $this->prepareBindings($bindings), $e
- );
- }
-
- return $result;
- }
-
- /**
- * Log a query in the connection's query log.
- *
- * @param string $query
- * @param array $bindings
- * @param float|null $time
- * @return void
- */
- public function logQuery($query, $bindings, $time = null)
- {
- $this->event(new QueryExecuted($query, $bindings, $time, $this));
-
- if ($this->loggingQueries) {
- $this->queryLog[] = compact('query', 'bindings', 'time');
- }
- }
-
- /**
- * Get the elapsed time since a given starting point.
- *
- * @param int $start
- * @return float
- */
- protected function getElapsedTime($start)
- {
- return round((microtime(true) - $start) * 1000, 2);
- }
-
- /**
- * Handle a query exception.
- *
- * @param \Exception $e
- * @param string $query
- * @param array $bindings
- * @param \Closure $callback
- * @return mixed
- *
- * @throws \Exception
- */
- protected function handleQueryException($e, $query, $bindings, Closure $callback)
- {
- if ($this->transactions >= 1) {
- throw $e;
- }
-
- return $this->tryAgainIfCausedByLostConnection(
- $e, $query, $bindings, $callback
- );
- }
-
- /**
- * Handle a query exception that occurred during query execution.
- *
- * @param \Illuminate\Database\QueryException $e
- * @param string $query
- * @param array $bindings
- * @param \Closure $callback
- * @return mixed
- *
- * @throws \Illuminate\Database\QueryException
- */
- protected function tryAgainIfCausedByLostConnection(QueryException $e, $query, $bindings, Closure $callback)
- {
- if ($this->causedByLostConnection($e->getPrevious())) {
- $this->reconnect();
-
- return $this->runQueryCallback($query, $bindings, $callback);
- }
-
- throw $e;
- }
-
- /**
- * Reconnect to the database.
- *
- * @return void
- *
- * @throws \LogicException
- */
- public function reconnect()
- {
- if (is_callable($this->reconnector)) {
- $this->doctrineConnection = null;
-
- return call_user_func($this->reconnector, $this);
- }
-
- throw new LogicException('Lost connection and no reconnector available.');
- }
-
- /**
- * Reconnect to the database if a PDO connection is missing.
- *
- * @return void
- */
- protected function reconnectIfMissingConnection()
- {
- if (is_null($this->pdo)) {
- $this->reconnect();
- }
- }
-
- /**
- * Disconnect from the underlying PDO connection.
- *
- * @return void
- */
- public function disconnect()
- {
- $this->setPdo(null)->setReadPdo(null);
- }
-
- /**
- * Register a database query listener with the connection.
- *
- * @param \Closure $callback
- * @return void
- */
- public function listen(Closure $callback)
- {
- if (isset($this->events)) {
- $this->events->listen(Events\QueryExecuted::class, $callback);
- }
- }
-
- /**
- * Fire an event for this connection.
- *
- * @param string $event
- * @return array|null
- */
- protected function fireConnectionEvent($event)
- {
- if (! isset($this->events)) {
- return;
- }
-
- switch ($event) {
- case 'beganTransaction':
- return $this->events->dispatch(new Events\TransactionBeginning($this));
- case 'committed':
- return $this->events->dispatch(new Events\TransactionCommitted($this));
- case 'rollingBack':
- return $this->events->dispatch(new Events\TransactionRolledBack($this));
- }
- }
-
- /**
- * Fire the given event if possible.
- *
- * @param mixed $event
- * @return void
- */
- protected function event($event)
- {
- if (isset($this->events)) {
- $this->events->dispatch($event);
- }
- }
-
- /**
- * Get a new raw query expression.
- *
- * @param mixed $value
- * @return \Illuminate\Database\Query\Expression
- */
- public function raw($value)
- {
- return new Expression($value);
- }
-
- /**
- * Indicate if any records have been modified.
- *
- * @param bool $value
- * @return void
- */
- public function recordsHaveBeenModified($value = true)
- {
- if (! $this->recordsModified) {
- $this->recordsModified = $value;
- }
- }
-
- /**
- * Is Doctrine available?
- *
- * @return bool
- */
- public function isDoctrineAvailable()
- {
- return class_exists('Doctrine\DBAL\Connection');
- }
-
- /**
- * Get a Doctrine Schema Column instance.
- *
- * @param string $table
- * @param string $column
- * @return \Doctrine\DBAL\Schema\Column
- */
- public function getDoctrineColumn($table, $column)
- {
- $schema = $this->getDoctrineSchemaManager();
-
- return $schema->listTableDetails($table)->getColumn($column);
- }
-
- /**
- * Get the Doctrine DBAL schema manager for the connection.
- *
- * @return \Doctrine\DBAL\Schema\AbstractSchemaManager
- */
- public function getDoctrineSchemaManager()
- {
- return $this->getDoctrineDriver()->getSchemaManager($this->getDoctrineConnection());
- }
-
- /**
- * Get the Doctrine DBAL database connection instance.
- *
- * @return \Doctrine\DBAL\Connection
- */
- public function getDoctrineConnection()
- {
- if (is_null($this->doctrineConnection)) {
- $driver = $this->getDoctrineDriver();
-
- $this->doctrineConnection = new DoctrineConnection([
- 'pdo' => $this->getPdo(),
- 'dbname' => $this->getConfig('database'),
- 'driver' => $driver->getName(),
- ], $driver);
- }
-
- return $this->doctrineConnection;
- }
-
- /**
- * Get the current PDO connection.
- *
- * @return \PDO
- */
- public function getPdo()
- {
- if ($this->pdo instanceof Closure) {
- return $this->pdo = call_user_func($this->pdo);
- }
-
- return $this->pdo;
- }
-
- /**
- * Get the current PDO connection used for reading.
- *
- * @return \PDO
- */
- public function getReadPdo()
- {
- if ($this->transactions > 0) {
- return $this->getPdo();
- }
-
- if ($this->recordsModified && $this->getConfig('sticky')) {
- return $this->getPdo();
- }
-
- if ($this->readPdo instanceof Closure) {
- return $this->readPdo = call_user_func($this->readPdo);
- }
-
- return $this->readPdo ?: $this->getPdo();
- }
-
- /**
- * Set the PDO connection.
- *
- * @param \PDO|\Closure|null $pdo
- * @return $this
- */
- public function setPdo($pdo)
- {
- $this->transactions = 0;
-
- $this->pdo = $pdo;
-
- return $this;
- }
-
- /**
- * Set the PDO connection used for reading.
- *
- * @param \PDO|\Closure|null $pdo
- * @return $this
- */
- public function setReadPdo($pdo)
- {
- $this->readPdo = $pdo;
-
- return $this;
- }
-
- /**
- * Set the reconnect instance on the connection.
- *
- * @param callable $reconnector
- * @return $this
- */
- public function setReconnector(callable $reconnector)
- {
- $this->reconnector = $reconnector;
-
- return $this;
- }
-
- /**
- * Get the database connection name.
- *
- * @return string|null
- */
- public function getName()
- {
- return $this->getConfig('name');
- }
-
- /**
- * Get an option from the configuration options.
- *
- * @param string|null $option
- * @return mixed
- */
- public function getConfig($option = null)
- {
- return Arr::get($this->config, $option);
- }
-
- /**
- * Get the PDO driver name.
- *
- * @return string
- */
- public function getDriverName()
- {
- return $this->getConfig('driver');
- }
-
- /**
- * Get the query grammar used by the connection.
- *
- * @return \Illuminate\Database\Query\Grammars\Grammar
- */
- public function getQueryGrammar()
- {
- return $this->queryGrammar;
- }
-
- /**
- * Set the query grammar used by the connection.
- *
- * @param \Illuminate\Database\Query\Grammars\Grammar $grammar
- * @return $this
- */
- public function setQueryGrammar(Query\Grammars\Grammar $grammar)
- {
- $this->queryGrammar = $grammar;
-
- return $this;
- }
-
- /**
- * Get the schema grammar used by the connection.
- *
- * @return \Illuminate\Database\Schema\Grammars\Grammar
- */
- public function getSchemaGrammar()
- {
- return $this->schemaGrammar;
- }
-
- /**
- * Set the schema grammar used by the connection.
- *
- * @param \Illuminate\Database\Schema\Grammars\Grammar $grammar
- * @return $this
- */
- public function setSchemaGrammar(Schema\Grammars\Grammar $grammar)
- {
- $this->schemaGrammar = $grammar;
-
- return $this;
- }
-
- /**
- * Get the query post processor used by the connection.
- *
- * @return \Illuminate\Database\Query\Processors\Processor
- */
- public function getPostProcessor()
- {
- return $this->postProcessor;
- }
-
- /**
- * Set the query post processor used by the connection.
- *
- * @param \Illuminate\Database\Query\Processors\Processor $processor
- * @return $this
- */
- public function setPostProcessor(Processor $processor)
- {
- $this->postProcessor = $processor;
-
- return $this;
- }
-
- /**
- * Get the event dispatcher used by the connection.
- *
- * @return \Illuminate\Contracts\Events\Dispatcher
- */
- public function getEventDispatcher()
- {
- return $this->events;
- }
-
- /**
- * Set the event dispatcher instance on the connection.
- *
- * @param \Illuminate\Contracts\Events\Dispatcher $events
- * @return $this
- */
- public function setEventDispatcher(Dispatcher $events)
- {
- $this->events = $events;
-
- return $this;
- }
-
- /**
- * Unset the event dispatcher for this connection.
- *
- * @return void
- */
- public function unsetEventDispatcher()
- {
- $this->events = null;
- }
-
- /**
- * Determine if the connection in a "dry run".
- *
- * @return bool
- */
- public function pretending()
- {
- return $this->pretending === true;
- }
-
- /**
- * Get the connection query log.
- *
- * @return array
- */
- public function getQueryLog()
- {
- return $this->queryLog;
- }
-
- /**
- * Clear the query log.
- *
- * @return void
- */
- public function flushQueryLog()
- {
- $this->queryLog = [];
- }
-
- /**
- * Enable the query log on the connection.
- *
- * @return void
- */
- public function enableQueryLog()
- {
- $this->loggingQueries = true;
- }
-
- /**
- * Disable the query log on the connection.
- *
- * @return void
- */
- public function disableQueryLog()
- {
- $this->loggingQueries = false;
- }
-
- /**
- * Determine whether we're logging queries.
- *
- * @return bool
- */
- public function logging()
- {
- return $this->loggingQueries;
- }
-
- /**
- * Get the name of the connected database.
- *
- * @return string
- */
- public function getDatabaseName()
- {
- return $this->database;
- }
-
- /**
- * Set the name of the connected database.
- *
- * @param string $database
- * @return $this
- */
- public function setDatabaseName($database)
- {
- $this->database = $database;
-
- return $this;
- }
-
- /**
- * Get the table prefix for the connection.
- *
- * @return string
- */
- public function getTablePrefix()
- {
- return $this->tablePrefix;
- }
-
- /**
- * Set the table prefix in use by the connection.
- *
- * @param string $prefix
- * @return $this
- */
- public function setTablePrefix($prefix)
- {
- $this->tablePrefix = $prefix;
-
- $this->getQueryGrammar()->setTablePrefix($prefix);
-
- return $this;
- }
-
- /**
- * Set the table prefix and return the grammar.
- *
- * @param \Illuminate\Database\Grammar $grammar
- * @return \Illuminate\Database\Grammar
- */
- public function withTablePrefix(Grammar $grammar)
- {
- $grammar->setTablePrefix($this->tablePrefix);
-
- return $grammar;
- }
-
- /**
- * Register a connection resolver.
- *
- * @param string $driver
- * @param \Closure $callback
- * @return void
- */
- public static function resolverFor($driver, Closure $callback)
- {
- static::$resolvers[$driver] = $callback;
- }
-
- /**
- * Get the connection resolver for the given driver.
- *
- * @param string $driver
- * @return mixed
- */
- public static function getResolver($driver)
- {
- return static::$resolvers[$driver] ?? null;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/ConnectionInterface.php b/vendor/laravel/framework/src/Illuminate/Database/ConnectionInterface.php
deleted file mode 100755
index 56127e1..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/ConnectionInterface.php
+++ /dev/null
@@ -1,162 +0,0 @@
- $connection) {
- $this->addConnection($name, $connection);
- }
- }
-
- /**
- * Get a database connection instance.
- *
- * @param string $name
- * @return \Illuminate\Database\ConnectionInterface
- */
- public function connection($name = null)
- {
- if (is_null($name)) {
- $name = $this->getDefaultConnection();
- }
-
- return $this->connections[$name];
- }
-
- /**
- * Add a connection to the resolver.
- *
- * @param string $name
- * @param \Illuminate\Database\ConnectionInterface $connection
- * @return void
- */
- public function addConnection($name, ConnectionInterface $connection)
- {
- $this->connections[$name] = $connection;
- }
-
- /**
- * Check if a connection has been registered.
- *
- * @param string $name
- * @return bool
- */
- public function hasConnection($name)
- {
- return isset($this->connections[$name]);
- }
-
- /**
- * Get the default connection name.
- *
- * @return string
- */
- public function getDefaultConnection()
- {
- return $this->default;
- }
-
- /**
- * Set the default connection name.
- *
- * @param string $name
- * @return void
- */
- public function setDefaultConnection($name)
- {
- $this->default = $name;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/ConnectionResolverInterface.php b/vendor/laravel/framework/src/Illuminate/Database/ConnectionResolverInterface.php
deleted file mode 100755
index eb0397a..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/ConnectionResolverInterface.php
+++ /dev/null
@@ -1,29 +0,0 @@
-container = $container;
- }
-
- /**
- * Establish a PDO connection based on the configuration.
- *
- * @param array $config
- * @param string $name
- * @return \Illuminate\Database\Connection
- */
- public function make(array $config, $name = null)
- {
- $config = $this->parseConfig($config, $name);
-
- if (isset($config['read'])) {
- return $this->createReadWriteConnection($config);
- }
-
- return $this->createSingleConnection($config);
- }
-
- /**
- * Parse and prepare the database configuration.
- *
- * @param array $config
- * @param string $name
- * @return array
- */
- protected function parseConfig(array $config, $name)
- {
- return Arr::add(Arr::add($config, 'prefix', ''), 'name', $name);
- }
-
- /**
- * Create a single database connection instance.
- *
- * @param array $config
- * @return \Illuminate\Database\Connection
- */
- protected function createSingleConnection(array $config)
- {
- $pdo = $this->createPdoResolver($config);
-
- return $this->createConnection(
- $config['driver'], $pdo, $config['database'], $config['prefix'], $config
- );
- }
-
- /**
- * Create a single database connection instance.
- *
- * @param array $config
- * @return \Illuminate\Database\Connection
- */
- protected function createReadWriteConnection(array $config)
- {
- $connection = $this->createSingleConnection($this->getWriteConfig($config));
-
- return $connection->setReadPdo($this->createReadPdo($config));
- }
-
- /**
- * Create a new PDO instance for reading.
- *
- * @param array $config
- * @return \Closure
- */
- protected function createReadPdo(array $config)
- {
- return $this->createPdoResolver($this->getReadConfig($config));
- }
-
- /**
- * Get the read configuration for a read / write connection.
- *
- * @param array $config
- * @return array
- */
- protected function getReadConfig(array $config)
- {
- return $this->mergeReadWriteConfig(
- $config, $this->getReadWriteConfig($config, 'read')
- );
- }
-
- /**
- * Get the read configuration for a read / write connection.
- *
- * @param array $config
- * @return array
- */
- protected function getWriteConfig(array $config)
- {
- return $this->mergeReadWriteConfig(
- $config, $this->getReadWriteConfig($config, 'write')
- );
- }
-
- /**
- * Get a read / write level configuration.
- *
- * @param array $config
- * @param string $type
- * @return array
- */
- protected function getReadWriteConfig(array $config, $type)
- {
- return isset($config[$type][0])
- ? Arr::random($config[$type])
- : $config[$type];
- }
-
- /**
- * Merge a configuration for a read / write connection.
- *
- * @param array $config
- * @param array $merge
- * @return array
- */
- protected function mergeReadWriteConfig(array $config, array $merge)
- {
- return Arr::except(array_merge($config, $merge), ['read', 'write']);
- }
-
- /**
- * Create a new Closure that resolves to a PDO instance.
- *
- * @param array $config
- * @return \Closure
- */
- protected function createPdoResolver(array $config)
- {
- return array_key_exists('host', $config)
- ? $this->createPdoResolverWithHosts($config)
- : $this->createPdoResolverWithoutHosts($config);
- }
-
- /**
- * Create a new Closure that resolves to a PDO instance with a specific host or an array of hosts.
- *
- * @param array $config
- * @return \Closure
- */
- protected function createPdoResolverWithHosts(array $config)
- {
- return function () use ($config) {
- foreach (Arr::shuffle($hosts = $this->parseHosts($config)) as $key => $host) {
- $config['host'] = $host;
-
- try {
- return $this->createConnector($config)->connect($config);
- } catch (PDOException $e) {
- continue;
- }
- }
-
- throw $e;
- };
- }
-
- /**
- * Parse the hosts configuration item into an array.
- *
- * @param array $config
- * @return array
- */
- protected function parseHosts(array $config)
- {
- $hosts = Arr::wrap($config['host']);
-
- if (empty($hosts)) {
- throw new InvalidArgumentException('Database hosts array is empty.');
- }
-
- return $hosts;
- }
-
- /**
- * Create a new Closure that resolves to a PDO instance where there is no configured host.
- *
- * @param array $config
- * @return \Closure
- */
- protected function createPdoResolverWithoutHosts(array $config)
- {
- return function () use ($config) {
- return $this->createConnector($config)->connect($config);
- };
- }
-
- /**
- * Create a connector instance based on the configuration.
- *
- * @param array $config
- * @return \Illuminate\Database\Connectors\ConnectorInterface
- *
- * @throws \InvalidArgumentException
- */
- public function createConnector(array $config)
- {
- if (! isset($config['driver'])) {
- throw new InvalidArgumentException('A driver must be specified.');
- }
-
- if ($this->container->bound($key = "db.connector.{$config['driver']}")) {
- return $this->container->make($key);
- }
-
- switch ($config['driver']) {
- case 'mysql':
- return new MySqlConnector;
- case 'pgsql':
- return new PostgresConnector;
- case 'sqlite':
- return new SQLiteConnector;
- case 'sqlsrv':
- return new SqlServerConnector;
- }
-
- throw new InvalidArgumentException("Unsupported driver [{$config['driver']}]");
- }
-
- /**
- * Create a new connection instance.
- *
- * @param string $driver
- * @param \PDO|\Closure $connection
- * @param string $database
- * @param string $prefix
- * @param array $config
- * @return \Illuminate\Database\Connection
- *
- * @throws \InvalidArgumentException
- */
- protected function createConnection($driver, $connection, $database, $prefix = '', array $config = [])
- {
- if ($resolver = Connection::getResolver($driver)) {
- return $resolver($connection, $database, $prefix, $config);
- }
-
- switch ($driver) {
- case 'mysql':
- return new MySqlConnection($connection, $database, $prefix, $config);
- case 'pgsql':
- return new PostgresConnection($connection, $database, $prefix, $config);
- case 'sqlite':
- return new SQLiteConnection($connection, $database, $prefix, $config);
- case 'sqlsrv':
- return new SqlServerConnection($connection, $database, $prefix, $config);
- }
-
- throw new InvalidArgumentException("Unsupported driver [{$driver}]");
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php b/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php
deleted file mode 100755
index ab0903d..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php
+++ /dev/null
@@ -1,139 +0,0 @@
- PDO::CASE_NATURAL,
- PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
- PDO::ATTR_ORACLE_NULLS => PDO::NULL_NATURAL,
- PDO::ATTR_STRINGIFY_FETCHES => false,
- PDO::ATTR_EMULATE_PREPARES => false,
- ];
-
- /**
- * Create a new PDO connection.
- *
- * @param string $dsn
- * @param array $config
- * @param array $options
- * @return \PDO
- *
- * @throws \Exception
- */
- public function createConnection($dsn, array $config, array $options)
- {
- [$username, $password] = [
- $config['username'] ?? null, $config['password'] ?? null,
- ];
-
- try {
- return $this->createPdoConnection(
- $dsn, $username, $password, $options
- );
- } catch (Exception $e) {
- return $this->tryAgainIfCausedByLostConnection(
- $e, $dsn, $username, $password, $options
- );
- }
- }
-
- /**
- * Create a new PDO connection instance.
- *
- * @param string $dsn
- * @param string $username
- * @param string $password
- * @param array $options
- * @return \PDO
- */
- protected function createPdoConnection($dsn, $username, $password, $options)
- {
- if (class_exists(PDOConnection::class) && ! $this->isPersistentConnection($options)) {
- return new PDOConnection($dsn, $username, $password, $options);
- }
-
- return new PDO($dsn, $username, $password, $options);
- }
-
- /**
- * Determine if the connection is persistent.
- *
- * @param array $options
- * @return bool
- */
- protected function isPersistentConnection($options)
- {
- return isset($options[PDO::ATTR_PERSISTENT]) &&
- $options[PDO::ATTR_PERSISTENT];
- }
-
- /**
- * Handle an exception that occurred during connect execution.
- *
- * @param \Throwable $e
- * @param string $dsn
- * @param string $username
- * @param string $password
- * @param array $options
- * @return \PDO
- *
- * @throws \Exception
- */
- protected function tryAgainIfCausedByLostConnection(Throwable $e, $dsn, $username, $password, $options)
- {
- if ($this->causedByLostConnection($e)) {
- return $this->createPdoConnection($dsn, $username, $password, $options);
- }
-
- throw $e;
- }
-
- /**
- * Get the PDO options based on the configuration.
- *
- * @param array $config
- * @return array
- */
- public function getOptions(array $config)
- {
- $options = $config['options'] ?? [];
-
- return array_diff_key($this->options, $options) + $options;
- }
-
- /**
- * Get the default PDO connection options.
- *
- * @return array
- */
- public function getDefaultOptions()
- {
- return $this->options;
- }
-
- /**
- * Set the default PDO connection options.
- *
- * @param array $options
- * @return void
- */
- public function setDefaultOptions(array $options)
- {
- $this->options = $options;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectorInterface.php b/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectorInterface.php
deleted file mode 100755
index 08597ac..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectorInterface.php
+++ /dev/null
@@ -1,14 +0,0 @@
-getDsn($config);
-
- $options = $this->getOptions($config);
-
- // We need to grab the PDO options that should be used while making the brand
- // new connection instance. The PDO options control various aspects of the
- // connection's behavior, and some might be specified by the developers.
- $connection = $this->createConnection($dsn, $config, $options);
-
- if (! empty($config['database'])) {
- $connection->exec("use `{$config['database']}`;");
- }
-
- $this->configureEncoding($connection, $config);
-
- // Next, we will check to see if a timezone has been specified in this config
- // and if it has we will issue a statement to modify the timezone with the
- // database. Setting this DB timezone is an optional configuration item.
- $this->configureTimezone($connection, $config);
-
- $this->setModes($connection, $config);
-
- return $connection;
- }
-
- /**
- * Set the connection character set and collation.
- *
- * @param \PDO $connection
- * @param array $config
- * @return void
- */
- protected function configureEncoding($connection, array $config)
- {
- if (! isset($config['charset'])) {
- return $connection;
- }
-
- $connection->prepare(
- "set names '{$config['charset']}'".$this->getCollation($config)
- )->execute();
- }
-
- /**
- * Get the collation for the configuration.
- *
- * @param array $config
- * @return string
- */
- protected function getCollation(array $config)
- {
- return isset($config['collation']) ? " collate '{$config['collation']}'" : '';
- }
-
- /**
- * Set the timezone on the connection.
- *
- * @param \PDO $connection
- * @param array $config
- * @return void
- */
- protected function configureTimezone($connection, array $config)
- {
- if (isset($config['timezone'])) {
- $connection->prepare('set time_zone="'.$config['timezone'].'"')->execute();
- }
- }
-
- /**
- * Create a DSN string from a configuration.
- *
- * Chooses socket or host/port based on the 'unix_socket' config value.
- *
- * @param array $config
- * @return string
- */
- protected function getDsn(array $config)
- {
- return $this->hasSocket($config)
- ? $this->getSocketDsn($config)
- : $this->getHostDsn($config);
- }
-
- /**
- * Determine if the given configuration array has a UNIX socket value.
- *
- * @param array $config
- * @return bool
- */
- protected function hasSocket(array $config)
- {
- return isset($config['unix_socket']) && ! empty($config['unix_socket']);
- }
-
- /**
- * Get the DSN string for a socket configuration.
- *
- * @param array $config
- * @return string
- */
- protected function getSocketDsn(array $config)
- {
- return "mysql:unix_socket={$config['unix_socket']};dbname={$config['database']}";
- }
-
- /**
- * Get the DSN string for a host / port configuration.
- *
- * @param array $config
- * @return string
- */
- protected function getHostDsn(array $config)
- {
- extract($config, EXTR_SKIP);
-
- return isset($port)
- ? "mysql:host={$host};port={$port};dbname={$database}"
- : "mysql:host={$host};dbname={$database}";
- }
-
- /**
- * Set the modes for the connection.
- *
- * @param \PDO $connection
- * @param array $config
- * @return void
- */
- protected function setModes(PDO $connection, array $config)
- {
- if (isset($config['modes'])) {
- $this->setCustomModes($connection, $config);
- } elseif (isset($config['strict'])) {
- if ($config['strict']) {
- $connection->prepare($this->strictMode($connection))->execute();
- } else {
- $connection->prepare("set session sql_mode='NO_ENGINE_SUBSTITUTION'")->execute();
- }
- }
- }
-
- /**
- * Set the custom modes on the connection.
- *
- * @param \PDO $connection
- * @param array $config
- * @return void
- */
- protected function setCustomModes(PDO $connection, array $config)
- {
- $modes = implode(',', $config['modes']);
-
- $connection->prepare("set session sql_mode='{$modes}'")->execute();
- }
-
- /**
- * Get the query to enable strict mode.
- *
- * @param \PDO $connection
- * @return string
- */
- protected function strictMode(PDO $connection)
- {
- if (version_compare($connection->getAttribute(PDO::ATTR_SERVER_VERSION), '8.0.11') >= 0) {
- return "set session sql_mode='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'";
- }
-
- return "set session sql_mode='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'";
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Connectors/PostgresConnector.php b/vendor/laravel/framework/src/Illuminate/Database/Connectors/PostgresConnector.php
deleted file mode 100755
index c80fea6..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Connectors/PostgresConnector.php
+++ /dev/null
@@ -1,176 +0,0 @@
- PDO::CASE_NATURAL,
- PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
- PDO::ATTR_ORACLE_NULLS => PDO::NULL_NATURAL,
- PDO::ATTR_STRINGIFY_FETCHES => false,
- ];
-
- /**
- * Establish a database connection.
- *
- * @param array $config
- * @return \PDO
- */
- public function connect(array $config)
- {
- // First we'll create the basic DSN and connection instance connecting to the
- // using the configuration option specified by the developer. We will also
- // set the default character set on the connections to UTF-8 by default.
- $connection = $this->createConnection(
- $this->getDsn($config), $config, $this->getOptions($config)
- );
-
- $this->configureEncoding($connection, $config);
-
- // Next, we will check to see if a timezone has been specified in this config
- // and if it has we will issue a statement to modify the timezone with the
- // database. Setting this DB timezone is an optional configuration item.
- $this->configureTimezone($connection, $config);
-
- $this->configureSchema($connection, $config);
-
- // Postgres allows an application_name to be set by the user and this name is
- // used to when monitoring the application with pg_stat_activity. So we'll
- // determine if the option has been specified and run a statement if so.
- $this->configureApplicationName($connection, $config);
-
- return $connection;
- }
-
- /**
- * Set the connection character set and collation.
- *
- * @param \PDO $connection
- * @param array $config
- * @return void
- */
- protected function configureEncoding($connection, $config)
- {
- if (! isset($config['charset'])) {
- return;
- }
-
- $connection->prepare("set names '{$config['charset']}'")->execute();
- }
-
- /**
- * Set the timezone on the connection.
- *
- * @param \PDO $connection
- * @param array $config
- * @return void
- */
- protected function configureTimezone($connection, array $config)
- {
- if (isset($config['timezone'])) {
- $timezone = $config['timezone'];
-
- $connection->prepare("set time zone '{$timezone}'")->execute();
- }
- }
-
- /**
- * Set the schema on the connection.
- *
- * @param \PDO $connection
- * @param array $config
- * @return void
- */
- protected function configureSchema($connection, $config)
- {
- if (isset($config['schema'])) {
- $schema = $this->formatSchema($config['schema']);
-
- $connection->prepare("set search_path to {$schema}")->execute();
- }
- }
-
- /**
- * Format the schema for the DSN.
- *
- * @param array|string $schema
- * @return string
- */
- protected function formatSchema($schema)
- {
- if (is_array($schema)) {
- return '"'.implode('", "', $schema).'"';
- }
-
- return '"'.$schema.'"';
- }
-
- /**
- * Set the schema on the connection.
- *
- * @param \PDO $connection
- * @param array $config
- * @return void
- */
- protected function configureApplicationName($connection, $config)
- {
- if (isset($config['application_name'])) {
- $applicationName = $config['application_name'];
-
- $connection->prepare("set application_name to '$applicationName'")->execute();
- }
- }
-
- /**
- * Create a DSN string from a configuration.
- *
- * @param array $config
- * @return string
- */
- protected function getDsn(array $config)
- {
- // First we will create the basic DSN setup as well as the port if it is in
- // in the configuration options. This will give us the basic DSN we will
- // need to establish the PDO connections and return them back for use.
- extract($config, EXTR_SKIP);
-
- $host = isset($host) ? "host={$host};" : '';
-
- $dsn = "pgsql:{$host}dbname={$database}";
-
- // If a port was specified, we will add it to this Postgres DSN connections
- // format. Once we have done that we are ready to return this connection
- // string back out for usage, as this has been fully constructed here.
- if (isset($config['port'])) {
- $dsn .= ";port={$port}";
- }
-
- return $this->addSslOptions($dsn, $config);
- }
-
- /**
- * Add the SSL options to the DSN.
- *
- * @param string $dsn
- * @param array $config
- * @return string
- */
- protected function addSslOptions($dsn, array $config)
- {
- foreach (['sslmode', 'sslcert', 'sslkey', 'sslrootcert'] as $option) {
- if (isset($config[$option])) {
- $dsn .= ";{$option}={$config[$option]}";
- }
- }
-
- return $dsn;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Connectors/SQLiteConnector.php b/vendor/laravel/framework/src/Illuminate/Database/Connectors/SQLiteConnector.php
deleted file mode 100755
index 90dc16b..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Connectors/SQLiteConnector.php
+++ /dev/null
@@ -1,39 +0,0 @@
-getOptions($config);
-
- // SQLite supports "in-memory" databases that only last as long as the owning
- // connection does. These are useful for tests or for short lifetime store
- // querying. In-memory databases may only have a single open connection.
- if ($config['database'] === ':memory:') {
- return $this->createConnection('sqlite::memory:', $config, $options);
- }
-
- $path = realpath($config['database']);
-
- // Here we'll verify that the SQLite database exists before going any further
- // as the developer probably wants to know if the database exists and this
- // SQLite driver will not throw any exception if it does not by default.
- if ($path === false) {
- throw new InvalidArgumentException("Database ({$config['database']}) does not exist.");
- }
-
- return $this->createConnection("sqlite:{$path}", $config, $options);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Connectors/SqlServerConnector.php b/vendor/laravel/framework/src/Illuminate/Database/Connectors/SqlServerConnector.php
deleted file mode 100755
index 6cfc33f..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Connectors/SqlServerConnector.php
+++ /dev/null
@@ -1,185 +0,0 @@
- PDO::CASE_NATURAL,
- PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
- PDO::ATTR_ORACLE_NULLS => PDO::NULL_NATURAL,
- PDO::ATTR_STRINGIFY_FETCHES => false,
- ];
-
- /**
- * Establish a database connection.
- *
- * @param array $config
- * @return \PDO
- */
- public function connect(array $config)
- {
- $options = $this->getOptions($config);
-
- return $this->createConnection($this->getDsn($config), $config, $options);
- }
-
- /**
- * Create a DSN string from a configuration.
- *
- * @param array $config
- * @return string
- */
- protected function getDsn(array $config)
- {
- // First we will create the basic DSN setup as well as the port if it is in
- // in the configuration options. This will give us the basic DSN we will
- // need to establish the PDO connections and return them back for use.
- if ($this->prefersOdbc($config)) {
- return $this->getOdbcDsn($config);
- }
-
- if (in_array('sqlsrv', $this->getAvailableDrivers())) {
- return $this->getSqlSrvDsn($config);
- } else {
- return $this->getDblibDsn($config);
- }
- }
-
- /**
- * Determine if the database configuration prefers ODBC.
- *
- * @param array $config
- * @return bool
- */
- protected function prefersOdbc(array $config)
- {
- return in_array('odbc', $this->getAvailableDrivers()) &&
- ($config['odbc'] ?? null) === true;
- }
-
- /**
- * Get the DSN string for a DbLib connection.
- *
- * @param array $config
- * @return string
- */
- protected function getDblibDsn(array $config)
- {
- return $this->buildConnectString('dblib', array_merge([
- 'host' => $this->buildHostString($config, ':'),
- 'dbname' => $config['database'],
- ], Arr::only($config, ['appname', 'charset', 'version'])));
- }
-
- /**
- * Get the DSN string for an ODBC connection.
- *
- * @param array $config
- * @return string
- */
- protected function getOdbcDsn(array $config)
- {
- return isset($config['odbc_datasource_name'])
- ? 'odbc:'.$config['odbc_datasource_name'] : '';
- }
-
- /**
- * Get the DSN string for a SqlSrv connection.
- *
- * @param array $config
- * @return string
- */
- protected function getSqlSrvDsn(array $config)
- {
- $arguments = [
- 'Server' => $this->buildHostString($config, ','),
- ];
-
- if (isset($config['database'])) {
- $arguments['Database'] = $config['database'];
- }
-
- if (isset($config['readonly'])) {
- $arguments['ApplicationIntent'] = 'ReadOnly';
- }
-
- if (isset($config['pooling']) && $config['pooling'] === false) {
- $arguments['ConnectionPooling'] = '0';
- }
-
- if (isset($config['appname'])) {
- $arguments['APP'] = $config['appname'];
- }
-
- if (isset($config['encrypt'])) {
- $arguments['Encrypt'] = $config['encrypt'];
- }
-
- if (isset($config['trust_server_certificate'])) {
- $arguments['TrustServerCertificate'] = $config['trust_server_certificate'];
- }
-
- if (isset($config['multiple_active_result_sets']) && $config['multiple_active_result_sets'] === false) {
- $arguments['MultipleActiveResultSets'] = 'false';
- }
-
- if (isset($config['transaction_isolation'])) {
- $arguments['TransactionIsolation'] = $config['transaction_isolation'];
- }
-
- if (isset($config['multi_subnet_failover'])) {
- $arguments['MultiSubnetFailover'] = $config['multi_subnet_failover'];
- }
-
- return $this->buildConnectString('sqlsrv', $arguments);
- }
-
- /**
- * Build a connection string from the given arguments.
- *
- * @param string $driver
- * @param array $arguments
- * @return string
- */
- protected function buildConnectString($driver, array $arguments)
- {
- return $driver.':'.implode(';', array_map(function ($key) use ($arguments) {
- return sprintf('%s=%s', $key, $arguments[$key]);
- }, array_keys($arguments)));
- }
-
- /**
- * Build a host string from the given configuration.
- *
- * @param array $config
- * @param string $separator
- * @return string
- */
- protected function buildHostString(array $config, $separator)
- {
- if (isset($config['port']) && ! empty($config['port'])) {
- return $config['host'].$separator.$config['port'];
- } else {
- return $config['host'];
- }
- }
-
- /**
- * Get the available PDO drivers.
- *
- * @return array
- */
- protected function getAvailableDrivers()
- {
- return PDO::getAvailableDrivers();
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Factories/FactoryMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Factories/FactoryMakeCommand.php
deleted file mode 100644
index 8634159..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Console/Factories/FactoryMakeCommand.php
+++ /dev/null
@@ -1,84 +0,0 @@
-option('model')
- ? $this->qualifyClass($this->option('model'))
- : 'Model';
-
- return str_replace(
- 'DummyModel', $model, parent::buildClass($name)
- );
- }
-
- /**
- * Get the destination class path.
- *
- * @param string $name
- * @return string
- */
- protected function getPath($name)
- {
- $name = str_replace(
- ['\\', '/'], '', $this->argument('name')
- );
-
- return $this->laravel->databasePath()."/factories/{$name}.php";
- }
-
- /**
- * Get the console command options.
- *
- * @return array
- */
- protected function getOptions()
- {
- return [
- ['model', 'm', InputOption::VALUE_OPTIONAL, 'The name of the model'],
- ];
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Factories/stubs/factory.stub b/vendor/laravel/framework/src/Illuminate/Database/Console/Factories/stubs/factory.stub
deleted file mode 100644
index 9e3f90b..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Console/Factories/stubs/factory.stub
+++ /dev/null
@@ -1,9 +0,0 @@
-define(DummyModel::class, function (Faker $faker) {
- return [
- //
- ];
-});
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/BaseCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/BaseCommand.php
deleted file mode 100755
index 6c4f255..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/BaseCommand.php
+++ /dev/null
@@ -1,51 +0,0 @@
-input->hasOption('path') && $this->option('path')) {
- return collect($this->option('path'))->map(function ($path) {
- return ! $this->usingRealPath()
- ? $this->laravel->basePath().'/'.$path
- : $path;
- })->all();
- }
-
- return array_merge(
- $this->migrator->paths(), [$this->getMigrationPath()]
- );
- }
-
- /**
- * Determine if the given path(s) are pre-resolved "real" paths.
- *
- * @return bool
- */
- protected function usingRealPath()
- {
- return $this->input->hasOption('realpath') && $this->option('realpath');
- }
-
- /**
- * Get the path to the migration directory.
- *
- * @return string
- */
- protected function getMigrationPath()
- {
- return $this->laravel->databasePath().DIRECTORY_SEPARATOR.'migrations';
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/FreshCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/FreshCommand.php
deleted file mode 100644
index 28c1e99..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/FreshCommand.php
+++ /dev/null
@@ -1,139 +0,0 @@
-confirmToProceed()) {
- return;
- }
-
- $database = $this->input->getOption('database');
-
- if ($this->option('drop-views')) {
- $this->dropAllViews($database);
-
- $this->info('Dropped all views successfully.');
- }
-
- $this->dropAllTables($database);
-
- $this->info('Dropped all tables successfully.');
-
- $this->call('migrate', array_filter([
- '--database' => $database,
- '--path' => $this->input->getOption('path'),
- '--realpath' => $this->input->getOption('realpath'),
- '--force' => true,
- '--step' => $this->option('step'),
- ]));
-
- if ($this->needsSeeding()) {
- $this->runSeeder($database);
- }
- }
-
- /**
- * Drop all of the database tables.
- *
- * @param string $database
- * @return void
- */
- protected function dropAllTables($database)
- {
- $this->laravel['db']->connection($database)
- ->getSchemaBuilder()
- ->dropAllTables();
- }
-
- /**
- * Drop all of the database views.
- *
- * @param string $database
- * @return void
- */
- protected function dropAllViews($database)
- {
- $this->laravel['db']->connection($database)
- ->getSchemaBuilder()
- ->dropAllViews();
- }
-
- /**
- * Determine if the developer has requested database seeding.
- *
- * @return bool
- */
- protected function needsSeeding()
- {
- return $this->option('seed') || $this->option('seeder');
- }
-
- /**
- * Run the database seeder command.
- *
- * @param string $database
- * @return void
- */
- protected function runSeeder($database)
- {
- $this->call('db:seed', array_filter([
- '--database' => $database,
- '--class' => $this->option('seeder') ?: 'DatabaseSeeder',
- '--force' => true,
- ]));
- }
-
- /**
- * Get the console command options.
- *
- * @return array
- */
- protected function getOptions()
- {
- return [
- ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use'],
-
- ['drop-views', null, InputOption::VALUE_NONE, 'Drop all tables and views'],
-
- ['force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production'],
-
- ['path', null, InputOption::VALUE_OPTIONAL, 'The path to the migrations files to be executed'],
-
- ['realpath', null, InputOption::VALUE_NONE, 'Indicate any provided migration file paths are pre-resolved absolute paths'],
-
- ['seed', null, InputOption::VALUE_NONE, 'Indicates if the seed task should be re-run'],
-
- ['seeder', null, InputOption::VALUE_OPTIONAL, 'The class name of the root seeder'],
-
- ['step', null, InputOption::VALUE_NONE, 'Force the migrations to be run so they can be rolled back individually'],
- ];
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/InstallCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/InstallCommand.php
deleted file mode 100755
index 354d7a1..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/InstallCommand.php
+++ /dev/null
@@ -1,70 +0,0 @@
-repository = $repository;
- }
-
- /**
- * Execute the console command.
- *
- * @return void
- */
- public function handle()
- {
- $this->repository->setSource($this->input->getOption('database'));
-
- $this->repository->createRepository();
-
- $this->info('Migration table created successfully.');
- }
-
- /**
- * Get the console command options.
- *
- * @return array
- */
- protected function getOptions()
- {
- return [
- ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use'],
- ];
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php
deleted file mode 100755
index ee61ac5..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php
+++ /dev/null
@@ -1,97 +0,0 @@
-migrator = $migrator;
- }
-
- /**
- * Execute the console command.
- *
- * @return void
- */
- public function handle()
- {
- if (! $this->confirmToProceed()) {
- return;
- }
-
- $this->prepareDatabase();
-
- // Next, we will check to see if a path option has been defined. If it has
- // we will use the path relative to the root of this installation folder
- // so that migrations may be run for any path within the applications.
- $this->migrator->setOutput($this->output)
- ->run($this->getMigrationPaths(), [
- 'pretend' => $this->option('pretend'),
- 'step' => $this->option('step'),
- ]);
-
- // Finally, if the "seed" option has been given, we will re-run the database
- // seed task to re-populate the database, which is convenient when adding
- // a migration and a seed at the same time, as it is only this command.
- if ($this->option('seed') && ! $this->option('pretend')) {
- $this->call('db:seed', ['--force' => true]);
- }
- }
-
- /**
- * Prepare the migration database for running.
- *
- * @return void
- */
- protected function prepareDatabase()
- {
- $this->migrator->setConnection($this->option('database'));
-
- if (! $this->migrator->repositoryExists()) {
- $this->call('migrate:install', array_filter([
- '--database' => $this->option('database'),
- ]));
- }
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateMakeCommand.php
deleted file mode 100644
index 1cce57b..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateMakeCommand.php
+++ /dev/null
@@ -1,140 +0,0 @@
-creator = $creator;
- $this->composer = $composer;
- }
-
- /**
- * Execute the console command.
- *
- * @return void
- */
- public function handle()
- {
- // It's possible for the developer to specify the tables to modify in this
- // schema operation. The developer may also specify if this table needs
- // to be freshly created so we can create the appropriate migrations.
- $name = Str::snake(trim($this->input->getArgument('name')));
-
- $table = $this->input->getOption('table');
-
- $create = $this->input->getOption('create') ?: false;
-
- // If no table was given as an option but a create option is given then we
- // will use the "create" option as the table name. This allows the devs
- // to pass a table name into this option as a short-cut for creating.
- if (! $table && is_string($create)) {
- $table = $create;
-
- $create = true;
- }
-
- // Next, we will attempt to guess the table name if this the migration has
- // "create" in the name. This will allow us to provide a convenient way
- // of creating migrations that create new tables for the application.
- if (! $table) {
- [$table, $create] = TableGuesser::guess($name);
- }
-
- // Now we are ready to write the migration out to disk. Once we've written
- // the migration out, we will dump-autoload for the entire framework to
- // make sure that the migrations are registered by the class loaders.
- $this->writeMigration($name, $table, $create);
-
- $this->composer->dumpAutoloads();
- }
-
- /**
- * Write the migration file to disk.
- *
- * @param string $name
- * @param string $table
- * @param bool $create
- * @return string
- */
- protected function writeMigration($name, $table, $create)
- {
- $file = pathinfo($this->creator->create(
- $name, $this->getMigrationPath(), $table, $create
- ), PATHINFO_FILENAME);
-
- $this->line("Created Migration: {$file}");
- }
-
- /**
- * Get migration path (either specified by '--path' option or default location).
- *
- * @return string
- */
- protected function getMigrationPath()
- {
- if (! is_null($targetPath = $this->input->getOption('path'))) {
- return ! $this->usingRealPath()
- ? $this->laravel->basePath().'/'.$targetPath
- : $targetPath;
- }
-
- return parent::getMigrationPath();
- }
-
- /**
- * Determine if the given path(s) are pre-resolved "real" paths.
- *
- * @return bool
- */
- protected function usingRealPath()
- {
- return $this->input->hasOption('realpath') && $this->option('realpath');
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RefreshCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RefreshCommand.php
deleted file mode 100755
index d27bb15..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RefreshCommand.php
+++ /dev/null
@@ -1,155 +0,0 @@
-confirmToProceed()) {
- return;
- }
-
- // Next we'll gather some of the options so that we can have the right options
- // to pass to the commands. This includes options such as which database to
- // use and the path to use for the migration. Then we'll run the command.
- $database = $this->input->getOption('database');
-
- $path = $this->input->getOption('path');
-
- // If the "step" option is specified it means we only want to rollback a small
- // number of migrations before migrating again. For example, the user might
- // only rollback and remigrate the latest four migrations instead of all.
- $step = $this->input->getOption('step') ?: 0;
-
- if ($step > 0) {
- $this->runRollback($database, $path, $step);
- } else {
- $this->runReset($database, $path);
- }
-
- // The refresh command is essentially just a brief aggregate of a few other of
- // the migration commands and just provides a convenient wrapper to execute
- // them in succession. We'll also see if we need to re-seed the database.
- $this->call('migrate', array_filter([
- '--database' => $database,
- '--path' => $path,
- '--realpath' => $this->input->getOption('realpath'),
- '--force' => true,
- ]));
-
- if ($this->needsSeeding()) {
- $this->runSeeder($database);
- }
- }
-
- /**
- * Run the rollback command.
- *
- * @param string $database
- * @param string $path
- * @param int $step
- * @return void
- */
- protected function runRollback($database, $path, $step)
- {
- $this->call('migrate:rollback', array_filter([
- '--database' => $database,
- '--path' => $path,
- '--realpath' => $this->input->getOption('realpath'),
- '--step' => $step,
- '--force' => true,
- ]));
- }
-
- /**
- * Run the reset command.
- *
- * @param string $database
- * @param string $path
- * @return void
- */
- protected function runReset($database, $path)
- {
- $this->call('migrate:reset', array_filter([
- '--database' => $database,
- '--path' => $path,
- '--realpath' => $this->input->getOption('realpath'),
- '--force' => true,
- ]));
- }
-
- /**
- * Determine if the developer has requested database seeding.
- *
- * @return bool
- */
- protected function needsSeeding()
- {
- return $this->option('seed') || $this->option('seeder');
- }
-
- /**
- * Run the database seeder command.
- *
- * @param string $database
- * @return void
- */
- protected function runSeeder($database)
- {
- $this->call('db:seed', array_filter([
- '--database' => $database,
- '--class' => $this->option('seeder') ?: 'DatabaseSeeder',
- '--force' => true,
- ]));
- }
-
- /**
- * Get the console command options.
- *
- * @return array
- */
- protected function getOptions()
- {
- return [
- ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use'],
-
- ['force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production'],
-
- ['path', null, InputOption::VALUE_OPTIONAL, 'The path to the migrations files to be executed'],
-
- ['realpath', null, InputOption::VALUE_NONE, 'Indicate any provided migration file paths are pre-resolved absolute paths'],
-
- ['seed', null, InputOption::VALUE_NONE, 'Indicates if the seed task should be re-run'],
-
- ['seeder', null, InputOption::VALUE_OPTIONAL, 'The class name of the root seeder'],
-
- ['step', null, InputOption::VALUE_OPTIONAL, 'The number of migrations to be reverted & re-run'],
- ];
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/ResetCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/ResetCommand.php
deleted file mode 100755
index 2880380..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/ResetCommand.php
+++ /dev/null
@@ -1,91 +0,0 @@
-migrator = $migrator;
- }
-
- /**
- * Execute the console command.
- *
- * @return void
- */
- public function handle()
- {
- if (! $this->confirmToProceed()) {
- return;
- }
-
- $this->migrator->setConnection($this->option('database'));
-
- // First, we'll make sure that the migration table actually exists before we
- // start trying to rollback and re-run all of the migrations. If it's not
- // present we'll just bail out with an info message for the developers.
- if (! $this->migrator->repositoryExists()) {
- return $this->comment('Migration table not found.');
- }
-
- $this->migrator->setOutput($this->output)->reset(
- $this->getMigrationPaths(), $this->option('pretend')
- );
- }
-
- /**
- * Get the console command options.
- *
- * @return array
- */
- protected function getOptions()
- {
- return [
- ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use'],
-
- ['force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production'],
-
- ['path', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'The path(s) to the migrations files to be executed'],
-
- ['realpath', null, InputOption::VALUE_NONE, 'Indicate any provided migration file paths are pre-resolved absolute paths'],
-
- ['pretend', null, InputOption::VALUE_NONE, 'Dump the SQL queries that would be run'],
- ];
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RollbackCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RollbackCommand.php
deleted file mode 100755
index 457bcb1..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RollbackCommand.php
+++ /dev/null
@@ -1,89 +0,0 @@
-migrator = $migrator;
- }
-
- /**
- * Execute the console command.
- *
- * @return void
- */
- public function handle()
- {
- if (! $this->confirmToProceed()) {
- return;
- }
-
- $this->migrator->setConnection($this->option('database'));
-
- $this->migrator->setOutput($this->output)->rollback(
- $this->getMigrationPaths(), [
- 'pretend' => $this->option('pretend'),
- 'step' => (int) $this->option('step'),
- ]
- );
- }
-
- /**
- * Get the console command options.
- *
- * @return array
- */
- protected function getOptions()
- {
- return [
- ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use'],
-
- ['force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production'],
-
- ['path', null, InputOption::VALUE_OPTIONAL, 'The path to the migrations files to be executed'],
-
- ['realpath', null, InputOption::VALUE_NONE, 'Indicate any provided migration file paths are pre-resolved absolute paths'],
-
- ['pretend', null, InputOption::VALUE_NONE, 'Dump the SQL queries that would be run'],
-
- ['step', null, InputOption::VALUE_OPTIONAL, 'The number of migrations to be reverted'],
- ];
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/StatusCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/StatusCommand.php
deleted file mode 100644
index 2e9f4f3..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/StatusCommand.php
+++ /dev/null
@@ -1,113 +0,0 @@
-migrator = $migrator;
- }
-
- /**
- * Execute the console command.
- *
- * @return void
- */
- public function handle()
- {
- $this->migrator->setConnection($this->option('database'));
-
- if (! $this->migrator->repositoryExists()) {
- return $this->error('Migration table not found.');
- }
-
- $ran = $this->migrator->getRepository()->getRan();
-
- $batches = $this->migrator->getRepository()->getMigrationBatches();
-
- if (count($migrations = $this->getStatusFor($ran, $batches)) > 0) {
- $this->table(['Ran?', 'Migration', 'Batch'], $migrations);
- } else {
- $this->error('No migrations found');
- }
- }
-
- /**
- * Get the status for the given ran migrations.
- *
- * @param array $ran
- * @param array $batches
- * @return \Illuminate\Support\Collection
- */
- protected function getStatusFor(array $ran, array $batches)
- {
- return Collection::make($this->getAllMigrationFiles())
- ->map(function ($migration) use ($ran, $batches) {
- $migrationName = $this->migrator->getMigrationName($migration);
-
- return in_array($migrationName, $ran)
- ? ['Yes', $migrationName, $batches[$migrationName]]
- : ['No', $migrationName];
- });
- }
-
- /**
- * Get an array of all of the migration files.
- *
- * @return array
- */
- protected function getAllMigrationFiles()
- {
- return $this->migrator->getMigrationFiles($this->getMigrationPaths());
- }
-
- /**
- * Get the console command options.
- *
- * @return array
- */
- protected function getOptions()
- {
- return [
- ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use'],
-
- ['path', null, InputOption::VALUE_OPTIONAL, 'The path to the migrations files to use'],
-
- ['realpath', null, InputOption::VALUE_NONE, 'Indicate any provided migration file paths are pre-resolved absolute paths'],
- ];
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/TableGuesser.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/TableGuesser.php
deleted file mode 100644
index 82dfbdd..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/TableGuesser.php
+++ /dev/null
@@ -1,37 +0,0 @@
-resolver = $resolver;
- }
-
- /**
- * Execute the console command.
- *
- * @return void
- */
- public function handle()
- {
- if (! $this->confirmToProceed()) {
- return;
- }
-
- $this->resolver->setDefaultConnection($this->getDatabase());
-
- Model::unguarded(function () {
- $this->getSeeder()->__invoke();
- });
-
- $this->info('Database seeding completed successfully.');
- }
-
- /**
- * Get a seeder instance from the container.
- *
- * @return \Illuminate\Database\Seeder
- */
- protected function getSeeder()
- {
- $class = $this->laravel->make($this->input->getOption('class'));
-
- return $class->setContainer($this->laravel)->setCommand($this);
- }
-
- /**
- * Get the name of the database connection to use.
- *
- * @return string
- */
- protected function getDatabase()
- {
- $database = $this->input->getOption('database');
-
- return $database ?: $this->laravel['config']['database.default'];
- }
-
- /**
- * Get the console command options.
- *
- * @return array
- */
- protected function getOptions()
- {
- return [
- ['class', null, InputOption::VALUE_OPTIONAL, 'The class name of the root seeder', 'DatabaseSeeder'],
-
- ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to seed'],
-
- ['force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production'],
- ];
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeederMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeederMakeCommand.php
deleted file mode 100644
index 6e85e3e..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeederMakeCommand.php
+++ /dev/null
@@ -1,96 +0,0 @@
-composer = $composer;
- }
-
- /**
- * Execute the console command.
- *
- * @return void
- */
- public function handle()
- {
- parent::handle();
-
- $this->composer->dumpAutoloads();
- }
-
- /**
- * Get the stub file for the generator.
- *
- * @return string
- */
- protected function getStub()
- {
- return __DIR__.'/stubs/seeder.stub';
- }
-
- /**
- * Get the destination class path.
- *
- * @param string $name
- * @return string
- */
- protected function getPath($name)
- {
- return $this->laravel->databasePath().'/seeds/'.$name.'.php';
- }
-
- /**
- * Parse the class name and format according to the root namespace.
- *
- * @param string $name
- * @return string
- */
- protected function qualifyClass($name)
- {
- return $name;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/stubs/seeder.stub b/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/stubs/seeder.stub
deleted file mode 100644
index 4aa3845..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/stubs/seeder.stub
+++ /dev/null
@@ -1,16 +0,0 @@
-app = $app;
- $this->factory = $factory;
- }
-
- /**
- * Get a database connection instance.
- *
- * @param string $name
- * @return \Illuminate\Database\Connection
- */
- public function connection($name = null)
- {
- [$database, $type] = $this->parseConnectionName($name);
-
- $name = $name ?: $database;
-
- // If we haven't created this connection, we'll create it based on the config
- // provided in the application. Once we've created the connections we will
- // set the "fetch mode" for PDO which determines the query return types.
- if (! isset($this->connections[$name])) {
- $this->connections[$name] = $this->configure(
- $this->makeConnection($database), $type
- );
- }
-
- return $this->connections[$name];
- }
-
- /**
- * Parse the connection into an array of the name and read / write type.
- *
- * @param string $name
- * @return array
- */
- protected function parseConnectionName($name)
- {
- $name = $name ?: $this->getDefaultConnection();
-
- return Str::endsWith($name, ['::read', '::write'])
- ? explode('::', $name, 2) : [$name, null];
- }
-
- /**
- * Make the database connection instance.
- *
- * @param string $name
- * @return \Illuminate\Database\Connection
- */
- protected function makeConnection($name)
- {
- $config = $this->configuration($name);
-
- // First we will check by the connection name to see if an extension has been
- // registered specifically for that connection. If it has we will call the
- // Closure and pass it the config allowing it to resolve the connection.
- if (isset($this->extensions[$name])) {
- return call_user_func($this->extensions[$name], $config, $name);
- }
-
- // Next we will check to see if an extension has been registered for a driver
- // and will call the Closure if so, which allows us to have a more generic
- // resolver for the drivers themselves which applies to all connections.
- if (isset($this->extensions[$driver = $config['driver']])) {
- return call_user_func($this->extensions[$driver], $config, $name);
- }
-
- return $this->factory->make($config, $name);
- }
-
- /**
- * Get the configuration for a connection.
- *
- * @param string $name
- * @return array
- *
- * @throws \InvalidArgumentException
- */
- protected function configuration($name)
- {
- $name = $name ?: $this->getDefaultConnection();
-
- // To get the database connection configuration, we will just pull each of the
- // connection configurations and get the configurations for the given name.
- // If the configuration doesn't exist, we'll throw an exception and bail.
- $connections = $this->app['config']['database.connections'];
-
- if (is_null($config = Arr::get($connections, $name))) {
- throw new InvalidArgumentException("Database [{$name}] not configured.");
- }
-
- return $config;
- }
-
- /**
- * Prepare the database connection instance.
- *
- * @param \Illuminate\Database\Connection $connection
- * @param string $type
- * @return \Illuminate\Database\Connection
- */
- protected function configure(Connection $connection, $type)
- {
- $connection = $this->setPdoForType($connection, $type);
-
- // First we'll set the fetch mode and a few other dependencies of the database
- // connection. This method basically just configures and prepares it to get
- // used by the application. Once we're finished we'll return it back out.
- if ($this->app->bound('events')) {
- $connection->setEventDispatcher($this->app['events']);
- }
-
- // Here we'll set a reconnector callback. This reconnector can be any callable
- // so we will set a Closure to reconnect from this manager with the name of
- // the connection, which will allow us to reconnect from the connections.
- $connection->setReconnector(function ($connection) {
- $this->reconnect($connection->getName());
- });
-
- return $connection;
- }
-
- /**
- * Prepare the read / write mode for database connection instance.
- *
- * @param \Illuminate\Database\Connection $connection
- * @param string $type
- * @return \Illuminate\Database\Connection
- */
- protected function setPdoForType(Connection $connection, $type = null)
- {
- if ($type === 'read') {
- $connection->setPdo($connection->getReadPdo());
- } elseif ($type === 'write') {
- $connection->setReadPdo($connection->getPdo());
- }
-
- return $connection;
- }
-
- /**
- * Disconnect from the given database and remove from local cache.
- *
- * @param string $name
- * @return void
- */
- public function purge($name = null)
- {
- $name = $name ?: $this->getDefaultConnection();
-
- $this->disconnect($name);
-
- unset($this->connections[$name]);
- }
-
- /**
- * Disconnect from the given database.
- *
- * @param string $name
- * @return void
- */
- public function disconnect($name = null)
- {
- if (isset($this->connections[$name = $name ?: $this->getDefaultConnection()])) {
- $this->connections[$name]->disconnect();
- }
- }
-
- /**
- * Reconnect to the given database.
- *
- * @param string $name
- * @return \Illuminate\Database\Connection
- */
- public function reconnect($name = null)
- {
- $this->disconnect($name = $name ?: $this->getDefaultConnection());
-
- if (! isset($this->connections[$name])) {
- return $this->connection($name);
- }
-
- return $this->refreshPdoConnections($name);
- }
-
- /**
- * Refresh the PDO connections on a given connection.
- *
- * @param string $name
- * @return \Illuminate\Database\Connection
- */
- protected function refreshPdoConnections($name)
- {
- $fresh = $this->makeConnection($name);
-
- return $this->connections[$name]
- ->setPdo($fresh->getPdo())
- ->setReadPdo($fresh->getReadPdo());
- }
-
- /**
- * Get the default connection name.
- *
- * @return string
- */
- public function getDefaultConnection()
- {
- return $this->app['config']['database.default'];
- }
-
- /**
- * Set the default connection name.
- *
- * @param string $name
- * @return void
- */
- public function setDefaultConnection($name)
- {
- $this->app['config']['database.default'] = $name;
- }
-
- /**
- * Get all of the support drivers.
- *
- * @return array
- */
- public function supportedDrivers()
- {
- return ['mysql', 'pgsql', 'sqlite', 'sqlsrv'];
- }
-
- /**
- * Get all of the drivers that are actually available.
- *
- * @return array
- */
- public function availableDrivers()
- {
- return array_intersect(
- $this->supportedDrivers(),
- str_replace('dblib', 'sqlsrv', PDO::getAvailableDrivers())
- );
- }
-
- /**
- * Register an extension connection resolver.
- *
- * @param string $name
- * @param callable $resolver
- * @return void
- */
- public function extend($name, callable $resolver)
- {
- $this->extensions[$name] = $resolver;
- }
-
- /**
- * Return all of the created connections.
- *
- * @return array
- */
- public function getConnections()
- {
- return $this->connections;
- }
-
- /**
- * Dynamically pass methods to the default connection.
- *
- * @param string $method
- * @param array $parameters
- * @return mixed
- */
- public function __call($method, $parameters)
- {
- return $this->connection()->$method(...$parameters);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/DatabaseServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Database/DatabaseServiceProvider.php
deleted file mode 100755
index a8ee7b0..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/DatabaseServiceProvider.php
+++ /dev/null
@@ -1,99 +0,0 @@
-app['db']);
-
- Model::setEventDispatcher($this->app['events']);
- }
-
- /**
- * Register the service provider.
- *
- * @return void
- */
- public function register()
- {
- Model::clearBootedModels();
-
- $this->registerConnectionServices();
-
- $this->registerEloquentFactory();
-
- $this->registerQueueableEntityResolver();
- }
-
- /**
- * Register the primary database bindings.
- *
- * @return void
- */
- protected function registerConnectionServices()
- {
- // The connection factory is used to create the actual connection instances on
- // the database. We will inject the factory into the manager so that it may
- // make the connections while they are actually needed and not of before.
- $this->app->singleton('db.factory', function ($app) {
- return new ConnectionFactory($app);
- });
-
- // The database manager is used to resolve various connections, since multiple
- // connections might be managed. It also implements the connection resolver
- // interface which may be used by other components requiring connections.
- $this->app->singleton('db', function ($app) {
- return new DatabaseManager($app, $app['db.factory']);
- });
-
- $this->app->bind('db.connection', function ($app) {
- return $app['db']->connection();
- });
- }
-
- /**
- * Register the Eloquent factory instance in the container.
- *
- * @return void
- */
- protected function registerEloquentFactory()
- {
- $this->app->singleton(FakerGenerator::class, function ($app) {
- return FakerFactory::create($app['config']->get('app.faker_locale', 'en_US'));
- });
-
- $this->app->singleton(EloquentFactory::class, function ($app) {
- return EloquentFactory::construct(
- $app->make(FakerGenerator::class), $this->app->databasePath('factories')
- );
- });
- }
-
- /**
- * Register the queueable entity resolver implementation.
- *
- * @return void
- */
- protected function registerQueueableEntityResolver()
- {
- $this->app->singleton(EntityResolver::class, function () {
- return new QueueEntityResolver;
- });
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/DetectsDeadlocks.php b/vendor/laravel/framework/src/Illuminate/Database/DetectsDeadlocks.php
deleted file mode 100644
index a8193ee..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/DetectsDeadlocks.php
+++ /dev/null
@@ -1,32 +0,0 @@
-getMessage();
-
- return Str::contains($message, [
- 'Deadlock found when trying to get lock',
- 'deadlock detected',
- 'The database file is locked',
- 'database is locked',
- 'database table is locked',
- 'A table in the database is locked',
- 'has been chosen as the deadlock victim',
- 'Lock wait timeout exceeded; try restarting transaction',
- 'WSREP detected deadlock/conflict and aborted the transaction. Try restarting the transaction',
- ]);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/DetectsLostConnections.php b/vendor/laravel/framework/src/Illuminate/Database/DetectsLostConnections.php
deleted file mode 100644
index e1fe5e6..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/DetectsLostConnections.php
+++ /dev/null
@@ -1,43 +0,0 @@
-getMessage();
-
- return Str::contains($message, [
- 'server has gone away',
- 'no connection to the server',
- 'Lost connection',
- 'is dead or not enabled',
- 'Error while sending',
- 'decryption failed or bad record mac',
- 'server closed the connection unexpectedly',
- 'SSL connection has been closed unexpectedly',
- 'Error writing data to the connection',
- 'Resource deadlock avoided',
- 'Transaction() on null',
- 'child connection forced to terminate due to client_idle_limit',
- 'query_wait_timeout',
- 'reset by peer',
- 'Physical connection is not usable',
- 'TCP Provider: Error code 0x68',
- 'php_network_getaddresses: getaddrinfo failed: Name or service not known',
- 'ORA-03114',
- 'Packets out of order. Expected',
- 'Adaptive Server connection failed',
- ]);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php
deleted file mode 100755
index 2d530a7..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php
+++ /dev/null
@@ -1,1363 +0,0 @@
-query = $query;
- }
-
- /**
- * Create and return an un-saved model instance.
- *
- * @param array $attributes
- * @return \Illuminate\Database\Eloquent\Model
- */
- public function make(array $attributes = [])
- {
- return $this->newModelInstance($attributes);
- }
-
- /**
- * Register a new global scope.
- *
- * @param string $identifier
- * @param \Illuminate\Database\Eloquent\Scope|\Closure $scope
- * @return $this
- */
- public function withGlobalScope($identifier, $scope)
- {
- $this->scopes[$identifier] = $scope;
-
- if (method_exists($scope, 'extend')) {
- $scope->extend($this);
- }
-
- return $this;
- }
-
- /**
- * Remove a registered global scope.
- *
- * @param \Illuminate\Database\Eloquent\Scope|string $scope
- * @return $this
- */
- public function withoutGlobalScope($scope)
- {
- if (! is_string($scope)) {
- $scope = get_class($scope);
- }
-
- unset($this->scopes[$scope]);
-
- $this->removedScopes[] = $scope;
-
- return $this;
- }
-
- /**
- * Remove all or passed registered global scopes.
- *
- * @param array|null $scopes
- * @return $this
- */
- public function withoutGlobalScopes(array $scopes = null)
- {
- if (! is_array($scopes)) {
- $scopes = array_keys($this->scopes);
- }
-
- foreach ($scopes as $scope) {
- $this->withoutGlobalScope($scope);
- }
-
- return $this;
- }
-
- /**
- * Get an array of global scopes that were removed from the query.
- *
- * @return array
- */
- public function removedScopes()
- {
- return $this->removedScopes;
- }
-
- /**
- * Add a where clause on the primary key to the query.
- *
- * @param mixed $id
- * @return $this
- */
- public function whereKey($id)
- {
- if (is_array($id) || $id instanceof Arrayable) {
- $this->query->whereIn($this->model->getQualifiedKeyName(), $id);
-
- return $this;
- }
-
- return $this->where($this->model->getQualifiedKeyName(), '=', $id);
- }
-
- /**
- * Add a where clause on the primary key to the query.
- *
- * @param mixed $id
- * @return $this
- */
- public function whereKeyNot($id)
- {
- if (is_array($id) || $id instanceof Arrayable) {
- $this->query->whereNotIn($this->model->getQualifiedKeyName(), $id);
-
- return $this;
- }
-
- return $this->where($this->model->getQualifiedKeyName(), '!=', $id);
- }
-
- /**
- * Add a basic where clause to the query.
- *
- * @param string|array|\Closure $column
- * @param mixed $operator
- * @param mixed $value
- * @param string $boolean
- * @return $this
- */
- public function where($column, $operator = null, $value = null, $boolean = 'and')
- {
- if ($column instanceof Closure) {
- $column($query = $this->model->newModelQuery());
-
- $this->query->addNestedWhereQuery($query->getQuery(), $boolean);
- } else {
- $this->query->where(...func_get_args());
- }
-
- return $this;
- }
-
- /**
- * Add an "or where" clause to the query.
- *
- * @param \Closure|array|string $column
- * @param mixed $operator
- * @param mixed $value
- * @return \Illuminate\Database\Eloquent\Builder|static
- */
- public function orWhere($column, $operator = null, $value = null)
- {
- [$value, $operator] = $this->query->prepareValueAndOperator(
- $value, $operator, func_num_args() === 2
- );
-
- return $this->where($column, $operator, $value, 'or');
- }
-
- /**
- * Add an "order by" clause for a timestamp to the query.
- *
- * @param string $column
- * @return $this
- */
- public function latest($column = null)
- {
- if (is_null($column)) {
- $column = $this->model->getCreatedAtColumn() ?? 'created_at';
- }
-
- $this->query->latest($column);
-
- return $this;
- }
-
- /**
- * Add an "order by" clause for a timestamp to the query.
- *
- * @param string $column
- * @return $this
- */
- public function oldest($column = null)
- {
- if (is_null($column)) {
- $column = $this->model->getCreatedAtColumn() ?? 'created_at';
- }
-
- $this->query->oldest($column);
-
- return $this;
- }
-
- /**
- * Create a collection of models from plain arrays.
- *
- * @param array $items
- * @return \Illuminate\Database\Eloquent\Collection
- */
- public function hydrate(array $items)
- {
- $instance = $this->newModelInstance();
-
- return $instance->newCollection(array_map(function ($item) use ($instance) {
- return $instance->newFromBuilder($item);
- }, $items));
- }
-
- /**
- * Create a collection of models from a raw query.
- *
- * @param string $query
- * @param array $bindings
- * @return \Illuminate\Database\Eloquent\Collection
- */
- public function fromQuery($query, $bindings = [])
- {
- return $this->hydrate(
- $this->query->getConnection()->select($query, $bindings)
- );
- }
-
- /**
- * Find a model by its primary key.
- *
- * @param mixed $id
- * @param array $columns
- * @return \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection|static[]|static|null
- */
- public function find($id, $columns = ['*'])
- {
- if (is_array($id) || $id instanceof Arrayable) {
- return $this->findMany($id, $columns);
- }
-
- return $this->whereKey($id)->first($columns);
- }
-
- /**
- * Find multiple models by their primary keys.
- *
- * @param \Illuminate\Contracts\Support\Arrayable|array $ids
- * @param array $columns
- * @return \Illuminate\Database\Eloquent\Collection
- */
- public function findMany($ids, $columns = ['*'])
- {
- if (empty($ids)) {
- return $this->model->newCollection();
- }
-
- return $this->whereKey($ids)->get($columns);
- }
-
- /**
- * Find a model by its primary key or throw an exception.
- *
- * @param mixed $id
- * @param array $columns
- * @return \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection|static|static[]
- *
- * @throws \Illuminate\Database\Eloquent\ModelNotFoundException
- */
- public function findOrFail($id, $columns = ['*'])
- {
- $result = $this->find($id, $columns);
-
- if (is_array($id)) {
- if (count($result) === count(array_unique($id))) {
- return $result;
- }
- } elseif (! is_null($result)) {
- return $result;
- }
-
- throw (new ModelNotFoundException)->setModel(
- get_class($this->model), $id
- );
- }
-
- /**
- * Find a model by its primary key or return fresh model instance.
- *
- * @param mixed $id
- * @param array $columns
- * @return \Illuminate\Database\Eloquent\Model|static
- */
- public function findOrNew($id, $columns = ['*'])
- {
- if (! is_null($model = $this->find($id, $columns))) {
- return $model;
- }
-
- return $this->newModelInstance();
- }
-
- /**
- * Get the first record matching the attributes or instantiate it.
- *
- * @param array $attributes
- * @param array $values
- * @return \Illuminate\Database\Eloquent\Model|static
- */
- public function firstOrNew(array $attributes, array $values = [])
- {
- if (! is_null($instance = $this->where($attributes)->first())) {
- return $instance;
- }
-
- return $this->newModelInstance($attributes + $values);
- }
-
- /**
- * Get the first record matching the attributes or create it.
- *
- * @param array $attributes
- * @param array $values
- * @return \Illuminate\Database\Eloquent\Model|static
- */
- public function firstOrCreate(array $attributes, array $values = [])
- {
- if (! is_null($instance = $this->where($attributes)->first())) {
- return $instance;
- }
-
- return tap($this->newModelInstance($attributes + $values), function ($instance) {
- $instance->save();
- });
- }
-
- /**
- * Create or update a record matching the attributes, and fill it with values.
- *
- * @param array $attributes
- * @param array $values
- * @return \Illuminate\Database\Eloquent\Model|static
- */
- public function updateOrCreate(array $attributes, array $values = [])
- {
- return tap($this->firstOrNew($attributes), function ($instance) use ($values) {
- $instance->fill($values)->save();
- });
- }
-
- /**
- * Execute the query and get the first result or throw an exception.
- *
- * @param array $columns
- * @return \Illuminate\Database\Eloquent\Model|static
- *
- * @throws \Illuminate\Database\Eloquent\ModelNotFoundException
- */
- public function firstOrFail($columns = ['*'])
- {
- if (! is_null($model = $this->first($columns))) {
- return $model;
- }
-
- throw (new ModelNotFoundException)->setModel(get_class($this->model));
- }
-
- /**
- * Execute the query and get the first result or call a callback.
- *
- * @param \Closure|array $columns
- * @param \Closure|null $callback
- * @return \Illuminate\Database\Eloquent\Model|static|mixed
- */
- public function firstOr($columns = ['*'], Closure $callback = null)
- {
- if ($columns instanceof Closure) {
- $callback = $columns;
-
- $columns = ['*'];
- }
-
- if (! is_null($model = $this->first($columns))) {
- return $model;
- }
-
- return call_user_func($callback);
- }
-
- /**
- * Get a single column's value from the first result of a query.
- *
- * @param string $column
- * @return mixed
- */
- public function value($column)
- {
- if ($result = $this->first([$column])) {
- return $result->{$column};
- }
- }
-
- /**
- * Execute the query as a "select" statement.
- *
- * @param array $columns
- * @return \Illuminate\Database\Eloquent\Collection|static[]
- */
- public function get($columns = ['*'])
- {
- $builder = $this->applyScopes();
-
- // If we actually found models we will also eager load any relationships that
- // have been specified as needing to be eager loaded, which will solve the
- // n+1 query issue for the developers to avoid running a lot of queries.
- if (count($models = $builder->getModels($columns)) > 0) {
- $models = $builder->eagerLoadRelations($models);
- }
-
- return $builder->getModel()->newCollection($models);
- }
-
- /**
- * Get the hydrated models without eager loading.
- *
- * @param array $columns
- * @return \Illuminate\Database\Eloquent\Model[]|static[]
- */
- public function getModels($columns = ['*'])
- {
- return $this->model->hydrate(
- $this->query->get($columns)->all()
- )->all();
- }
-
- /**
- * Eager load the relationships for the models.
- *
- * @param array $models
- * @return array
- */
- public function eagerLoadRelations(array $models)
- {
- foreach ($this->eagerLoad as $name => $constraints) {
- // For nested eager loads we'll skip loading them here and they will be set as an
- // eager load on the query to retrieve the relation so that they will be eager
- // loaded on that query, because that is where they get hydrated as models.
- if (strpos($name, '.') === false) {
- $models = $this->eagerLoadRelation($models, $name, $constraints);
- }
- }
-
- return $models;
- }
-
- /**
- * Eagerly load the relationship on a set of models.
- *
- * @param array $models
- * @param string $name
- * @param \Closure $constraints
- * @return array
- */
- protected function eagerLoadRelation(array $models, $name, Closure $constraints)
- {
- // First we will "back up" the existing where conditions on the query so we can
- // add our eager constraints. Then we will merge the wheres that were on the
- // query back to it in order that any where conditions might be specified.
- $relation = $this->getRelation($name);
-
- $relation->addEagerConstraints($models);
-
- $constraints($relation);
-
- // Once we have the results, we just match those back up to their parent models
- // using the relationship instance. Then we just return the finished arrays
- // of models which have been eagerly hydrated and are readied for return.
- return $relation->match(
- $relation->initRelation($models, $name),
- $relation->getEager(), $name
- );
- }
-
- /**
- * Get the relation instance for the given relation name.
- *
- * @param string $name
- * @return \Illuminate\Database\Eloquent\Relations\Relation
- */
- public function getRelation($name)
- {
- // We want to run a relationship query without any constrains so that we will
- // not have to remove these where clauses manually which gets really hacky
- // and error prone. We don't want constraints because we add eager ones.
- $relation = Relation::noConstraints(function () use ($name) {
- try {
- return $this->getModel()->newInstance()->$name();
- } catch (BadMethodCallException $e) {
- throw RelationNotFoundException::make($this->getModel(), $name);
- }
- });
-
- $nested = $this->relationsNestedUnder($name);
-
- // If there are nested relationships set on the query, we will put those onto
- // the query instances so that they can be handled after this relationship
- // is loaded. In this way they will all trickle down as they are loaded.
- if (count($nested) > 0) {
- $relation->getQuery()->with($nested);
- }
-
- return $relation;
- }
-
- /**
- * Get the deeply nested relations for a given top-level relation.
- *
- * @param string $relation
- * @return array
- */
- protected function relationsNestedUnder($relation)
- {
- $nested = [];
-
- // We are basically looking for any relationships that are nested deeper than
- // the given top-level relationship. We will just check for any relations
- // that start with the given top relations and adds them to our arrays.
- foreach ($this->eagerLoad as $name => $constraints) {
- if ($this->isNestedUnder($relation, $name)) {
- $nested[substr($name, strlen($relation.'.'))] = $constraints;
- }
- }
-
- return $nested;
- }
-
- /**
- * Determine if the relationship is nested.
- *
- * @param string $relation
- * @param string $name
- * @return bool
- */
- protected function isNestedUnder($relation, $name)
- {
- return Str::contains($name, '.') && Str::startsWith($name, $relation.'.');
- }
-
- /**
- * Get a generator for the given query.
- *
- * @return \Generator
- */
- public function cursor()
- {
- foreach ($this->applyScopes()->query->cursor() as $record) {
- yield $this->model->newFromBuilder($record);
- }
- }
-
- /**
- * Chunk the results of a query by comparing numeric IDs.
- *
- * @param int $count
- * @param callable $callback
- * @param string|null $column
- * @param string|null $alias
- * @return bool
- */
- public function chunkById($count, callable $callback, $column = null, $alias = null)
- {
- $column = is_null($column) ? $this->getModel()->getKeyName() : $column;
-
- $alias = is_null($alias) ? $column : $alias;
-
- $lastId = null;
-
- do {
- $clone = clone $this;
-
- // We'll execute the query for the given page and get the results. If there are
- // no results we can just break and return from here. When there are results
- // we will call the callback with the current chunk of these results here.
- $results = $clone->forPageAfterId($count, $lastId, $column)->get();
-
- $countResults = $results->count();
-
- if ($countResults == 0) {
- break;
- }
-
- // On each chunk result set, we will pass them to the callback and then let the
- // developer take care of everything within the callback, which allows us to
- // keep the memory low for spinning through large result sets for working.
- if ($callback($results) === false) {
- return false;
- }
-
- $lastId = $results->last()->{$alias};
-
- unset($results);
- } while ($countResults == $count);
-
- return true;
- }
-
- /**
- * Add a generic "order by" clause if the query doesn't already have one.
- *
- * @return void
- */
- protected function enforceOrderBy()
- {
- if (empty($this->query->orders) && empty($this->query->unionOrders)) {
- $this->orderBy($this->model->getQualifiedKeyName(), 'asc');
- }
- }
-
- /**
- * Get an array with the values of a given column.
- *
- * @param string $column
- * @param string|null $key
- * @return \Illuminate\Support\Collection
- */
- public function pluck($column, $key = null)
- {
- $results = $this->toBase()->pluck($column, $key);
-
- // If the model has a mutator for the requested column, we will spin through
- // the results and mutate the values so that the mutated version of these
- // columns are returned as you would expect from these Eloquent models.
- if (! $this->model->hasGetMutator($column) &&
- ! $this->model->hasCast($column) &&
- ! in_array($column, $this->model->getDates())) {
- return $results;
- }
-
- return $results->map(function ($value) use ($column) {
- return $this->model->newFromBuilder([$column => $value])->{$column};
- });
- }
-
- /**
- * Paginate the given query.
- *
- * @param int $perPage
- * @param array $columns
- * @param string $pageName
- * @param int|null $page
- * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator
- *
- * @throws \InvalidArgumentException
- */
- public function paginate($perPage = null, $columns = ['*'], $pageName = 'page', $page = null)
- {
- $page = $page ?: Paginator::resolveCurrentPage($pageName);
-
- $perPage = $perPage ?: $this->model->getPerPage();
-
- $results = ($total = $this->toBase()->getCountForPagination())
- ? $this->forPage($page, $perPage)->get($columns)
- : $this->model->newCollection();
-
- return $this->paginator($results, $total, $perPage, $page, [
- 'path' => Paginator::resolveCurrentPath(),
- 'pageName' => $pageName,
- ]);
- }
-
- /**
- * Paginate the given query into a simple paginator.
- *
- * @param int $perPage
- * @param array $columns
- * @param string $pageName
- * @param int|null $page
- * @return \Illuminate\Contracts\Pagination\Paginator
- */
- public function simplePaginate($perPage = null, $columns = ['*'], $pageName = 'page', $page = null)
- {
- $page = $page ?: Paginator::resolveCurrentPage($pageName);
-
- $perPage = $perPage ?: $this->model->getPerPage();
-
- // Next we will set the limit and offset for this query so that when we get the
- // results we get the proper section of results. Then, we'll create the full
- // paginator instances for these results with the given page and per page.
- $this->skip(($page - 1) * $perPage)->take($perPage + 1);
-
- return $this->simplePaginator($this->get($columns), $perPage, $page, [
- 'path' => Paginator::resolveCurrentPath(),
- 'pageName' => $pageName,
- ]);
- }
-
- /**
- * Save a new model and return the instance.
- *
- * @param array $attributes
- * @return \Illuminate\Database\Eloquent\Model|$this
- */
- public function create(array $attributes = [])
- {
- return tap($this->newModelInstance($attributes), function ($instance) {
- $instance->save();
- });
- }
-
- /**
- * Save a new model and return the instance. Allow mass-assignment.
- *
- * @param array $attributes
- * @return \Illuminate\Database\Eloquent\Model|$this
- */
- public function forceCreate(array $attributes)
- {
- return $this->model->unguarded(function () use ($attributes) {
- return $this->newModelInstance()->create($attributes);
- });
- }
-
- /**
- * Update a record in the database.
- *
- * @param array $values
- * @return int
- */
- public function update(array $values)
- {
- return $this->toBase()->update($this->addUpdatedAtColumn($values));
- }
-
- /**
- * Increment a column's value by a given amount.
- *
- * @param string $column
- * @param float|int $amount
- * @param array $extra
- * @return int
- */
- public function increment($column, $amount = 1, array $extra = [])
- {
- return $this->toBase()->increment(
- $column, $amount, $this->addUpdatedAtColumn($extra)
- );
- }
-
- /**
- * Decrement a column's value by a given amount.
- *
- * @param string $column
- * @param float|int $amount
- * @param array $extra
- * @return int
- */
- public function decrement($column, $amount = 1, array $extra = [])
- {
- return $this->toBase()->decrement(
- $column, $amount, $this->addUpdatedAtColumn($extra)
- );
- }
-
- /**
- * Add the "updated at" column to an array of values.
- *
- * @param array $values
- * @return array
- */
- protected function addUpdatedAtColumn(array $values)
- {
- if (! $this->model->usesTimestamps()) {
- return $values;
- }
-
- return Arr::add(
- $values, $this->model->getUpdatedAtColumn(),
- $this->model->freshTimestampString()
- );
- }
-
- /**
- * Delete a record from the database.
- *
- * @return mixed
- */
- public function delete()
- {
- if (isset($this->onDelete)) {
- return call_user_func($this->onDelete, $this);
- }
-
- return $this->toBase()->delete();
- }
-
- /**
- * Run the default delete function on the builder.
- *
- * Since we do not apply scopes here, the row will actually be deleted.
- *
- * @return mixed
- */
- public function forceDelete()
- {
- return $this->query->delete();
- }
-
- /**
- * Register a replacement for the default delete function.
- *
- * @param \Closure $callback
- * @return void
- */
- public function onDelete(Closure $callback)
- {
- $this->onDelete = $callback;
- }
-
- /**
- * Call the given local model scopes.
- *
- * @param array $scopes
- * @return mixed
- */
- public function scopes(array $scopes)
- {
- $builder = $this;
-
- foreach ($scopes as $scope => $parameters) {
- // If the scope key is an integer, then the scope was passed as the value and
- // the parameter list is empty, so we will format the scope name and these
- // parameters here. Then, we'll be ready to call the scope on the model.
- if (is_int($scope)) {
- [$scope, $parameters] = [$parameters, []];
- }
-
- // Next we'll pass the scope callback to the callScope method which will take
- // care of grouping the "wheres" properly so the logical order doesn't get
- // messed up when adding scopes. Then we'll return back out the builder.
- $builder = $builder->callScope(
- [$this->model, 'scope'.ucfirst($scope)],
- (array) $parameters
- );
- }
-
- return $builder;
- }
-
- /**
- * Apply the scopes to the Eloquent builder instance and return it.
- *
- * @return \Illuminate\Database\Eloquent\Builder|static
- */
- public function applyScopes()
- {
- if (! $this->scopes) {
- return $this;
- }
-
- $builder = clone $this;
-
- foreach ($this->scopes as $identifier => $scope) {
- if (! isset($builder->scopes[$identifier])) {
- continue;
- }
-
- $builder->callScope(function (Builder $builder) use ($scope) {
- // If the scope is a Closure we will just go ahead and call the scope with the
- // builder instance. The "callScope" method will properly group the clauses
- // that are added to this query so "where" clauses maintain proper logic.
- if ($scope instanceof Closure) {
- $scope($builder);
- }
-
- // If the scope is a scope object, we will call the apply method on this scope
- // passing in the builder and the model instance. After we run all of these
- // scopes we will return back the builder instance to the outside caller.
- if ($scope instanceof Scope) {
- $scope->apply($builder, $this->getModel());
- }
- });
- }
-
- return $builder;
- }
-
- /**
- * Apply the given scope on the current builder instance.
- *
- * @param callable $scope
- * @param array $parameters
- * @return mixed
- */
- protected function callScope(callable $scope, $parameters = [])
- {
- array_unshift($parameters, $this);
-
- $query = $this->getQuery();
-
- // We will keep track of how many wheres are on the query before running the
- // scope so that we can properly group the added scope constraints in the
- // query as their own isolated nested where statement and avoid issues.
- $originalWhereCount = is_null($query->wheres)
- ? 0 : count($query->wheres);
-
- $result = $scope(...array_values($parameters)) ?? $this;
-
- if (count((array) $query->wheres) > $originalWhereCount) {
- $this->addNewWheresWithinGroup($query, $originalWhereCount);
- }
-
- return $result;
- }
-
- /**
- * Nest where conditions by slicing them at the given where count.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param int $originalWhereCount
- * @return void
- */
- protected function addNewWheresWithinGroup(QueryBuilder $query, $originalWhereCount)
- {
- // Here, we totally remove all of the where clauses since we are going to
- // rebuild them as nested queries by slicing the groups of wheres into
- // their own sections. This is to prevent any confusing logic order.
- $allWheres = $query->wheres;
-
- $query->wheres = [];
-
- $this->groupWhereSliceForScope(
- $query, array_slice($allWheres, 0, $originalWhereCount)
- );
-
- $this->groupWhereSliceForScope(
- $query, array_slice($allWheres, $originalWhereCount)
- );
- }
-
- /**
- * Slice where conditions at the given offset and add them to the query as a nested condition.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $whereSlice
- * @return void
- */
- protected function groupWhereSliceForScope(QueryBuilder $query, $whereSlice)
- {
- $whereBooleans = collect($whereSlice)->pluck('boolean');
-
- // Here we'll check if the given subset of where clauses contains any "or"
- // booleans and in this case create a nested where expression. That way
- // we don't add any unnecessary nesting thus keeping the query clean.
- if ($whereBooleans->contains('or')) {
- $query->wheres[] = $this->createNestedWhere(
- $whereSlice, $whereBooleans->first()
- );
- } else {
- $query->wheres = array_merge($query->wheres, $whereSlice);
- }
- }
-
- /**
- * Create a where array with nested where conditions.
- *
- * @param array $whereSlice
- * @param string $boolean
- * @return array
- */
- protected function createNestedWhere($whereSlice, $boolean = 'and')
- {
- $whereGroup = $this->getQuery()->forNestedWhere();
-
- $whereGroup->wheres = $whereSlice;
-
- return ['type' => 'Nested', 'query' => $whereGroup, 'boolean' => $boolean];
- }
-
- /**
- * Set the relationships that should be eager loaded.
- *
- * @param mixed $relations
- * @return $this
- */
- public function with($relations)
- {
- $eagerLoad = $this->parseWithRelations(is_string($relations) ? func_get_args() : $relations);
-
- $this->eagerLoad = array_merge($this->eagerLoad, $eagerLoad);
-
- return $this;
- }
-
- /**
- * Prevent the specified relations from being eager loaded.
- *
- * @param mixed $relations
- * @return $this
- */
- public function without($relations)
- {
- $this->eagerLoad = array_diff_key($this->eagerLoad, array_flip(
- is_string($relations) ? func_get_args() : $relations
- ));
-
- return $this;
- }
-
- /**
- * Create a new instance of the model being queried.
- *
- * @param array $attributes
- * @return \Illuminate\Database\Eloquent\Model|static
- */
- public function newModelInstance($attributes = [])
- {
- return $this->model->newInstance($attributes)->setConnection(
- $this->query->getConnection()->getName()
- );
- }
-
- /**
- * Parse a list of relations into individuals.
- *
- * @param array $relations
- * @return array
- */
- protected function parseWithRelations(array $relations)
- {
- $results = [];
-
- foreach ($relations as $name => $constraints) {
- // If the "name" value is a numeric key, we can assume that no
- // constraints have been specified. We'll just put an empty
- // Closure there, so that we can treat them all the same.
- if (is_numeric($name)) {
- $name = $constraints;
-
- [$name, $constraints] = Str::contains($name, ':')
- ? $this->createSelectWithConstraint($name)
- : [$name, function () {
- //
- }];
- }
-
- // We need to separate out any nested includes, which allows the developers
- // to load deep relationships using "dots" without stating each level of
- // the relationship with its own key in the array of eager-load names.
- $results = $this->addNestedWiths($name, $results);
-
- $results[$name] = $constraints;
- }
-
- return $results;
- }
-
- /**
- * Create a constraint to select the given columns for the relation.
- *
- * @param string $name
- * @return array
- */
- protected function createSelectWithConstraint($name)
- {
- return [explode(':', $name)[0], function ($query) use ($name) {
- $query->select(explode(',', explode(':', $name)[1]));
- }];
- }
-
- /**
- * Parse the nested relationships in a relation.
- *
- * @param string $name
- * @param array $results
- * @return array
- */
- protected function addNestedWiths($name, $results)
- {
- $progress = [];
-
- // If the relation has already been set on the result array, we will not set it
- // again, since that would override any constraints that were already placed
- // on the relationships. We will only set the ones that are not specified.
- foreach (explode('.', $name) as $segment) {
- $progress[] = $segment;
-
- if (! isset($results[$last = implode('.', $progress)])) {
- $results[$last] = function () {
- //
- };
- }
- }
-
- return $results;
- }
-
- /**
- * Get the underlying query builder instance.
- *
- * @return \Illuminate\Database\Query\Builder
- */
- public function getQuery()
- {
- return $this->query;
- }
-
- /**
- * Set the underlying query builder instance.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @return $this
- */
- public function setQuery($query)
- {
- $this->query = $query;
-
- return $this;
- }
-
- /**
- * Get a base query builder instance.
- *
- * @return \Illuminate\Database\Query\Builder
- */
- public function toBase()
- {
- return $this->applyScopes()->getQuery();
- }
-
- /**
- * Get the relationships being eagerly loaded.
- *
- * @return array
- */
- public function getEagerLoads()
- {
- return $this->eagerLoad;
- }
-
- /**
- * Set the relationships being eagerly loaded.
- *
- * @param array $eagerLoad
- * @return $this
- */
- public function setEagerLoads(array $eagerLoad)
- {
- $this->eagerLoad = $eagerLoad;
-
- return $this;
- }
-
- /**
- * Get the model instance being queried.
- *
- * @return \Illuminate\Database\Eloquent\Model|static
- */
- public function getModel()
- {
- return $this->model;
- }
-
- /**
- * Set a model instance for the model being queried.
- *
- * @param \Illuminate\Database\Eloquent\Model $model
- * @return $this
- */
- public function setModel(Model $model)
- {
- $this->model = $model;
-
- $this->query->from($model->getTable());
-
- return $this;
- }
-
- /**
- * Qualify the given column name by the model's table.
- *
- * @param string $column
- * @return string
- */
- public function qualifyColumn($column)
- {
- return $this->model->qualifyColumn($column);
- }
-
- /**
- * Get the given macro by name.
- *
- * @param string $name
- * @return \Closure
- */
- public function getMacro($name)
- {
- return Arr::get($this->localMacros, $name);
- }
-
- /**
- * Dynamically handle calls into the query instance.
- *
- * @param string $method
- * @param array $parameters
- * @return mixed
- */
- public function __call($method, $parameters)
- {
- if ($method === 'macro') {
- $this->localMacros[$parameters[0]] = $parameters[1];
-
- return;
- }
-
- if (isset($this->localMacros[$method])) {
- array_unshift($parameters, $this);
-
- return $this->localMacros[$method](...$parameters);
- }
-
- if (isset(static::$macros[$method])) {
- if (static::$macros[$method] instanceof Closure) {
- return call_user_func_array(static::$macros[$method]->bindTo($this, static::class), $parameters);
- }
-
- return call_user_func_array(static::$macros[$method], $parameters);
- }
-
- if (method_exists($this->model, $scope = 'scope'.ucfirst($method))) {
- return $this->callScope([$this->model, $scope], $parameters);
- }
-
- if (in_array($method, $this->passthru)) {
- return $this->toBase()->{$method}(...$parameters);
- }
-
- $this->forwardCallTo($this->query, $method, $parameters);
-
- return $this;
- }
-
- /**
- * Dynamically handle calls into the query instance.
- *
- * @param string $method
- * @param array $parameters
- * @return mixed
- *
- * @throws \BadMethodCallException
- */
- public static function __callStatic($method, $parameters)
- {
- if ($method === 'macro') {
- static::$macros[$parameters[0]] = $parameters[1];
-
- return;
- }
-
- if (! isset(static::$macros[$method])) {
- static::throwBadMethodCallException($method);
- }
-
- if (static::$macros[$method] instanceof Closure) {
- return call_user_func_array(Closure::bind(static::$macros[$method], null, static::class), $parameters);
- }
-
- return call_user_func_array(static::$macros[$method], $parameters);
- }
-
- /**
- * Force a clone of the underlying query builder when cloning.
- *
- * @return void
- */
- public function __clone()
- {
- $this->query = clone $this->query;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Collection.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Collection.php
deleted file mode 100755
index 44690fb..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Collection.php
+++ /dev/null
@@ -1,582 +0,0 @@
-getKey();
- }
-
- if ($key instanceof Arrayable) {
- $key = $key->toArray();
- }
-
- if (is_array($key)) {
- if ($this->isEmpty()) {
- return new static;
- }
-
- return $this->whereIn($this->first()->getKeyName(), $key);
- }
-
- return Arr::first($this->items, function ($model) use ($key) {
- return $model->getKey() == $key;
- }, $default);
- }
-
- /**
- * Load a set of relationships onto the collection.
- *
- * @param array|string $relations
- * @return $this
- */
- public function load($relations)
- {
- if ($this->isNotEmpty()) {
- if (is_string($relations)) {
- $relations = func_get_args();
- }
-
- $query = $this->first()->newQueryWithoutRelationships()->with($relations);
-
- $this->items = $query->eagerLoadRelations($this->items);
- }
-
- return $this;
- }
-
- /**
- * Load a set of relationship counts onto the collection.
- *
- * @param array|string $relations
- * @return $this
- */
- public function loadCount($relations)
- {
- if ($this->isEmpty()) {
- return $this;
- }
-
- $models = $this->first()->newModelQuery()
- ->whereKey($this->modelKeys())
- ->select($this->first()->getKeyName())
- ->withCount(...func_get_args())
- ->get();
-
- $attributes = Arr::except(
- array_keys($models->first()->getAttributes()),
- $models->first()->getKeyName()
- );
-
- $models->each(function ($model) use ($attributes) {
- $this->find($model->getKey())->forceFill(
- Arr::only($model->getAttributes(), $attributes)
- )->syncOriginalAttributes($attributes);
- });
-
- return $this;
- }
-
- /**
- * Load a set of relationships onto the collection if they are not already eager loaded.
- *
- * @param array|string $relations
- * @return $this
- */
- public function loadMissing($relations)
- {
- if (is_string($relations)) {
- $relations = func_get_args();
- }
-
- foreach ($relations as $key => $value) {
- if (is_numeric($key)) {
- $key = $value;
- }
-
- $segments = explode('.', explode(':', $key)[0]);
-
- if (Str::contains($key, ':')) {
- $segments[count($segments) - 1] .= ':'.explode(':', $key)[1];
- }
-
- $path = [];
-
- foreach ($segments as $segment) {
- $path[] = [$segment => $segment];
- }
-
- if (is_callable($value)) {
- $path[count($segments) - 1][end($segments)] = $value;
- }
-
- $this->loadMissingRelation($this, $path);
- }
-
- return $this;
- }
-
- /**
- * Load a relationship path if it is not already eager loaded.
- *
- * @param \Illuminate\Database\Eloquent\Collection $models
- * @param array $path
- * @return void
- */
- protected function loadMissingRelation(Collection $models, array $path)
- {
- $relation = array_shift($path);
-
- $name = explode(':', key($relation))[0];
-
- if (is_string(reset($relation))) {
- $relation = reset($relation);
- }
-
- $models->filter(function ($model) use ($name) {
- return ! is_null($model) && ! $model->relationLoaded($name);
- })->load($relation);
-
- if (empty($path)) {
- return;
- }
-
- $models = $models->pluck($name);
-
- if ($models->first() instanceof BaseCollection) {
- $models = $models->collapse();
- }
-
- $this->loadMissingRelation(new static($models), $path);
- }
-
- /**
- * Load a set of relationships onto the mixed relationship collection.
- *
- * @param string $relation
- * @param array $relations
- * @return $this
- */
- public function loadMorph($relation, $relations)
- {
- $this->pluck($relation)
- ->filter()
- ->groupBy(function ($model) {
- return get_class($model);
- })
- ->each(function ($models, $className) use ($relations) {
- static::make($models)->load($relations[$className] ?? []);
- });
-
- return $this;
- }
-
- /**
- * Add an item to the collection.
- *
- * @param mixed $item
- * @return $this
- */
- public function add($item)
- {
- $this->items[] = $item;
-
- return $this;
- }
-
- /**
- * Determine if a key exists in the collection.
- *
- * @param mixed $key
- * @param mixed $operator
- * @param mixed $value
- * @return bool
- */
- public function contains($key, $operator = null, $value = null)
- {
- if (func_num_args() > 1 || $this->useAsCallable($key)) {
- return parent::contains(...func_get_args());
- }
-
- if ($key instanceof Model) {
- return parent::contains(function ($model) use ($key) {
- return $model->is($key);
- });
- }
-
- return parent::contains(function ($model) use ($key) {
- return $model->getKey() == $key;
- });
- }
-
- /**
- * Get the array of primary keys.
- *
- * @return array
- */
- public function modelKeys()
- {
- return array_map(function ($model) {
- return $model->getKey();
- }, $this->items);
- }
-
- /**
- * Merge the collection with the given items.
- *
- * @param \ArrayAccess|array $items
- * @return static
- */
- public function merge($items)
- {
- $dictionary = $this->getDictionary();
-
- foreach ($items as $item) {
- $dictionary[$item->getKey()] = $item;
- }
-
- return new static(array_values($dictionary));
- }
-
- /**
- * Run a map over each of the items.
- *
- * @param callable $callback
- * @return \Illuminate\Support\Collection|static
- */
- public function map(callable $callback)
- {
- $result = parent::map($callback);
-
- return $result->contains(function ($item) {
- return ! $item instanceof Model;
- }) ? $result->toBase() : $result;
- }
-
- /**
- * Reload a fresh model instance from the database for all the entities.
- *
- * @param array|string $with
- * @return static
- */
- public function fresh($with = [])
- {
- if ($this->isEmpty()) {
- return new static;
- }
-
- $model = $this->first();
-
- $freshModels = $model->newQueryWithoutScopes()
- ->with(is_string($with) ? func_get_args() : $with)
- ->whereIn($model->getKeyName(), $this->modelKeys())
- ->get()
- ->getDictionary();
-
- return $this->map(function ($model) use ($freshModels) {
- return $model->exists && isset($freshModels[$model->getKey()])
- ? $freshModels[$model->getKey()] : null;
- });
- }
-
- /**
- * Diff the collection with the given items.
- *
- * @param \ArrayAccess|array $items
- * @return static
- */
- public function diff($items)
- {
- $diff = new static;
-
- $dictionary = $this->getDictionary($items);
-
- foreach ($this->items as $item) {
- if (! isset($dictionary[$item->getKey()])) {
- $diff->add($item);
- }
- }
-
- return $diff;
- }
-
- /**
- * Intersect the collection with the given items.
- *
- * @param \ArrayAccess|array $items
- * @return static
- */
- public function intersect($items)
- {
- $intersect = new static;
-
- $dictionary = $this->getDictionary($items);
-
- foreach ($this->items as $item) {
- if (isset($dictionary[$item->getKey()])) {
- $intersect->add($item);
- }
- }
-
- return $intersect;
- }
-
- /**
- * Return only unique items from the collection.
- *
- * @param string|callable|null $key
- * @param bool $strict
- * @return static|\Illuminate\Support\Collection
- */
- public function unique($key = null, $strict = false)
- {
- if (! is_null($key)) {
- return parent::unique($key, $strict);
- }
-
- return new static(array_values($this->getDictionary()));
- }
-
- /**
- * Returns only the models from the collection with the specified keys.
- *
- * @param mixed $keys
- * @return static
- */
- public function only($keys)
- {
- if (is_null($keys)) {
- return new static($this->items);
- }
-
- $dictionary = Arr::only($this->getDictionary(), $keys);
-
- return new static(array_values($dictionary));
- }
-
- /**
- * Returns all models in the collection except the models with specified keys.
- *
- * @param mixed $keys
- * @return static
- */
- public function except($keys)
- {
- $dictionary = Arr::except($this->getDictionary(), $keys);
-
- return new static(array_values($dictionary));
- }
-
- /**
- * Make the given, typically visible, attributes hidden across the entire collection.
- *
- * @param array|string $attributes
- * @return $this
- */
- public function makeHidden($attributes)
- {
- return $this->each->addHidden($attributes);
- }
-
- /**
- * Make the given, typically hidden, attributes visible across the entire collection.
- *
- * @param array|string $attributes
- * @return $this
- */
- public function makeVisible($attributes)
- {
- return $this->each->makeVisible($attributes);
- }
-
- /**
- * Get a dictionary keyed by primary keys.
- *
- * @param \ArrayAccess|array|null $items
- * @return array
- */
- public function getDictionary($items = null)
- {
- $items = is_null($items) ? $this->items : $items;
-
- $dictionary = [];
-
- foreach ($items as $value) {
- $dictionary[$value->getKey()] = $value;
- }
-
- return $dictionary;
- }
-
- /**
- * The following methods are intercepted to always return base collections.
- */
-
- /**
- * Get an array with the values of a given key.
- *
- * @param string $value
- * @param string|null $key
- * @return \Illuminate\Support\Collection
- */
- public function pluck($value, $key = null)
- {
- return $this->toBase()->pluck($value, $key);
- }
-
- /**
- * Get the keys of the collection items.
- *
- * @return \Illuminate\Support\Collection
- */
- public function keys()
- {
- return $this->toBase()->keys();
- }
-
- /**
- * Zip the collection together with one or more arrays.
- *
- * @param mixed ...$items
- * @return \Illuminate\Support\Collection
- */
- public function zip($items)
- {
- return call_user_func_array([$this->toBase(), 'zip'], func_get_args());
- }
-
- /**
- * Collapse the collection of items into a single array.
- *
- * @return \Illuminate\Support\Collection
- */
- public function collapse()
- {
- return $this->toBase()->collapse();
- }
-
- /**
- * Get a flattened array of the items in the collection.
- *
- * @param int $depth
- * @return \Illuminate\Support\Collection
- */
- public function flatten($depth = INF)
- {
- return $this->toBase()->flatten($depth);
- }
-
- /**
- * Flip the items in the collection.
- *
- * @return \Illuminate\Support\Collection
- */
- public function flip()
- {
- return $this->toBase()->flip();
- }
-
- /**
- * Pad collection to the specified length with a value.
- *
- * @param int $size
- * @param mixed $value
- * @return \Illuminate\Support\Collection
- */
- public function pad($size, $value)
- {
- return $this->toBase()->pad($size, $value);
- }
-
- /**
- * Get the type of the entities being queued.
- *
- * @return string|null
- *
- * @throws \LogicException
- */
- public function getQueueableClass()
- {
- if ($this->isEmpty()) {
- return;
- }
-
- $class = get_class($this->first());
-
- $this->each(function ($model) use ($class) {
- if (get_class($model) !== $class) {
- throw new LogicException('Queueing collections with multiple model types is not supported.');
- }
- });
-
- return $class;
- }
-
- /**
- * Get the identifiers for all of the entities.
- *
- * @return array
- */
- public function getQueueableIds()
- {
- if ($this->isEmpty()) {
- return [];
- }
-
- return $this->first() instanceof Pivot
- ? $this->map->getQueueableId()->all()
- : $this->modelKeys();
- }
-
- /**
- * Get the relationships of the entities being queued.
- *
- * @return array
- */
- public function getQueueableRelations()
- {
- return $this->isNotEmpty() ? $this->first()->getQueueableRelations() : [];
- }
-
- /**
- * Get the connection of the entities being queued.
- *
- * @return string|null
- *
- * @throws \LogicException
- */
- public function getQueueableConnection()
- {
- if ($this->isEmpty()) {
- return;
- }
-
- $connection = $this->first()->getConnectionName();
-
- $this->each(function ($model) use ($connection) {
- if ($model->getConnectionName() !== $connection) {
- throw new LogicException('Queueing collections with multiple model connections is not supported.');
- }
- });
-
- return $connection;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/GuardsAttributes.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/GuardsAttributes.php
deleted file mode 100644
index b9095c0..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/GuardsAttributes.php
+++ /dev/null
@@ -1,193 +0,0 @@
-fillable;
- }
-
- /**
- * Set the fillable attributes for the model.
- *
- * @param array $fillable
- * @return $this
- */
- public function fillable(array $fillable)
- {
- $this->fillable = $fillable;
-
- return $this;
- }
-
- /**
- * Get the guarded attributes for the model.
- *
- * @return array
- */
- public function getGuarded()
- {
- return $this->guarded;
- }
-
- /**
- * Set the guarded attributes for the model.
- *
- * @param array $guarded
- * @return $this
- */
- public function guard(array $guarded)
- {
- $this->guarded = $guarded;
-
- return $this;
- }
-
- /**
- * Disable all mass assignable restrictions.
- *
- * @param bool $state
- * @return void
- */
- public static function unguard($state = true)
- {
- static::$unguarded = $state;
- }
-
- /**
- * Enable the mass assignment restrictions.
- *
- * @return void
- */
- public static function reguard()
- {
- static::$unguarded = false;
- }
-
- /**
- * Determine if current state is "unguarded".
- *
- * @return bool
- */
- public static function isUnguarded()
- {
- return static::$unguarded;
- }
-
- /**
- * Run the given callable while being unguarded.
- *
- * @param callable $callback
- * @return mixed
- */
- public static function unguarded(callable $callback)
- {
- if (static::$unguarded) {
- return $callback();
- }
-
- static::unguard();
-
- try {
- return $callback();
- } finally {
- static::reguard();
- }
- }
-
- /**
- * Determine if the given attribute may be mass assigned.
- *
- * @param string $key
- * @return bool
- */
- public function isFillable($key)
- {
- if (static::$unguarded) {
- return true;
- }
-
- // If the key is in the "fillable" array, we can of course assume that it's
- // a fillable attribute. Otherwise, we will check the guarded array when
- // we need to determine if the attribute is black-listed on the model.
- if (in_array($key, $this->getFillable())) {
- return true;
- }
-
- // If the attribute is explicitly listed in the "guarded" array then we can
- // return false immediately. This means this attribute is definitely not
- // fillable and there is no point in going any further in this method.
- if ($this->isGuarded($key)) {
- return false;
- }
-
- return empty($this->getFillable()) &&
- ! Str::startsWith($key, '_');
- }
-
- /**
- * Determine if the given key is guarded.
- *
- * @param string $key
- * @return bool
- */
- public function isGuarded($key)
- {
- return in_array($key, $this->getGuarded()) || $this->getGuarded() == ['*'];
- }
-
- /**
- * Determine if the model is totally guarded.
- *
- * @return bool
- */
- public function totallyGuarded()
- {
- return count($this->getFillable()) === 0 && $this->getGuarded() == ['*'];
- }
-
- /**
- * Get the fillable attributes of a given array.
- *
- * @param array $attributes
- * @return array
- */
- protected function fillableFromArray(array $attributes)
- {
- if (count($this->getFillable()) > 0 && ! static::$unguarded) {
- return array_intersect_key($attributes, array_flip($this->getFillable()));
- }
-
- return $attributes;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php
deleted file mode 100644
index 8c6dc1f..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php
+++ /dev/null
@@ -1,1238 +0,0 @@
-addDateAttributesToArray(
- $attributes = $this->getArrayableAttributes()
- );
-
- $attributes = $this->addMutatedAttributesToArray(
- $attributes, $mutatedAttributes = $this->getMutatedAttributes()
- );
-
- // Next we will handle any casts that have been setup for this model and cast
- // the values to their appropriate type. If the attribute has a mutator we
- // will not perform the cast on those attributes to avoid any confusion.
- $attributes = $this->addCastAttributesToArray(
- $attributes, $mutatedAttributes
- );
-
- // Here we will grab all of the appended, calculated attributes to this model
- // as these attributes are not really in the attributes array, but are run
- // when we need to array or JSON the model for convenience to the coder.
- foreach ($this->getArrayableAppends() as $key) {
- $attributes[$key] = $this->mutateAttributeForArray($key, null);
- }
-
- return $attributes;
- }
-
- /**
- * Add the date attributes to the attributes array.
- *
- * @param array $attributes
- * @return array
- */
- protected function addDateAttributesToArray(array $attributes)
- {
- foreach ($this->getDates() as $key) {
- if (! isset($attributes[$key])) {
- continue;
- }
-
- $attributes[$key] = $this->serializeDate(
- $this->asDateTime($attributes[$key])
- );
- }
-
- return $attributes;
- }
-
- /**
- * Add the mutated attributes to the attributes array.
- *
- * @param array $attributes
- * @param array $mutatedAttributes
- * @return array
- */
- protected function addMutatedAttributesToArray(array $attributes, array $mutatedAttributes)
- {
- foreach ($mutatedAttributes as $key) {
- // We want to spin through all the mutated attributes for this model and call
- // the mutator for the attribute. We cache off every mutated attributes so
- // we don't have to constantly check on attributes that actually change.
- if (! array_key_exists($key, $attributes)) {
- continue;
- }
-
- // Next, we will call the mutator for this attribute so that we can get these
- // mutated attribute's actual values. After we finish mutating each of the
- // attributes we will return this final array of the mutated attributes.
- $attributes[$key] = $this->mutateAttributeForArray(
- $key, $attributes[$key]
- );
- }
-
- return $attributes;
- }
-
- /**
- * Add the casted attributes to the attributes array.
- *
- * @param array $attributes
- * @param array $mutatedAttributes
- * @return array
- */
- protected function addCastAttributesToArray(array $attributes, array $mutatedAttributes)
- {
- foreach ($this->getCasts() as $key => $value) {
- if (! array_key_exists($key, $attributes) || in_array($key, $mutatedAttributes)) {
- continue;
- }
-
- // Here we will cast the attribute. Then, if the cast is a date or datetime cast
- // then we will serialize the date for the array. This will convert the dates
- // to strings based on the date format specified for these Eloquent models.
- $attributes[$key] = $this->castAttribute(
- $key, $attributes[$key]
- );
-
- // If the attribute cast was a date or a datetime, we will serialize the date as
- // a string. This allows the developers to customize how dates are serialized
- // into an array without affecting how they are persisted into the storage.
- if ($attributes[$key] &&
- ($value === 'date' || $value === 'datetime')) {
- $attributes[$key] = $this->serializeDate($attributes[$key]);
- }
-
- if ($attributes[$key] && $this->isCustomDateTimeCast($value)) {
- $attributes[$key] = $attributes[$key]->format(explode(':', $value, 2)[1]);
- }
- }
-
- return $attributes;
- }
-
- /**
- * Get an attribute array of all arrayable attributes.
- *
- * @return array
- */
- protected function getArrayableAttributes()
- {
- return $this->getArrayableItems($this->attributes);
- }
-
- /**
- * Get all of the appendable values that are arrayable.
- *
- * @return array
- */
- protected function getArrayableAppends()
- {
- if (! count($this->appends)) {
- return [];
- }
-
- return $this->getArrayableItems(
- array_combine($this->appends, $this->appends)
- );
- }
-
- /**
- * Get the model's relationships in array form.
- *
- * @return array
- */
- public function relationsToArray()
- {
- $attributes = [];
-
- foreach ($this->getArrayableRelations() as $key => $value) {
- // If the values implements the Arrayable interface we can just call this
- // toArray method on the instances which will convert both models and
- // collections to their proper array form and we'll set the values.
- if ($value instanceof Arrayable) {
- $relation = $value->toArray();
- }
-
- // If the value is null, we'll still go ahead and set it in this list of
- // attributes since null is used to represent empty relationships if
- // if it a has one or belongs to type relationships on the models.
- elseif (is_null($value)) {
- $relation = $value;
- }
-
- // If the relationships snake-casing is enabled, we will snake case this
- // key so that the relation attribute is snake cased in this returned
- // array to the developers, making this consistent with attributes.
- if (static::$snakeAttributes) {
- $key = Str::snake($key);
- }
-
- // If the relation value has been set, we will set it on this attributes
- // list for returning. If it was not arrayable or null, we'll not set
- // the value on the array because it is some type of invalid value.
- if (isset($relation) || is_null($value)) {
- $attributes[$key] = $relation;
- }
-
- unset($relation);
- }
-
- return $attributes;
- }
-
- /**
- * Get an attribute array of all arrayable relations.
- *
- * @return array
- */
- protected function getArrayableRelations()
- {
- return $this->getArrayableItems($this->relations);
- }
-
- /**
- * Get an attribute array of all arrayable values.
- *
- * @param array $values
- * @return array
- */
- protected function getArrayableItems(array $values)
- {
- if (count($this->getVisible()) > 0) {
- $values = array_intersect_key($values, array_flip($this->getVisible()));
- }
-
- if (count($this->getHidden()) > 0) {
- $values = array_diff_key($values, array_flip($this->getHidden()));
- }
-
- return $values;
- }
-
- /**
- * Get an attribute from the model.
- *
- * @param string $key
- * @return mixed
- */
- public function getAttribute($key)
- {
- if (! $key) {
- return;
- }
-
- // If the attribute exists in the attribute array or has a "get" mutator we will
- // get the attribute's value. Otherwise, we will proceed as if the developers
- // are asking for a relationship's value. This covers both types of values.
- if (array_key_exists($key, $this->attributes) ||
- $this->hasGetMutator($key)) {
- return $this->getAttributeValue($key);
- }
-
- // Here we will determine if the model base class itself contains this given key
- // since we don't want to treat any of those methods as relationships because
- // they are all intended as helper methods and none of these are relations.
- if (method_exists(self::class, $key)) {
- return;
- }
-
- return $this->getRelationValue($key);
- }
-
- /**
- * Get a plain attribute (not a relationship).
- *
- * @param string $key
- * @return mixed
- */
- public function getAttributeValue($key)
- {
- $value = $this->getAttributeFromArray($key);
-
- // If the attribute has a get mutator, we will call that then return what
- // it returns as the value, which is useful for transforming values on
- // retrieval from the model to a form that is more useful for usage.
- if ($this->hasGetMutator($key)) {
- return $this->mutateAttribute($key, $value);
- }
-
- // If the attribute exists within the cast array, we will convert it to
- // an appropriate native PHP type dependant upon the associated value
- // given with the key in the pair. Dayle made this comment line up.
- if ($this->hasCast($key)) {
- return $this->castAttribute($key, $value);
- }
-
- // If the attribute is listed as a date, we will convert it to a DateTime
- // instance on retrieval, which makes it quite convenient to work with
- // date fields without having to create a mutator for each property.
- if (in_array($key, $this->getDates()) &&
- ! is_null($value)) {
- return $this->asDateTime($value);
- }
-
- return $value;
- }
-
- /**
- * Get an attribute from the $attributes array.
- *
- * @param string $key
- * @return mixed
- */
- protected function getAttributeFromArray($key)
- {
- if (isset($this->attributes[$key])) {
- return $this->attributes[$key];
- }
- }
-
- /**
- * Get a relationship.
- *
- * @param string $key
- * @return mixed
- */
- public function getRelationValue($key)
- {
- // If the key already exists in the relationships array, it just means the
- // relationship has already been loaded, so we'll just return it out of
- // here because there is no need to query within the relations twice.
- if ($this->relationLoaded($key)) {
- return $this->relations[$key];
- }
-
- // If the "attribute" exists as a method on the model, we will just assume
- // it is a relationship and will load and return results from the query
- // and hydrate the relationship's value on the "relationships" array.
- if (method_exists($this, $key)) {
- return $this->getRelationshipFromMethod($key);
- }
- }
-
- /**
- * Get a relationship value from a method.
- *
- * @param string $method
- * @return mixed
- *
- * @throws \LogicException
- */
- protected function getRelationshipFromMethod($method)
- {
- $relation = $this->$method();
-
- if (! $relation instanceof Relation) {
- throw new LogicException(sprintf(
- '%s::%s must return a relationship instance.', static::class, $method
- ));
- }
-
- return tap($relation->getResults(), function ($results) use ($method) {
- $this->setRelation($method, $results);
- });
- }
-
- /**
- * Determine if a get mutator exists for an attribute.
- *
- * @param string $key
- * @return bool
- */
- public function hasGetMutator($key)
- {
- return method_exists($this, 'get'.Str::studly($key).'Attribute');
- }
-
- /**
- * Get the value of an attribute using its mutator.
- *
- * @param string $key
- * @param mixed $value
- * @return mixed
- */
- protected function mutateAttribute($key, $value)
- {
- return $this->{'get'.Str::studly($key).'Attribute'}($value);
- }
-
- /**
- * Get the value of an attribute using its mutator for array conversion.
- *
- * @param string $key
- * @param mixed $value
- * @return mixed
- */
- protected function mutateAttributeForArray($key, $value)
- {
- $value = $this->mutateAttribute($key, $value);
-
- return $value instanceof Arrayable ? $value->toArray() : $value;
- }
-
- /**
- * Cast an attribute to a native PHP type.
- *
- * @param string $key
- * @param mixed $value
- * @return mixed
- */
- protected function castAttribute($key, $value)
- {
- if (is_null($value)) {
- return $value;
- }
-
- switch ($this->getCastType($key)) {
- case 'int':
- case 'integer':
- return (int) $value;
- case 'real':
- case 'float':
- case 'double':
- return $this->fromFloat($value);
- case 'decimal':
- return $this->asDecimal($value, explode(':', $this->getCasts()[$key], 2)[1]);
- case 'string':
- return (string) $value;
- case 'bool':
- case 'boolean':
- return (bool) $value;
- case 'object':
- return $this->fromJson($value, true);
- case 'array':
- case 'json':
- return $this->fromJson($value);
- case 'collection':
- return new BaseCollection($this->fromJson($value));
- case 'date':
- return $this->asDate($value);
- case 'datetime':
- case 'custom_datetime':
- return $this->asDateTime($value);
- case 'timestamp':
- return $this->asTimestamp($value);
- default:
- return $value;
- }
- }
-
- /**
- * Get the type of cast for a model attribute.
- *
- * @param string $key
- * @return string
- */
- protected function getCastType($key)
- {
- if ($this->isCustomDateTimeCast($this->getCasts()[$key])) {
- return 'custom_datetime';
- }
-
- if ($this->isDecimalCast($this->getCasts()[$key])) {
- return 'decimal';
- }
-
- return trim(strtolower($this->getCasts()[$key]));
- }
-
- /**
- * Determine if the cast type is a custom date time cast.
- *
- * @param string $cast
- * @return bool
- */
- protected function isCustomDateTimeCast($cast)
- {
- return strncmp($cast, 'date:', 5) === 0 ||
- strncmp($cast, 'datetime:', 9) === 0;
- }
-
- /**
- * Determine if the cast type is a decimal cast.
- *
- * @param string $cast
- * @return bool
- */
- protected function isDecimalCast($cast)
- {
- return strncmp($cast, 'decimal:', 8) === 0;
- }
-
- /**
- * Set a given attribute on the model.
- *
- * @param string $key
- * @param mixed $value
- * @return mixed
- */
- public function setAttribute($key, $value)
- {
- // First we will check for the presence of a mutator for the set operation
- // which simply lets the developers tweak the attribute as it is set on
- // the model, such as "json_encoding" an listing of data for storage.
- if ($this->hasSetMutator($key)) {
- return $this->setMutatedAttributeValue($key, $value);
- }
-
- // If an attribute is listed as a "date", we'll convert it from a DateTime
- // instance into a form proper for storage on the database tables using
- // the connection grammar's date format. We will auto set the values.
- elseif ($value && $this->isDateAttribute($key)) {
- $value = $this->fromDateTime($value);
- }
-
- if ($this->isJsonCastable($key) && ! is_null($value)) {
- $value = $this->castAttributeAsJson($key, $value);
- }
-
- // If this attribute contains a JSON ->, we'll set the proper value in the
- // attribute's underlying array. This takes care of properly nesting an
- // attribute in the array's value in the case of deeply nested items.
- if (Str::contains($key, '->')) {
- return $this->fillJsonAttribute($key, $value);
- }
-
- $this->attributes[$key] = $value;
-
- return $this;
- }
-
- /**
- * Determine if a set mutator exists for an attribute.
- *
- * @param string $key
- * @return bool
- */
- public function hasSetMutator($key)
- {
- return method_exists($this, 'set'.Str::studly($key).'Attribute');
- }
-
- /**
- * Set the value of an attribute using its mutator.
- *
- * @param string $key
- * @param mixed $value
- * @return mixed
- */
- protected function setMutatedAttributeValue($key, $value)
- {
- return $this->{'set'.Str::studly($key).'Attribute'}($value);
- }
-
- /**
- * Determine if the given attribute is a date or date castable.
- *
- * @param string $key
- * @return bool
- */
- protected function isDateAttribute($key)
- {
- return in_array($key, $this->getDates()) ||
- $this->isDateCastable($key);
- }
-
- /**
- * Set a given JSON attribute on the model.
- *
- * @param string $key
- * @param mixed $value
- * @return $this
- */
- public function fillJsonAttribute($key, $value)
- {
- [$key, $path] = explode('->', $key, 2);
-
- $this->attributes[$key] = $this->asJson($this->getArrayAttributeWithValue(
- $path, $key, $value
- ));
-
- return $this;
- }
-
- /**
- * Get an array attribute with the given key and value set.
- *
- * @param string $path
- * @param string $key
- * @param mixed $value
- * @return $this
- */
- protected function getArrayAttributeWithValue($path, $key, $value)
- {
- return tap($this->getArrayAttributeByKey($key), function (&$array) use ($path, $value) {
- Arr::set($array, str_replace('->', '.', $path), $value);
- });
- }
-
- /**
- * Get an array attribute or return an empty array if it is not set.
- *
- * @param string $key
- * @return array
- */
- protected function getArrayAttributeByKey($key)
- {
- return isset($this->attributes[$key]) ?
- $this->fromJson($this->attributes[$key]) : [];
- }
-
- /**
- * Cast the given attribute to JSON.
- *
- * @param string $key
- * @param mixed $value
- * @return string
- */
- protected function castAttributeAsJson($key, $value)
- {
- $value = $this->asJson($value);
-
- if ($value === false) {
- throw JsonEncodingException::forAttribute(
- $this, $key, json_last_error_msg()
- );
- }
-
- return $value;
- }
-
- /**
- * Encode the given value as JSON.
- *
- * @param mixed $value
- * @return string
- */
- protected function asJson($value)
- {
- return json_encode($value);
- }
-
- /**
- * Decode the given JSON back into an array or object.
- *
- * @param string $value
- * @param bool $asObject
- * @return mixed
- */
- public function fromJson($value, $asObject = false)
- {
- return json_decode($value, ! $asObject);
- }
-
- /**
- * Decode the given float.
- *
- * @param mixed $value
- * @return mixed
- */
- public function fromFloat($value)
- {
- switch ((string) $value) {
- case 'Infinity':
- return INF;
- case '-Infinity':
- return -INF;
- case 'NaN':
- return NAN;
- default:
- return (float) $value;
- }
- }
-
- /**
- * Return a decimal as string.
- *
- * @param float $value
- * @param int $decimals
- * @return string
- */
- protected function asDecimal($value, $decimals)
- {
- return number_format($value, $decimals, '.', '');
- }
-
- /**
- * Return a timestamp as DateTime object with time set to 00:00:00.
- *
- * @param mixed $value
- * @return \Illuminate\Support\Carbon
- */
- protected function asDate($value)
- {
- return $this->asDateTime($value)->startOfDay();
- }
-
- /**
- * Return a timestamp as DateTime object.
- *
- * @param mixed $value
- * @return \Illuminate\Support\Carbon
- */
- protected function asDateTime($value)
- {
- // If this value is already a Carbon instance, we shall just return it as is.
- // This prevents us having to re-instantiate a Carbon instance when we know
- // it already is one, which wouldn't be fulfilled by the DateTime check.
- if ($value instanceof Carbon) {
- return $value;
- }
-
- // If the value is already a DateTime instance, we will just skip the rest of
- // these checks since they will be a waste of time, and hinder performance
- // when checking the field. We will just return the DateTime right away.
- if ($value instanceof DateTimeInterface) {
- return new Carbon(
- $value->format('Y-m-d H:i:s.u'), $value->getTimezone()
- );
- }
-
- // If this value is an integer, we will assume it is a UNIX timestamp's value
- // and format a Carbon object from this timestamp. This allows flexibility
- // when defining your date fields as they might be UNIX timestamps here.
- if (is_numeric($value)) {
- return Carbon::createFromTimestamp($value);
- }
-
- // If the value is in simply year, month, day format, we will instantiate the
- // Carbon instances from that format. Again, this provides for simple date
- // fields on the database, while still supporting Carbonized conversion.
- if ($this->isStandardDateFormat($value)) {
- return Carbon::createFromFormat('Y-m-d', $value)->startOfDay();
- }
-
- // Finally, we will just assume this date is in the format used by default on
- // the database connection and use that format to create the Carbon object
- // that is returned back out to the developers after we convert it here.
- return Carbon::createFromFormat(
- str_replace('.v', '.u', $this->getDateFormat()), $value
- );
- }
-
- /**
- * Determine if the given value is a standard date format.
- *
- * @param string $value
- * @return bool
- */
- protected function isStandardDateFormat($value)
- {
- return preg_match('/^(\d{4})-(\d{1,2})-(\d{1,2})$/', $value);
- }
-
- /**
- * Convert a DateTime to a storable string.
- *
- * @param mixed $value
- * @return string|null
- */
- public function fromDateTime($value)
- {
- return empty($value) ? $value : $this->asDateTime($value)->format(
- $this->getDateFormat()
- );
- }
-
- /**
- * Return a timestamp as unix timestamp.
- *
- * @param mixed $value
- * @return int
- */
- protected function asTimestamp($value)
- {
- return $this->asDateTime($value)->getTimestamp();
- }
-
- /**
- * Prepare a date for array / JSON serialization.
- *
- * @param \DateTimeInterface $date
- * @return string
- */
- protected function serializeDate(DateTimeInterface $date)
- {
- return $date->format($this->getDateFormat());
- }
-
- /**
- * Get the attributes that should be converted to dates.
- *
- * @return array
- */
- public function getDates()
- {
- $defaults = [static::CREATED_AT, static::UPDATED_AT];
-
- return $this->usesTimestamps()
- ? array_unique(array_merge($this->dates, $defaults))
- : $this->dates;
- }
-
- /**
- * Get the format for database stored dates.
- *
- * @return string
- */
- public function getDateFormat()
- {
- return $this->dateFormat ?: $this->getConnection()->getQueryGrammar()->getDateFormat();
- }
-
- /**
- * Set the date format used by the model.
- *
- * @param string $format
- * @return $this
- */
- public function setDateFormat($format)
- {
- $this->dateFormat = $format;
-
- return $this;
- }
-
- /**
- * Determine whether an attribute should be cast to a native type.
- *
- * @param string $key
- * @param array|string|null $types
- * @return bool
- */
- public function hasCast($key, $types = null)
- {
- if (array_key_exists($key, $this->getCasts())) {
- return $types ? in_array($this->getCastType($key), (array) $types, true) : true;
- }
-
- return false;
- }
-
- /**
- * Get the casts array.
- *
- * @return array
- */
- public function getCasts()
- {
- if ($this->getIncrementing()) {
- return array_merge([$this->getKeyName() => $this->getKeyType()], $this->casts);
- }
-
- return $this->casts;
- }
-
- /**
- * Determine whether a value is Date / DateTime castable for inbound manipulation.
- *
- * @param string $key
- * @return bool
- */
- protected function isDateCastable($key)
- {
- return $this->hasCast($key, ['date', 'datetime']);
- }
-
- /**
- * Determine whether a value is JSON castable for inbound manipulation.
- *
- * @param string $key
- * @return bool
- */
- protected function isJsonCastable($key)
- {
- return $this->hasCast($key, ['array', 'json', 'object', 'collection']);
- }
-
- /**
- * Get all of the current attributes on the model.
- *
- * @return array
- */
- public function getAttributes()
- {
- return $this->attributes;
- }
-
- /**
- * Set the array of model attributes. No checking is done.
- *
- * @param array $attributes
- * @param bool $sync
- * @return $this
- */
- public function setRawAttributes(array $attributes, $sync = false)
- {
- $this->attributes = $attributes;
-
- if ($sync) {
- $this->syncOriginal();
- }
-
- return $this;
- }
-
- /**
- * Get the model's original attribute values.
- *
- * @param string|null $key
- * @param mixed $default
- * @return mixed|array
- */
- public function getOriginal($key = null, $default = null)
- {
- return Arr::get($this->original, $key, $default);
- }
-
- /**
- * Get a subset of the model's attributes.
- *
- * @param array|mixed $attributes
- * @return array
- */
- public function only($attributes)
- {
- $results = [];
-
- foreach (is_array($attributes) ? $attributes : func_get_args() as $attribute) {
- $results[$attribute] = $this->getAttribute($attribute);
- }
-
- return $results;
- }
-
- /**
- * Sync the original attributes with the current.
- *
- * @return $this
- */
- public function syncOriginal()
- {
- $this->original = $this->attributes;
-
- return $this;
- }
-
- /**
- * Sync a single original attribute with its current value.
- *
- * @param string $attribute
- * @return $this
- */
- public function syncOriginalAttribute($attribute)
- {
- return $this->syncOriginalAttributes($attribute);
- }
-
- /**
- * Sync multiple original attribute with their current values.
- *
- * @param array|string $attributes
- * @return $this
- */
- public function syncOriginalAttributes($attributes)
- {
- $attributes = is_array($attributes) ? $attributes : func_get_args();
-
- foreach ($attributes as $attribute) {
- $this->original[$attribute] = $this->attributes[$attribute];
- }
-
- return $this;
- }
-
- /**
- * Sync the changed attributes.
- *
- * @return $this
- */
- public function syncChanges()
- {
- $this->changes = $this->getDirty();
-
- return $this;
- }
-
- /**
- * Determine if the model or any of the given attribute(s) have been modified.
- *
- * @param array|string|null $attributes
- * @return bool
- */
- public function isDirty($attributes = null)
- {
- return $this->hasChanges(
- $this->getDirty(), is_array($attributes) ? $attributes : func_get_args()
- );
- }
-
- /**
- * Determine if the model and all the given attribute(s) have remained the same.
- *
- * @param array|string|null $attributes
- * @return bool
- */
- public function isClean($attributes = null)
- {
- return ! $this->isDirty(...func_get_args());
- }
-
- /**
- * Determine if the model or any of the given attribute(s) have been modified.
- *
- * @param array|string|null $attributes
- * @return bool
- */
- public function wasChanged($attributes = null)
- {
- return $this->hasChanges(
- $this->getChanges(), is_array($attributes) ? $attributes : func_get_args()
- );
- }
-
- /**
- * Determine if any of the given attributes were changed.
- *
- * @param array $changes
- * @param array|string|null $attributes
- * @return bool
- */
- protected function hasChanges($changes, $attributes = null)
- {
- // If no specific attributes were provided, we will just see if the dirty array
- // already contains any attributes. If it does we will just return that this
- // count is greater than zero. Else, we need to check specific attributes.
- if (empty($attributes)) {
- return count($changes) > 0;
- }
-
- // Here we will spin through every attribute and see if this is in the array of
- // dirty attributes. If it is, we will return true and if we make it through
- // all of the attributes for the entire array we will return false at end.
- foreach (Arr::wrap($attributes) as $attribute) {
- if (array_key_exists($attribute, $changes)) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * Get the attributes that have been changed since last sync.
- *
- * @return array
- */
- public function getDirty()
- {
- $dirty = [];
-
- foreach ($this->getAttributes() as $key => $value) {
- if (! $this->originalIsEquivalent($key, $value)) {
- $dirty[$key] = $value;
- }
- }
-
- return $dirty;
- }
-
- /**
- * Get the attributes that were changed.
- *
- * @return array
- */
- public function getChanges()
- {
- return $this->changes;
- }
-
- /**
- * Determine if the new and old values for a given key are equivalent.
- *
- * @param string $key
- * @param mixed $current
- * @return bool
- */
- protected function originalIsEquivalent($key, $current)
- {
- if (! array_key_exists($key, $this->original)) {
- return false;
- }
-
- $original = $this->getOriginal($key);
-
- if ($current === $original) {
- return true;
- } elseif (is_null($current)) {
- return false;
- } elseif ($this->isDateAttribute($key)) {
- return $this->fromDateTime($current) ===
- $this->fromDateTime($original);
- } elseif ($this->hasCast($key)) {
- return $this->castAttribute($key, $current) ===
- $this->castAttribute($key, $original);
- }
-
- return is_numeric($current) && is_numeric($original)
- && strcmp((string) $current, (string) $original) === 0;
- }
-
- /**
- * Append attributes to query when building a query.
- *
- * @param array|string $attributes
- * @return $this
- */
- public function append($attributes)
- {
- $this->appends = array_unique(
- array_merge($this->appends, is_string($attributes) ? func_get_args() : $attributes)
- );
-
- return $this;
- }
-
- /**
- * Set the accessors to append to model arrays.
- *
- * @param array $appends
- * @return $this
- */
- public function setAppends(array $appends)
- {
- $this->appends = $appends;
-
- return $this;
- }
-
- /**
- * Get the mutated attributes for a given instance.
- *
- * @return array
- */
- public function getMutatedAttributes()
- {
- $class = static::class;
-
- if (! isset(static::$mutatorCache[$class])) {
- static::cacheMutatedAttributes($class);
- }
-
- return static::$mutatorCache[$class];
- }
-
- /**
- * Extract and cache all the mutated attributes of a class.
- *
- * @param string $class
- * @return void
- */
- public static function cacheMutatedAttributes($class)
- {
- static::$mutatorCache[$class] = collect(static::getMutatorMethods($class))->map(function ($match) {
- return lcfirst(static::$snakeAttributes ? Str::snake($match) : $match);
- })->all();
- }
-
- /**
- * Get all of the attribute mutator methods.
- *
- * @param mixed $class
- * @return array
- */
- protected static function getMutatorMethods($class)
- {
- preg_match_all('/(?<=^|;)get([^;]+?)Attribute(;|$)/', implode(';', get_class_methods($class)), $matches);
-
- return $matches[1];
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php
deleted file mode 100644
index 720266d..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php
+++ /dev/null
@@ -1,354 +0,0 @@
-registerObserver($class);
- }
- }
-
- /**
- * Register a single observer with the model.
- *
- * @param object|string $class
- * @return void
- */
- protected function registerObserver($class)
- {
- $className = is_string($class) ? $class : get_class($class);
-
- // When registering a model observer, we will spin through the possible events
- // and determine if this observer has that method. If it does, we will hook
- // it into the model's event system, making it convenient to watch these.
- foreach ($this->getObservableEvents() as $event) {
- if (method_exists($class, $event)) {
- static::registerModelEvent($event, $className.'@'.$event);
- }
- }
- }
-
- /**
- * Get the observable event names.
- *
- * @return array
- */
- public function getObservableEvents()
- {
- return array_merge(
- [
- 'retrieved', 'creating', 'created', 'updating', 'updated',
- 'saving', 'saved', 'restoring', 'restored',
- 'deleting', 'deleted', 'forceDeleted',
- ],
- $this->observables
- );
- }
-
- /**
- * Set the observable event names.
- *
- * @param array $observables
- * @return $this
- */
- public function setObservableEvents(array $observables)
- {
- $this->observables = $observables;
-
- return $this;
- }
-
- /**
- * Add an observable event name.
- *
- * @param array|mixed $observables
- * @return void
- */
- public function addObservableEvents($observables)
- {
- $this->observables = array_unique(array_merge(
- $this->observables, is_array($observables) ? $observables : func_get_args()
- ));
- }
-
- /**
- * Remove an observable event name.
- *
- * @param array|mixed $observables
- * @return void
- */
- public function removeObservableEvents($observables)
- {
- $this->observables = array_diff(
- $this->observables, is_array($observables) ? $observables : func_get_args()
- );
- }
-
- /**
- * Register a model event with the dispatcher.
- *
- * @param string $event
- * @param \Closure|string $callback
- * @return void
- */
- protected static function registerModelEvent($event, $callback)
- {
- if (isset(static::$dispatcher)) {
- $name = static::class;
-
- static::$dispatcher->listen("eloquent.{$event}: {$name}", $callback);
- }
- }
-
- /**
- * Fire the given event for the model.
- *
- * @param string $event
- * @param bool $halt
- * @return mixed
- */
- protected function fireModelEvent($event, $halt = true)
- {
- if (! isset(static::$dispatcher)) {
- return true;
- }
-
- // First, we will get the proper method to call on the event dispatcher, and then we
- // will attempt to fire a custom, object based event for the given event. If that
- // returns a result we can return that result, or we'll call the string events.
- $method = $halt ? 'until' : 'dispatch';
-
- $result = $this->filterModelEventResults(
- $this->fireCustomModelEvent($event, $method)
- );
-
- if ($result === false) {
- return false;
- }
-
- return ! empty($result) ? $result : static::$dispatcher->{$method}(
- "eloquent.{$event}: ".static::class, $this
- );
- }
-
- /**
- * Fire a custom model event for the given event.
- *
- * @param string $event
- * @param string $method
- * @return mixed|null
- */
- protected function fireCustomModelEvent($event, $method)
- {
- if (! isset($this->dispatchesEvents[$event])) {
- return;
- }
-
- $result = static::$dispatcher->$method(new $this->dispatchesEvents[$event]($this));
-
- if (! is_null($result)) {
- return $result;
- }
- }
-
- /**
- * Filter the model event results.
- *
- * @param mixed $result
- * @return mixed
- */
- protected function filterModelEventResults($result)
- {
- if (is_array($result)) {
- $result = array_filter($result, function ($response) {
- return ! is_null($response);
- });
- }
-
- return $result;
- }
-
- /**
- * Register a retrieved model event with the dispatcher.
- *
- * @param \Closure|string $callback
- * @return void
- */
- public static function retrieved($callback)
- {
- static::registerModelEvent('retrieved', $callback);
- }
-
- /**
- * Register a saving model event with the dispatcher.
- *
- * @param \Closure|string $callback
- * @return void
- */
- public static function saving($callback)
- {
- static::registerModelEvent('saving', $callback);
- }
-
- /**
- * Register a saved model event with the dispatcher.
- *
- * @param \Closure|string $callback
- * @return void
- */
- public static function saved($callback)
- {
- static::registerModelEvent('saved', $callback);
- }
-
- /**
- * Register an updating model event with the dispatcher.
- *
- * @param \Closure|string $callback
- * @return void
- */
- public static function updating($callback)
- {
- static::registerModelEvent('updating', $callback);
- }
-
- /**
- * Register an updated model event with the dispatcher.
- *
- * @param \Closure|string $callback
- * @return void
- */
- public static function updated($callback)
- {
- static::registerModelEvent('updated', $callback);
- }
-
- /**
- * Register a creating model event with the dispatcher.
- *
- * @param \Closure|string $callback
- * @return void
- */
- public static function creating($callback)
- {
- static::registerModelEvent('creating', $callback);
- }
-
- /**
- * Register a created model event with the dispatcher.
- *
- * @param \Closure|string $callback
- * @return void
- */
- public static function created($callback)
- {
- static::registerModelEvent('created', $callback);
- }
-
- /**
- * Register a deleting model event with the dispatcher.
- *
- * @param \Closure|string $callback
- * @return void
- */
- public static function deleting($callback)
- {
- static::registerModelEvent('deleting', $callback);
- }
-
- /**
- * Register a deleted model event with the dispatcher.
- *
- * @param \Closure|string $callback
- * @return void
- */
- public static function deleted($callback)
- {
- static::registerModelEvent('deleted', $callback);
- }
-
- /**
- * Remove all of the event listeners for the model.
- *
- * @return void
- */
- public static function flushEventListeners()
- {
- if (! isset(static::$dispatcher)) {
- return;
- }
-
- $instance = new static;
-
- foreach ($instance->getObservableEvents() as $event) {
- static::$dispatcher->forget("eloquent.{$event}: ".static::class);
- }
-
- foreach (array_values($instance->dispatchesEvents) as $event) {
- static::$dispatcher->forget($event);
- }
- }
-
- /**
- * Get the event dispatcher instance.
- *
- * @return \Illuminate\Contracts\Events\Dispatcher
- */
- public static function getEventDispatcher()
- {
- return static::$dispatcher;
- }
-
- /**
- * Set the event dispatcher instance.
- *
- * @param \Illuminate\Contracts\Events\Dispatcher $dispatcher
- * @return void
- */
- public static function setEventDispatcher(Dispatcher $dispatcher)
- {
- static::$dispatcher = $dispatcher;
- }
-
- /**
- * Unset the event dispatcher for models.
- *
- * @return void
- */
- public static function unsetEventDispatcher()
- {
- static::$dispatcher = null;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasGlobalScopes.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasGlobalScopes.php
deleted file mode 100644
index 97a549f..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasGlobalScopes.php
+++ /dev/null
@@ -1,71 +0,0 @@
-newRelatedInstance($related);
-
- $foreignKey = $foreignKey ?: $this->getForeignKey();
-
- $localKey = $localKey ?: $this->getKeyName();
-
- return $this->newHasOne($instance->newQuery(), $this, $instance->getTable().'.'.$foreignKey, $localKey);
- }
-
- /**
- * Instantiate a new HasOne relationship.
- *
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @param \Illuminate\Database\Eloquent\Model $parent
- * @param string $foreignKey
- * @param string $localKey
- * @return \Illuminate\Database\Eloquent\Relations\HasOne
- */
- protected function newHasOne(Builder $query, Model $parent, $foreignKey, $localKey)
- {
- return new HasOne($query, $parent, $foreignKey, $localKey);
- }
-
- /**
- * Define a polymorphic one-to-one relationship.
- *
- * @param string $related
- * @param string $name
- * @param string $type
- * @param string $id
- * @param string $localKey
- * @return \Illuminate\Database\Eloquent\Relations\MorphOne
- */
- public function morphOne($related, $name, $type = null, $id = null, $localKey = null)
- {
- $instance = $this->newRelatedInstance($related);
-
- [$type, $id] = $this->getMorphs($name, $type, $id);
-
- $table = $instance->getTable();
-
- $localKey = $localKey ?: $this->getKeyName();
-
- return $this->newMorphOne($instance->newQuery(), $this, $table.'.'.$type, $table.'.'.$id, $localKey);
- }
-
- /**
- * Instantiate a new MorphOne relationship.
- *
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @param \Illuminate\Database\Eloquent\Model $parent
- * @param string $type
- * @param string $id
- * @param string $localKey
- * @return \Illuminate\Database\Eloquent\Relations\MorphOne
- */
- protected function newMorphOne(Builder $query, Model $parent, $type, $id, $localKey)
- {
- return new MorphOne($query, $parent, $type, $id, $localKey);
- }
-
- /**
- * Define an inverse one-to-one or many relationship.
- *
- * @param string $related
- * @param string $foreignKey
- * @param string $ownerKey
- * @param string $relation
- * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
- */
- public function belongsTo($related, $foreignKey = null, $ownerKey = null, $relation = null)
- {
- // If no relation name was given, we will use this debug backtrace to extract
- // the calling method's name and use that as the relationship name as most
- // of the time this will be what we desire to use for the relationships.
- if (is_null($relation)) {
- $relation = $this->guessBelongsToRelation();
- }
-
- $instance = $this->newRelatedInstance($related);
-
- // If no foreign key was supplied, we can use a backtrace to guess the proper
- // foreign key name by using the name of the relationship function, which
- // when combined with an "_id" should conventionally match the columns.
- if (is_null($foreignKey)) {
- $foreignKey = Str::snake($relation).'_'.$instance->getKeyName();
- }
-
- // Once we have the foreign key names, we'll just create a new Eloquent query
- // for the related models and returns the relationship instance which will
- // actually be responsible for retrieving and hydrating every relations.
- $ownerKey = $ownerKey ?: $instance->getKeyName();
-
- return $this->newBelongsTo(
- $instance->newQuery(), $this, $foreignKey, $ownerKey, $relation
- );
- }
-
- /**
- * Instantiate a new BelongsTo relationship.
- *
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @param \Illuminate\Database\Eloquent\Model $child
- * @param string $foreignKey
- * @param string $ownerKey
- * @param string $relation
- * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
- */
- protected function newBelongsTo(Builder $query, Model $child, $foreignKey, $ownerKey, $relation)
- {
- return new BelongsTo($query, $child, $foreignKey, $ownerKey, $relation);
- }
-
- /**
- * Define a polymorphic, inverse one-to-one or many relationship.
- *
- * @param string $name
- * @param string $type
- * @param string $id
- * @param string $ownerKey
- * @return \Illuminate\Database\Eloquent\Relations\MorphTo
- */
- public function morphTo($name = null, $type = null, $id = null, $ownerKey = null)
- {
- // If no name is provided, we will use the backtrace to get the function name
- // since that is most likely the name of the polymorphic interface. We can
- // use that to get both the class and foreign key that will be utilized.
- $name = $name ?: $this->guessBelongsToRelation();
-
- [$type, $id] = $this->getMorphs(
- Str::snake($name), $type, $id
- );
-
- // If the type value is null it is probably safe to assume we're eager loading
- // the relationship. In this case we'll just pass in a dummy query where we
- // need to remove any eager loads that may already be defined on a model.
- return empty($class = $this->{$type})
- ? $this->morphEagerTo($name, $type, $id, $ownerKey)
- : $this->morphInstanceTo($class, $name, $type, $id, $ownerKey);
- }
-
- /**
- * Define a polymorphic, inverse one-to-one or many relationship.
- *
- * @param string $name
- * @param string $type
- * @param string $id
- * @param string $ownerKey
- * @return \Illuminate\Database\Eloquent\Relations\MorphTo
- */
- protected function morphEagerTo($name, $type, $id, $ownerKey)
- {
- return $this->newMorphTo(
- $this->newQuery()->setEagerLoads([]), $this, $id, $ownerKey, $type, $name
- );
- }
-
- /**
- * Define a polymorphic, inverse one-to-one or many relationship.
- *
- * @param string $target
- * @param string $name
- * @param string $type
- * @param string $id
- * @param string $ownerKey
- * @return \Illuminate\Database\Eloquent\Relations\MorphTo
- */
- protected function morphInstanceTo($target, $name, $type, $id, $ownerKey)
- {
- $instance = $this->newRelatedInstance(
- static::getActualClassNameForMorph($target)
- );
-
- return $this->newMorphTo(
- $instance->newQuery(), $this, $id, $ownerKey ?? $instance->getKeyName(), $type, $name
- );
- }
-
- /**
- * Instantiate a new MorphTo relationship.
- *
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @param \Illuminate\Database\Eloquent\Model $parent
- * @param string $foreignKey
- * @param string $ownerKey
- * @param string $type
- * @param string $relation
- * @return \Illuminate\Database\Eloquent\Relations\MorphTo
- */
- protected function newMorphTo(Builder $query, Model $parent, $foreignKey, $ownerKey, $type, $relation)
- {
- return new MorphTo($query, $parent, $foreignKey, $ownerKey, $type, $relation);
- }
-
- /**
- * Retrieve the actual class name for a given morph class.
- *
- * @param string $class
- * @return string
- */
- public static function getActualClassNameForMorph($class)
- {
- return Arr::get(Relation::morphMap() ?: [], $class, $class);
- }
-
- /**
- * Guess the "belongs to" relationship name.
- *
- * @return string
- */
- protected function guessBelongsToRelation()
- {
- [$one, $two, $caller] = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3);
-
- return $caller['function'];
- }
-
- /**
- * Define a one-to-many relationship.
- *
- * @param string $related
- * @param string $foreignKey
- * @param string $localKey
- * @return \Illuminate\Database\Eloquent\Relations\HasMany
- */
- public function hasMany($related, $foreignKey = null, $localKey = null)
- {
- $instance = $this->newRelatedInstance($related);
-
- $foreignKey = $foreignKey ?: $this->getForeignKey();
-
- $localKey = $localKey ?: $this->getKeyName();
-
- return $this->newHasMany(
- $instance->newQuery(), $this, $instance->getTable().'.'.$foreignKey, $localKey
- );
- }
-
- /**
- * Instantiate a new HasMany relationship.
- *
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @param \Illuminate\Database\Eloquent\Model $parent
- * @param string $foreignKey
- * @param string $localKey
- * @return \Illuminate\Database\Eloquent\Relations\HasMany
- */
- protected function newHasMany(Builder $query, Model $parent, $foreignKey, $localKey)
- {
- return new HasMany($query, $parent, $foreignKey, $localKey);
- }
-
- /**
- * Define a has-many-through relationship.
- *
- * @param string $related
- * @param string $through
- * @param string|null $firstKey
- * @param string|null $secondKey
- * @param string|null $localKey
- * @param string|null $secondLocalKey
- * @return \Illuminate\Database\Eloquent\Relations\HasManyThrough
- */
- public function hasManyThrough($related, $through, $firstKey = null, $secondKey = null, $localKey = null, $secondLocalKey = null)
- {
- $through = new $through;
-
- $firstKey = $firstKey ?: $this->getForeignKey();
-
- $secondKey = $secondKey ?: $through->getForeignKey();
-
- return $this->newHasManyThrough(
- $this->newRelatedInstance($related)->newQuery(), $this, $through,
- $firstKey, $secondKey, $localKey ?: $this->getKeyName(),
- $secondLocalKey ?: $through->getKeyName()
- );
- }
-
- /**
- * Instantiate a new HasManyThrough relationship.
- *
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @param \Illuminate\Database\Eloquent\Model $farParent
- * @param \Illuminate\Database\Eloquent\Model $throughParent
- * @param string $firstKey
- * @param string $secondKey
- * @param string $localKey
- * @param string $secondLocalKey
- * @return \Illuminate\Database\Eloquent\Relations\HasManyThrough
- */
- protected function newHasManyThrough(Builder $query, Model $farParent, Model $throughParent, $firstKey, $secondKey, $localKey, $secondLocalKey)
- {
- return new HasManyThrough($query, $farParent, $throughParent, $firstKey, $secondKey, $localKey, $secondLocalKey);
- }
-
- /**
- * Define a polymorphic one-to-many relationship.
- *
- * @param string $related
- * @param string $name
- * @param string $type
- * @param string $id
- * @param string $localKey
- * @return \Illuminate\Database\Eloquent\Relations\MorphMany
- */
- public function morphMany($related, $name, $type = null, $id = null, $localKey = null)
- {
- $instance = $this->newRelatedInstance($related);
-
- // Here we will gather up the morph type and ID for the relationship so that we
- // can properly query the intermediate table of a relation. Finally, we will
- // get the table and create the relationship instances for the developers.
- [$type, $id] = $this->getMorphs($name, $type, $id);
-
- $table = $instance->getTable();
-
- $localKey = $localKey ?: $this->getKeyName();
-
- return $this->newMorphMany($instance->newQuery(), $this, $table.'.'.$type, $table.'.'.$id, $localKey);
- }
-
- /**
- * Instantiate a new MorphMany relationship.
- *
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @param \Illuminate\Database\Eloquent\Model $parent
- * @param string $type
- * @param string $id
- * @param string $localKey
- * @return \Illuminate\Database\Eloquent\Relations\MorphMany
- */
- protected function newMorphMany(Builder $query, Model $parent, $type, $id, $localKey)
- {
- return new MorphMany($query, $parent, $type, $id, $localKey);
- }
-
- /**
- * Define a many-to-many relationship.
- *
- * @param string $related
- * @param string $table
- * @param string $foreignPivotKey
- * @param string $relatedPivotKey
- * @param string $parentKey
- * @param string $relatedKey
- * @param string $relation
- * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
- */
- public function belongsToMany($related, $table = null, $foreignPivotKey = null, $relatedPivotKey = null,
- $parentKey = null, $relatedKey = null, $relation = null)
- {
- // If no relationship name was passed, we will pull backtraces to get the
- // name of the calling function. We will use that function name as the
- // title of this relation since that is a great convention to apply.
- if (is_null($relation)) {
- $relation = $this->guessBelongsToManyRelation();
- }
-
- // First, we'll need to determine the foreign key and "other key" for the
- // relationship. Once we have determined the keys we'll make the query
- // instances as well as the relationship instances we need for this.
- $instance = $this->newRelatedInstance($related);
-
- $foreignPivotKey = $foreignPivotKey ?: $this->getForeignKey();
-
- $relatedPivotKey = $relatedPivotKey ?: $instance->getForeignKey();
-
- // If no table name was provided, we can guess it by concatenating the two
- // models using underscores in alphabetical order. The two model names
- // are transformed to snake case from their default CamelCase also.
- if (is_null($table)) {
- $table = $this->joiningTable($related, $instance);
- }
-
- return $this->newBelongsToMany(
- $instance->newQuery(), $this, $table, $foreignPivotKey,
- $relatedPivotKey, $parentKey ?: $this->getKeyName(),
- $relatedKey ?: $instance->getKeyName(), $relation
- );
- }
-
- /**
- * Instantiate a new BelongsToMany relationship.
- *
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @param \Illuminate\Database\Eloquent\Model $parent
- * @param string $table
- * @param string $foreignPivotKey
- * @param string $relatedPivotKey
- * @param string $parentKey
- * @param string $relatedKey
- * @param string $relationName
- * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
- */
- protected function newBelongsToMany(Builder $query, Model $parent, $table, $foreignPivotKey, $relatedPivotKey,
- $parentKey, $relatedKey, $relationName = null)
- {
- return new BelongsToMany($query, $parent, $table, $foreignPivotKey, $relatedPivotKey, $parentKey, $relatedKey, $relationName);
- }
-
- /**
- * Define a polymorphic many-to-many relationship.
- *
- * @param string $related
- * @param string $name
- * @param string $table
- * @param string $foreignPivotKey
- * @param string $relatedPivotKey
- * @param string $parentKey
- * @param string $relatedKey
- * @param bool $inverse
- * @return \Illuminate\Database\Eloquent\Relations\MorphToMany
- */
- public function morphToMany($related, $name, $table = null, $foreignPivotKey = null,
- $relatedPivotKey = null, $parentKey = null,
- $relatedKey = null, $inverse = false)
- {
- $caller = $this->guessBelongsToManyRelation();
-
- // First, we will need to determine the foreign key and "other key" for the
- // relationship. Once we have determined the keys we will make the query
- // instances, as well as the relationship instances we need for these.
- $instance = $this->newRelatedInstance($related);
-
- $foreignPivotKey = $foreignPivotKey ?: $name.'_id';
-
- $relatedPivotKey = $relatedPivotKey ?: $instance->getForeignKey();
-
- // Now we're ready to create a new query builder for this related model and
- // the relationship instances for this relation. This relations will set
- // appropriate query constraints then entirely manages the hydrations.
- $table = $table ?: Str::plural($name);
-
- return $this->newMorphToMany(
- $instance->newQuery(), $this, $name, $table,
- $foreignPivotKey, $relatedPivotKey, $parentKey ?: $this->getKeyName(),
- $relatedKey ?: $instance->getKeyName(), $caller, $inverse
- );
- }
-
- /**
- * Instantiate a new MorphToMany relationship.
- *
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @param \Illuminate\Database\Eloquent\Model $parent
- * @param string $name
- * @param string $table
- * @param string $foreignPivotKey
- * @param string $relatedPivotKey
- * @param string $parentKey
- * @param string $relatedKey
- * @param string $relationName
- * @param bool $inverse
- * @return \Illuminate\Database\Eloquent\Relations\MorphToMany
- */
- protected function newMorphToMany(Builder $query, Model $parent, $name, $table, $foreignPivotKey,
- $relatedPivotKey, $parentKey, $relatedKey,
- $relationName = null, $inverse = false)
- {
- return new MorphToMany($query, $parent, $name, $table, $foreignPivotKey, $relatedPivotKey, $parentKey, $relatedKey,
- $relationName, $inverse);
- }
-
- /**
- * Define a polymorphic, inverse many-to-many relationship.
- *
- * @param string $related
- * @param string $name
- * @param string $table
- * @param string $foreignPivotKey
- * @param string $relatedPivotKey
- * @param string $parentKey
- * @param string $relatedKey
- * @return \Illuminate\Database\Eloquent\Relations\MorphToMany
- */
- public function morphedByMany($related, $name, $table = null, $foreignPivotKey = null,
- $relatedPivotKey = null, $parentKey = null, $relatedKey = null)
- {
- $foreignPivotKey = $foreignPivotKey ?: $this->getForeignKey();
-
- // For the inverse of the polymorphic many-to-many relations, we will change
- // the way we determine the foreign and other keys, as it is the opposite
- // of the morph-to-many method since we're figuring out these inverses.
- $relatedPivotKey = $relatedPivotKey ?: $name.'_id';
-
- return $this->morphToMany(
- $related, $name, $table, $foreignPivotKey,
- $relatedPivotKey, $parentKey, $relatedKey, true
- );
- }
-
- /**
- * Get the relationship name of the belongsToMany relationship.
- *
- * @return string|null
- */
- protected function guessBelongsToManyRelation()
- {
- $caller = Arr::first(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS), function ($trace) {
- return ! in_array(
- $trace['function'],
- array_merge(static::$manyMethods, ['guessBelongsToManyRelation'])
- );
- });
-
- return ! is_null($caller) ? $caller['function'] : null;
- }
-
- /**
- * Get the joining table name for a many-to-many relation.
- *
- * @param string $related
- * @param \Illuminate\Database\Eloquent\Model|null $instance
- * @return string
- */
- public function joiningTable($related, $instance = null)
- {
- // The joining table name, by convention, is simply the snake cased models
- // sorted alphabetically and concatenated with an underscore, so we can
- // just sort the models and join them together to get the table name.
- $segments = [
- $instance ? $instance->joiningTableSegment()
- : Str::snake(class_basename($related)),
- $this->joiningTableSegment(),
- ];
-
- // Now that we have the model names in an array we can just sort them and
- // use the implode function to join them together with an underscores,
- // which is typically used by convention within the database system.
- sort($segments);
-
- return strtolower(implode('_', $segments));
- }
-
- /**
- * Get this model's half of the intermediate table name for belongsToMany relationships.
- *
- * @return string
- */
- public function joiningTableSegment()
- {
- return Str::snake(class_basename($this));
- }
-
- /**
- * Determine if the model touches a given relation.
- *
- * @param string $relation
- * @return bool
- */
- public function touches($relation)
- {
- return in_array($relation, $this->touches);
- }
-
- /**
- * Touch the owning relations of the model.
- *
- * @return void
- */
- public function touchOwners()
- {
- foreach ($this->touches as $relation) {
- $this->$relation()->touch();
-
- if ($this->$relation instanceof self) {
- $this->$relation->fireModelEvent('saved', false);
-
- $this->$relation->touchOwners();
- } elseif ($this->$relation instanceof Collection) {
- $this->$relation->each(function (Model $relation) {
- $relation->touchOwners();
- });
- }
- }
- }
-
- /**
- * Get the polymorphic relationship columns.
- *
- * @param string $name
- * @param string $type
- * @param string $id
- * @return array
- */
- protected function getMorphs($name, $type, $id)
- {
- return [$type ?: $name.'_type', $id ?: $name.'_id'];
- }
-
- /**
- * Get the class name for polymorphic relations.
- *
- * @return string
- */
- public function getMorphClass()
- {
- $morphMap = Relation::morphMap();
-
- if (! empty($morphMap) && in_array(static::class, $morphMap)) {
- return array_search(static::class, $morphMap, true);
- }
-
- return static::class;
- }
-
- /**
- * Create a new model instance for a related model.
- *
- * @param string $class
- * @return mixed
- */
- protected function newRelatedInstance($class)
- {
- return tap(new $class, function ($instance) {
- if (! $instance->getConnectionName()) {
- $instance->setConnection($this->connection);
- }
- });
- }
-
- /**
- * Get all the loaded relations for the instance.
- *
- * @return array
- */
- public function getRelations()
- {
- return $this->relations;
- }
-
- /**
- * Get a specified relationship.
- *
- * @param string $relation
- * @return mixed
- */
- public function getRelation($relation)
- {
- return $this->relations[$relation];
- }
-
- /**
- * Determine if the given relation is loaded.
- *
- * @param string $key
- * @return bool
- */
- public function relationLoaded($key)
- {
- return array_key_exists($key, $this->relations);
- }
-
- /**
- * Set the given relationship on the model.
- *
- * @param string $relation
- * @param mixed $value
- * @return $this
- */
- public function setRelation($relation, $value)
- {
- $this->relations[$relation] = $value;
-
- return $this;
- }
-
- /**
- * Unset a loaded relationship.
- *
- * @param string $relation
- * @return $this
- */
- public function unsetRelation($relation)
- {
- unset($this->relations[$relation]);
-
- return $this;
- }
-
- /**
- * Set the entire relations array on the model.
- *
- * @param array $relations
- * @return $this
- */
- public function setRelations(array $relations)
- {
- $this->relations = $relations;
-
- return $this;
- }
-
- /**
- * Get the relationships that are touched on save.
- *
- * @return array
- */
- public function getTouchedRelations()
- {
- return $this->touches;
- }
-
- /**
- * Set the relationships that are touched on save.
- *
- * @param array $touches
- * @return $this
- */
- public function setTouchedRelations(array $touches)
- {
- $this->touches = $touches;
-
- return $this;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasTimestamps.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasTimestamps.php
deleted file mode 100644
index 8e3d488..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasTimestamps.php
+++ /dev/null
@@ -1,126 +0,0 @@
-usesTimestamps()) {
- return false;
- }
-
- $this->updateTimestamps();
-
- return $this->save();
- }
-
- /**
- * Update the creation and update timestamps.
- *
- * @return void
- */
- protected function updateTimestamps()
- {
- $time = $this->freshTimestamp();
-
- if (! is_null(static::UPDATED_AT) && ! $this->isDirty(static::UPDATED_AT)) {
- $this->setUpdatedAt($time);
- }
-
- if (! $this->exists && ! is_null(static::CREATED_AT) &&
- ! $this->isDirty(static::CREATED_AT)) {
- $this->setCreatedAt($time);
- }
- }
-
- /**
- * Set the value of the "created at" attribute.
- *
- * @param mixed $value
- * @return $this
- */
- public function setCreatedAt($value)
- {
- $this->{static::CREATED_AT} = $value;
-
- return $this;
- }
-
- /**
- * Set the value of the "updated at" attribute.
- *
- * @param mixed $value
- * @return $this
- */
- public function setUpdatedAt($value)
- {
- $this->{static::UPDATED_AT} = $value;
-
- return $this;
- }
-
- /**
- * Get a fresh timestamp for the model.
- *
- * @return \Illuminate\Support\Carbon
- */
- public function freshTimestamp()
- {
- return new Carbon;
- }
-
- /**
- * Get a fresh timestamp for the model.
- *
- * @return string
- */
- public function freshTimestampString()
- {
- return $this->fromDateTime($this->freshTimestamp());
- }
-
- /**
- * Determine if the model uses timestamps.
- *
- * @return bool
- */
- public function usesTimestamps()
- {
- return $this->timestamps;
- }
-
- /**
- * Get the name of the "created at" column.
- *
- * @return string
- */
- public function getCreatedAtColumn()
- {
- return static::CREATED_AT;
- }
-
- /**
- * Get the name of the "updated at" column.
- *
- * @return string
- */
- public function getUpdatedAtColumn()
- {
- return static::UPDATED_AT;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HidesAttributes.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HidesAttributes.php
deleted file mode 100644
index 7bd9ef9..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HidesAttributes.php
+++ /dev/null
@@ -1,126 +0,0 @@
-hidden;
- }
-
- /**
- * Set the hidden attributes for the model.
- *
- * @param array $hidden
- * @return $this
- */
- public function setHidden(array $hidden)
- {
- $this->hidden = $hidden;
-
- return $this;
- }
-
- /**
- * Add hidden attributes for the model.
- *
- * @param array|string|null $attributes
- * @return void
- */
- public function addHidden($attributes = null)
- {
- $this->hidden = array_merge(
- $this->hidden, is_array($attributes) ? $attributes : func_get_args()
- );
- }
-
- /**
- * Get the visible attributes for the model.
- *
- * @return array
- */
- public function getVisible()
- {
- return $this->visible;
- }
-
- /**
- * Set the visible attributes for the model.
- *
- * @param array $visible
- * @return $this
- */
- public function setVisible(array $visible)
- {
- $this->visible = $visible;
-
- return $this;
- }
-
- /**
- * Add visible attributes for the model.
- *
- * @param array|string|null $attributes
- * @return void
- */
- public function addVisible($attributes = null)
- {
- $this->visible = array_merge(
- $this->visible, is_array($attributes) ? $attributes : func_get_args()
- );
- }
-
- /**
- * Make the given, typically hidden, attributes visible.
- *
- * @param array|string $attributes
- * @return $this
- */
- public function makeVisible($attributes)
- {
- $this->hidden = array_diff($this->hidden, (array) $attributes);
-
- if (! empty($this->visible)) {
- $this->addVisible($attributes);
- }
-
- return $this;
- }
-
- /**
- * Make the given, typically visible, attributes hidden.
- *
- * @param array|string $attributes
- * @return $this
- */
- public function makeHidden($attributes)
- {
- $attributes = (array) $attributes;
-
- $this->visible = array_diff($this->visible, $attributes);
-
- $this->hidden = array_unique(array_merge($this->hidden, $attributes));
-
- return $this;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php
deleted file mode 100644
index be14321..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php
+++ /dev/null
@@ -1,327 +0,0 @@
-=', $count = 1, $boolean = 'and', Closure $callback = null)
- {
- if (strpos($relation, '.') !== false) {
- return $this->hasNested($relation, $operator, $count, $boolean, $callback);
- }
-
- $relation = $this->getRelationWithoutConstraints($relation);
-
- if ($relation instanceof MorphTo) {
- throw new RuntimeException('has() and whereHas() do not support MorphTo relationships.');
- }
-
- // If we only need to check for the existence of the relation, then we can optimize
- // the subquery to only run a "where exists" clause instead of this full "count"
- // clause. This will make these queries run much faster compared with a count.
- $method = $this->canUseExistsForExistenceCheck($operator, $count)
- ? 'getRelationExistenceQuery'
- : 'getRelationExistenceCountQuery';
-
- $hasQuery = $relation->{$method}(
- $relation->getRelated()->newQueryWithoutRelationships(), $this
- );
-
- // Next we will call any given callback as an "anonymous" scope so they can get the
- // proper logical grouping of the where clauses if needed by this Eloquent query
- // builder. Then, we will be ready to finalize and return this query instance.
- if ($callback) {
- $hasQuery->callScope($callback);
- }
-
- return $this->addHasWhere(
- $hasQuery, $relation, $operator, $count, $boolean
- );
- }
-
- /**
- * Add nested relationship count / exists conditions to the query.
- *
- * Sets up recursive call to whereHas until we finish the nested relation.
- *
- * @param string $relations
- * @param string $operator
- * @param int $count
- * @param string $boolean
- * @param \Closure|null $callback
- * @return \Illuminate\Database\Eloquent\Builder|static
- */
- protected function hasNested($relations, $operator = '>=', $count = 1, $boolean = 'and', $callback = null)
- {
- $relations = explode('.', $relations);
-
- $doesntHave = $operator === '<' && $count === 1;
-
- if ($doesntHave) {
- $operator = '>=';
- $count = 1;
- }
-
- $closure = function ($q) use (&$closure, &$relations, $operator, $count, $callback) {
- // In order to nest "has", we need to add count relation constraints on the
- // callback Closure. We'll do this by simply passing the Closure its own
- // reference to itself so it calls itself recursively on each segment.
- count($relations) > 1
- ? $q->whereHas(array_shift($relations), $closure)
- : $q->has(array_shift($relations), $operator, $count, 'and', $callback);
- };
-
- return $this->has(array_shift($relations), $doesntHave ? '<' : '>=', 1, $boolean, $closure);
- }
-
- /**
- * Add a relationship count / exists condition to the query with an "or".
- *
- * @param string $relation
- * @param string $operator
- * @param int $count
- * @return \Illuminate\Database\Eloquent\Builder|static
- */
- public function orHas($relation, $operator = '>=', $count = 1)
- {
- return $this->has($relation, $operator, $count, 'or');
- }
-
- /**
- * Add a relationship count / exists condition to the query.
- *
- * @param string $relation
- * @param string $boolean
- * @param \Closure|null $callback
- * @return \Illuminate\Database\Eloquent\Builder|static
- */
- public function doesntHave($relation, $boolean = 'and', Closure $callback = null)
- {
- return $this->has($relation, '<', 1, $boolean, $callback);
- }
-
- /**
- * Add a relationship count / exists condition to the query with an "or".
- *
- * @param string $relation
- * @return \Illuminate\Database\Eloquent\Builder|static
- */
- public function orDoesntHave($relation)
- {
- return $this->doesntHave($relation, 'or');
- }
-
- /**
- * Add a relationship count / exists condition to the query with where clauses.
- *
- * @param string $relation
- * @param \Closure|null $callback
- * @param string $operator
- * @param int $count
- * @return \Illuminate\Database\Eloquent\Builder|static
- */
- public function whereHas($relation, Closure $callback = null, $operator = '>=', $count = 1)
- {
- return $this->has($relation, $operator, $count, 'and', $callback);
- }
-
- /**
- * Add a relationship count / exists condition to the query with where clauses and an "or".
- *
- * @param string $relation
- * @param \Closure $callback
- * @param string $operator
- * @param int $count
- * @return \Illuminate\Database\Eloquent\Builder|static
- */
- public function orWhereHas($relation, Closure $callback = null, $operator = '>=', $count = 1)
- {
- return $this->has($relation, $operator, $count, 'or', $callback);
- }
-
- /**
- * Add a relationship count / exists condition to the query with where clauses.
- *
- * @param string $relation
- * @param \Closure|null $callback
- * @return \Illuminate\Database\Eloquent\Builder|static
- */
- public function whereDoesntHave($relation, Closure $callback = null)
- {
- return $this->doesntHave($relation, 'and', $callback);
- }
-
- /**
- * Add a relationship count / exists condition to the query with where clauses and an "or".
- *
- * @param string $relation
- * @param \Closure $callback
- * @return \Illuminate\Database\Eloquent\Builder|static
- */
- public function orWhereDoesntHave($relation, Closure $callback = null)
- {
- return $this->doesntHave($relation, 'or', $callback);
- }
-
- /**
- * Add subselect queries to count the relations.
- *
- * @param mixed $relations
- * @return $this
- */
- public function withCount($relations)
- {
- if (empty($relations)) {
- return $this;
- }
-
- if (is_null($this->query->columns)) {
- $this->query->select([$this->query->from.'.*']);
- }
-
- $relations = is_array($relations) ? $relations : func_get_args();
-
- foreach ($this->parseWithRelations($relations) as $name => $constraints) {
- // First we will determine if the name has been aliased using an "as" clause on the name
- // and if it has we will extract the actual relationship name and the desired name of
- // the resulting column. This allows multiple counts on the same relationship name.
- $segments = explode(' ', $name);
-
- unset($alias);
-
- if (count($segments) === 3 && Str::lower($segments[1]) === 'as') {
- [$name, $alias] = [$segments[0], $segments[2]];
- }
-
- $relation = $this->getRelationWithoutConstraints($name);
-
- // Here we will get the relationship count query and prepare to add it to the main query
- // as a sub-select. First, we'll get the "has" query and use that to get the relation
- // count query. We will normalize the relation name then append _count as the name.
- $query = $relation->getRelationExistenceCountQuery(
- $relation->getRelated()->newQuery(), $this
- );
-
- $query->callScope($constraints);
-
- $query = $query->mergeConstraintsFrom($relation->getQuery())->toBase();
-
- if (count($query->columns) > 1) {
- $query->columns = [$query->columns[0]];
- }
-
- // Finally we will add the proper result column alias to the query and run the subselect
- // statement against the query builder. Then we will return the builder instance back
- // to the developer for further constraint chaining that needs to take place on it.
- $column = $alias ?? Str::snake($name.'_count');
-
- $this->selectSub($query, $column);
- }
-
- return $this;
- }
-
- /**
- * Add the "has" condition where clause to the query.
- *
- * @param \Illuminate\Database\Eloquent\Builder $hasQuery
- * @param \Illuminate\Database\Eloquent\Relations\Relation $relation
- * @param string $operator
- * @param int $count
- * @param string $boolean
- * @return \Illuminate\Database\Eloquent\Builder|static
- */
- protected function addHasWhere(Builder $hasQuery, Relation $relation, $operator, $count, $boolean)
- {
- $hasQuery->mergeConstraintsFrom($relation->getQuery());
-
- return $this->canUseExistsForExistenceCheck($operator, $count)
- ? $this->addWhereExistsQuery($hasQuery->toBase(), $boolean, $operator === '<' && $count === 1)
- : $this->addWhereCountQuery($hasQuery->toBase(), $operator, $count, $boolean);
- }
-
- /**
- * Merge the where constraints from another query to the current query.
- *
- * @param \Illuminate\Database\Eloquent\Builder $from
- * @return \Illuminate\Database\Eloquent\Builder|static
- */
- public function mergeConstraintsFrom(Builder $from)
- {
- $whereBindings = $from->getQuery()->getRawBindings()['where'] ?? [];
-
- // Here we have some other query that we want to merge the where constraints from. We will
- // copy over any where constraints on the query as well as remove any global scopes the
- // query might have removed. Then we will return ourselves with the finished merging.
- return $this->withoutGlobalScopes(
- $from->removedScopes()
- )->mergeWheres(
- $from->getQuery()->wheres, $whereBindings
- );
- }
-
- /**
- * Add a sub-query count clause to this query.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param string $operator
- * @param int $count
- * @param string $boolean
- * @return $this
- */
- protected function addWhereCountQuery(QueryBuilder $query, $operator = '>=', $count = 1, $boolean = 'and')
- {
- $this->query->addBinding($query->getBindings(), 'where');
-
- return $this->where(
- new Expression('('.$query->toSql().')'),
- $operator,
- is_numeric($count) ? new Expression($count) : $count,
- $boolean
- );
- }
-
- /**
- * Get the "has relation" base query instance.
- *
- * @param string $relation
- * @return \Illuminate\Database\Eloquent\Relations\Relation
- */
- protected function getRelationWithoutConstraints($relation)
- {
- return Relation::noConstraints(function () use ($relation) {
- return $this->getModel()->{$relation}();
- });
- }
-
- /**
- * Check if we can run an "exists" query to optimize performance.
- *
- * @param string $operator
- * @param int $count
- * @return bool
- */
- protected function canUseExistsForExistenceCheck($operator, $count)
- {
- return ($operator === '>=' || $operator === '<') && $count === 1;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factory.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factory.php
deleted file mode 100644
index 82917ae..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factory.php
+++ /dev/null
@@ -1,326 +0,0 @@
-faker = $faker;
- }
-
- /**
- * Create a new factory container.
- *
- * @param \Faker\Generator $faker
- * @param string|null $pathToFactories
- * @return static
- */
- public static function construct(Faker $faker, $pathToFactories = null)
- {
- $pathToFactories = $pathToFactories ?: database_path('factories');
-
- return (new static($faker))->load($pathToFactories);
- }
-
- /**
- * Define a class with a given short-name.
- *
- * @param string $class
- * @param string $name
- * @param callable $attributes
- * @return $this
- */
- public function defineAs($class, $name, callable $attributes)
- {
- return $this->define($class, $attributes, $name);
- }
-
- /**
- * Define a class with a given set of attributes.
- *
- * @param string $class
- * @param callable $attributes
- * @param string $name
- * @return $this
- */
- public function define($class, callable $attributes, $name = 'default')
- {
- $this->definitions[$class][$name] = $attributes;
-
- return $this;
- }
-
- /**
- * Define a state with a given set of attributes.
- *
- * @param string $class
- * @param string $state
- * @param callable|array $attributes
- * @return $this
- */
- public function state($class, $state, $attributes)
- {
- $this->states[$class][$state] = $attributes;
-
- return $this;
- }
-
- /**
- * Define a callback to run after making a model.
- *
- * @param string $class
- * @param callable $callback
- * @param string $name
- * @return $this
- */
- public function afterMaking($class, callable $callback, $name = 'default')
- {
- $this->afterMaking[$class][$name][] = $callback;
-
- return $this;
- }
-
- /**
- * Define a callback to run after making a model with given state.
- *
- * @param string $class
- * @param string $state
- * @param callable $callback
- * @return $this
- */
- public function afterMakingState($class, $state, callable $callback)
- {
- return $this->afterMaking($class, $callback, $state);
- }
-
- /**
- * Define a callback to run after creating a model.
- *
- * @param string $class
- * @param callable $callback
- * @param string $name
- * @return $this
- */
- public function afterCreating($class, callable $callback, $name = 'default')
- {
- $this->afterCreating[$class][$name][] = $callback;
-
- return $this;
- }
-
- /**
- * Define a callback to run after creating a model with given state.
- *
- * @param string $class
- * @param string $state
- * @param callable $callback
- * @return $this
- */
- public function afterCreatingState($class, $state, callable $callback)
- {
- return $this->afterCreating($class, $callback, $state);
- }
-
- /**
- * Create an instance of the given model and persist it to the database.
- *
- * @param string $class
- * @param array $attributes
- * @return mixed
- */
- public function create($class, array $attributes = [])
- {
- return $this->of($class)->create($attributes);
- }
-
- /**
- * Create an instance of the given model and type and persist it to the database.
- *
- * @param string $class
- * @param string $name
- * @param array $attributes
- * @return mixed
- */
- public function createAs($class, $name, array $attributes = [])
- {
- return $this->of($class, $name)->create($attributes);
- }
-
- /**
- * Create an instance of the given model.
- *
- * @param string $class
- * @param array $attributes
- * @return mixed
- */
- public function make($class, array $attributes = [])
- {
- return $this->of($class)->make($attributes);
- }
-
- /**
- * Create an instance of the given model and type.
- *
- * @param string $class
- * @param string $name
- * @param array $attributes
- * @return mixed
- */
- public function makeAs($class, $name, array $attributes = [])
- {
- return $this->of($class, $name)->make($attributes);
- }
-
- /**
- * Get the raw attribute array for a given named model.
- *
- * @param string $class
- * @param string $name
- * @param array $attributes
- * @return array
- */
- public function rawOf($class, $name, array $attributes = [])
- {
- return $this->raw($class, $attributes, $name);
- }
-
- /**
- * Get the raw attribute array for a given model.
- *
- * @param string $class
- * @param array $attributes
- * @param string $name
- * @return array
- */
- public function raw($class, array $attributes = [], $name = 'default')
- {
- return array_merge(
- call_user_func($this->definitions[$class][$name], $this->faker), $attributes
- );
- }
-
- /**
- * Create a builder for the given model.
- *
- * @param string $class
- * @param string $name
- * @return \Illuminate\Database\Eloquent\FactoryBuilder
- */
- public function of($class, $name = 'default')
- {
- return new FactoryBuilder(
- $class, $name, $this->definitions, $this->states,
- $this->afterMaking, $this->afterCreating, $this->faker
- );
- }
-
- /**
- * Load factories from path.
- *
- * @param string $path
- * @return $this
- */
- public function load($path)
- {
- $factory = $this;
-
- if (is_dir($path)) {
- foreach (Finder::create()->files()->name('*.php')->in($path) as $file) {
- require $file->getRealPath();
- }
- }
-
- return $factory;
- }
-
- /**
- * Determine if the given offset exists.
- *
- * @param string $offset
- * @return bool
- */
- public function offsetExists($offset)
- {
- return isset($this->definitions[$offset]);
- }
-
- /**
- * Get the value of the given offset.
- *
- * @param string $offset
- * @return mixed
- */
- public function offsetGet($offset)
- {
- return $this->make($offset);
- }
-
- /**
- * Set the given offset to the given value.
- *
- * @param string $offset
- * @param callable $value
- * @return void
- */
- public function offsetSet($offset, $value)
- {
- return $this->define($offset, $value);
- }
-
- /**
- * Unset the value at the given offset.
- *
- * @param string $offset
- * @return void
- */
- public function offsetUnset($offset)
- {
- unset($this->definitions[$offset]);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/FactoryBuilder.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/FactoryBuilder.php
deleted file mode 100644
index 87bb0d8..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/FactoryBuilder.php
+++ /dev/null
@@ -1,448 +0,0 @@
-name = $name;
- $this->class = $class;
- $this->faker = $faker;
- $this->states = $states;
- $this->definitions = $definitions;
- $this->afterMaking = $afterMaking;
- $this->afterCreating = $afterCreating;
- }
-
- /**
- * Set the amount of models you wish to create / make.
- *
- * @param int $amount
- * @return $this
- */
- public function times($amount)
- {
- $this->amount = $amount;
-
- return $this;
- }
-
- /**
- * Set the state to be applied to the model.
- *
- * @param string $state
- * @return $this
- */
- public function state($state)
- {
- return $this->states([$state]);
- }
-
- /**
- * Set the states to be applied to the model.
- *
- * @param array|mixed $states
- * @return $this
- */
- public function states($states)
- {
- $this->activeStates = is_array($states) ? $states : func_get_args();
-
- return $this;
- }
-
- /**
- * Set the database connection on which the model instance should be persisted.
- *
- * @param string $name
- * @return $this
- */
- public function connection($name)
- {
- $this->connection = $name;
-
- return $this;
- }
-
- /**
- * Create a model and persist it in the database if requested.
- *
- * @param array $attributes
- * @return \Closure
- */
- public function lazy(array $attributes = [])
- {
- return function () use ($attributes) {
- return $this->create($attributes);
- };
- }
-
- /**
- * Create a collection of models and persist them to the database.
- *
- * @param array $attributes
- * @return mixed
- */
- public function create(array $attributes = [])
- {
- $results = $this->make($attributes);
-
- if ($results instanceof Model) {
- $this->store(collect([$results]));
-
- $this->callAfterCreating(collect([$results]));
- } else {
- $this->store($results);
-
- $this->callAfterCreating($results);
- }
-
- return $results;
- }
-
- /**
- * Set the connection name on the results and store them.
- *
- * @param \Illuminate\Support\Collection $results
- * @return void
- */
- protected function store($results)
- {
- $results->each(function ($model) {
- if (! isset($this->connection)) {
- $model->setConnection($model->newQueryWithoutScopes()->getConnection()->getName());
- }
-
- $model->save();
- });
- }
-
- /**
- * Create a collection of models.
- *
- * @param array $attributes
- * @return mixed
- */
- public function make(array $attributes = [])
- {
- if ($this->amount === null) {
- return tap($this->makeInstance($attributes), function ($instance) {
- $this->callAfterMaking(collect([$instance]));
- });
- }
-
- if ($this->amount < 1) {
- return (new $this->class)->newCollection();
- }
-
- $instances = (new $this->class)->newCollection(array_map(function () use ($attributes) {
- return $this->makeInstance($attributes);
- }, range(1, $this->amount)));
-
- $this->callAfterMaking($instances);
-
- return $instances;
- }
-
- /**
- * Create an array of raw attribute arrays.
- *
- * @param array $attributes
- * @return mixed
- */
- public function raw(array $attributes = [])
- {
- if ($this->amount === null) {
- return $this->getRawAttributes($attributes);
- }
-
- if ($this->amount < 1) {
- return [];
- }
-
- return array_map(function () use ($attributes) {
- return $this->getRawAttributes($attributes);
- }, range(1, $this->amount));
- }
-
- /**
- * Get a raw attributes array for the model.
- *
- * @param array $attributes
- * @return mixed
- *
- * @throws \InvalidArgumentException
- */
- protected function getRawAttributes(array $attributes = [])
- {
- if (! isset($this->definitions[$this->class][$this->name])) {
- throw new InvalidArgumentException("Unable to locate factory with name [{$this->name}] [{$this->class}].");
- }
-
- $definition = call_user_func(
- $this->definitions[$this->class][$this->name],
- $this->faker, $attributes
- );
-
- return $this->expandAttributes(
- array_merge($this->applyStates($definition, $attributes), $attributes)
- );
- }
-
- /**
- * Make an instance of the model with the given attributes.
- *
- * @param array $attributes
- * @return \Illuminate\Database\Eloquent\Model
- */
- protected function makeInstance(array $attributes = [])
- {
- return Model::unguarded(function () use ($attributes) {
- $instance = new $this->class(
- $this->getRawAttributes($attributes)
- );
-
- if (isset($this->connection)) {
- $instance->setConnection($this->connection);
- }
-
- return $instance;
- });
- }
-
- /**
- * Apply the active states to the model definition array.
- *
- * @param array $definition
- * @param array $attributes
- * @return array
- *
- * @throws \InvalidArgumentException
- */
- protected function applyStates(array $definition, array $attributes = [])
- {
- foreach ($this->activeStates as $state) {
- if (! isset($this->states[$this->class][$state])) {
- if ($this->stateHasAfterCallback($state)) {
- continue;
- }
-
- throw new InvalidArgumentException("Unable to locate [{$state}] state for [{$this->class}].");
- }
-
- $definition = array_merge(
- $definition,
- $this->stateAttributes($state, $attributes)
- );
- }
-
- return $definition;
- }
-
- /**
- * Get the state attributes.
- *
- * @param string $state
- * @param array $attributes
- * @return array
- */
- protected function stateAttributes($state, array $attributes)
- {
- $stateAttributes = $this->states[$this->class][$state];
-
- if (! is_callable($stateAttributes)) {
- return $stateAttributes;
- }
-
- return call_user_func(
- $stateAttributes,
- $this->faker, $attributes
- );
- }
-
- /**
- * Expand all attributes to their underlying values.
- *
- * @param array $attributes
- * @return array
- */
- protected function expandAttributes(array $attributes)
- {
- foreach ($attributes as &$attribute) {
- if (is_callable($attribute) && ! is_string($attribute) && ! is_array($attribute)) {
- $attribute = $attribute($attributes);
- }
-
- if ($attribute instanceof static) {
- $attribute = $attribute->create()->getKey();
- }
-
- if ($attribute instanceof Model) {
- $attribute = $attribute->getKey();
- }
- }
-
- return $attributes;
- }
-
- /**
- * Run after making callbacks on a collection of models.
- *
- * @param \Illuminate\Support\Collection $models
- * @return void
- */
- public function callAfterMaking($models)
- {
- $this->callAfter($this->afterMaking, $models);
- }
-
- /**
- * Run after creating callbacks on a collection of models.
- *
- * @param \Illuminate\Support\Collection $models
- * @return void
- */
- public function callAfterCreating($models)
- {
- $this->callAfter($this->afterCreating, $models);
- }
-
- /**
- * Call after callbacks for each model and state.
- *
- * @param array $afterCallbacks
- * @param \Illuminate\Support\Collection $models
- * @return void
- */
- protected function callAfter(array $afterCallbacks, $models)
- {
- $states = array_merge([$this->name], $this->activeStates);
-
- $models->each(function ($model) use ($states, $afterCallbacks) {
- foreach ($states as $state) {
- $this->callAfterCallbacks($afterCallbacks, $model, $state);
- }
- });
- }
-
- /**
- * Call after callbacks for each model and state.
- *
- * @param array $afterCallbacks
- * @param \Illuminate\Database\Eloquent\Model $model
- * @param string $state
- * @return void
- */
- protected function callAfterCallbacks(array $afterCallbacks, $model, $state)
- {
- if (! isset($afterCallbacks[$this->class][$state])) {
- return;
- }
-
- foreach ($afterCallbacks[$this->class][$state] as $callback) {
- $callback($model, $this->faker);
- }
- }
-
- /**
- * Determine if the given state has an "after" callback.
- *
- * @param string $state
- * @return bool
- */
- protected function stateHasAfterCallback($state)
- {
- return isset($this->afterMaking[$this->class][$state]) ||
- isset($this->afterCreating[$this->class][$state]);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/JsonEncodingException.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/JsonEncodingException.php
deleted file mode 100644
index 5878b0f..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/JsonEncodingException.php
+++ /dev/null
@@ -1,35 +0,0 @@
-getKey().'] to JSON: '.$message);
- }
-
- /**
- * Create a new JSON encoding exception for an attribute.
- *
- * @param mixed $model
- * @param mixed $key
- * @param string $message
- * @return static
- */
- public static function forAttribute($model, $key, $message)
- {
- $class = get_class($model);
-
- return new static("Unable to encode attribute [{$key}] for model [{$class}] to JSON: {$message}.");
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/MassAssignmentException.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/MassAssignmentException.php
deleted file mode 100755
index 7c81aae..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/MassAssignmentException.php
+++ /dev/null
@@ -1,10 +0,0 @@
-bootIfNotBooted();
-
- $this->initializeTraits();
-
- $this->syncOriginal();
-
- $this->fill($attributes);
- }
-
- /**
- * Check if the model needs to be booted and if so, do it.
- *
- * @return void
- */
- protected function bootIfNotBooted()
- {
- if (! isset(static::$booted[static::class])) {
- static::$booted[static::class] = true;
-
- $this->fireModelEvent('booting', false);
-
- static::boot();
-
- $this->fireModelEvent('booted', false);
- }
- }
-
- /**
- * The "booting" method of the model.
- *
- * @return void
- */
- protected static function boot()
- {
- static::bootTraits();
- }
-
- /**
- * Boot all of the bootable traits on the model.
- *
- * @return void
- */
- protected static function bootTraits()
- {
- $class = static::class;
-
- $booted = [];
-
- static::$traitInitializers[$class] = [];
-
- foreach (class_uses_recursive($class) as $trait) {
- $method = 'boot'.class_basename($trait);
-
- if (method_exists($class, $method) && ! in_array($method, $booted)) {
- forward_static_call([$class, $method]);
-
- $booted[] = $method;
- }
-
- if (method_exists($class, $method = 'initialize'.class_basename($trait))) {
- static::$traitInitializers[$class][] = $method;
-
- static::$traitInitializers[$class] = array_unique(
- static::$traitInitializers[$class]
- );
- }
- }
- }
-
- /**
- * Initialize any initializable traits on the model.
- *
- * @return void
- */
- protected function initializeTraits()
- {
- foreach (static::$traitInitializers[static::class] as $method) {
- $this->{$method}();
- }
- }
-
- /**
- * Clear the list of booted models so they will be re-booted.
- *
- * @return void
- */
- public static function clearBootedModels()
- {
- static::$booted = [];
-
- static::$globalScopes = [];
- }
-
- /**
- * Disables relationship model touching for the current class during given callback scope.
- *
- * @param callable $callback
- * @return void
- */
- public static function withoutTouching(callable $callback)
- {
- static::withoutTouchingOn([static::class], $callback);
- }
-
- /**
- * Disables relationship model touching for the given model classes during given callback scope.
- *
- * @param array $models
- * @param callable $callback
- * @return void
- */
- public static function withoutTouchingOn(array $models, callable $callback)
- {
- static::$ignoreOnTouch = array_values(array_merge(static::$ignoreOnTouch, $models));
-
- try {
- call_user_func($callback);
- } finally {
- static::$ignoreOnTouch = array_values(array_diff(static::$ignoreOnTouch, $models));
- }
- }
-
- /**
- * Determine if the given model is ignoring touches.
- *
- * @param string|null $class
- * @return bool
- */
- public static function isIgnoringTouch($class = null)
- {
- $class = $class ?: static::class;
-
- foreach (static::$ignoreOnTouch as $ignoredClass) {
- if ($class === $ignoredClass || is_subclass_of($class, $ignoredClass)) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * Fill the model with an array of attributes.
- *
- * @param array $attributes
- * @return $this
- *
- * @throws \Illuminate\Database\Eloquent\MassAssignmentException
- */
- public function fill(array $attributes)
- {
- $totallyGuarded = $this->totallyGuarded();
-
- foreach ($this->fillableFromArray($attributes) as $key => $value) {
- $key = $this->removeTableFromKey($key);
-
- // The developers may choose to place some attributes in the "fillable" array
- // which means only those attributes may be set through mass assignment to
- // the model, and all others will just get ignored for security reasons.
- if ($this->isFillable($key)) {
- $this->setAttribute($key, $value);
- } elseif ($totallyGuarded) {
- throw new MassAssignmentException(sprintf(
- 'Add [%s] to fillable property to allow mass assignment on [%s].',
- $key, get_class($this)
- ));
- }
- }
-
- return $this;
- }
-
- /**
- * Fill the model with an array of attributes. Force mass assignment.
- *
- * @param array $attributes
- * @return $this
- */
- public function forceFill(array $attributes)
- {
- return static::unguarded(function () use ($attributes) {
- return $this->fill($attributes);
- });
- }
-
- /**
- * Qualify the given column name by the model's table.
- *
- * @param string $column
- * @return string
- */
- public function qualifyColumn($column)
- {
- if (Str::contains($column, '.')) {
- return $column;
- }
-
- return $this->getTable().'.'.$column;
- }
-
- /**
- * Remove the table name from a given key.
- *
- * @param string $key
- * @return string
- */
- protected function removeTableFromKey($key)
- {
- return Str::contains($key, '.') ? last(explode('.', $key)) : $key;
- }
-
- /**
- * Create a new instance of the given model.
- *
- * @param array $attributes
- * @param bool $exists
- * @return static
- */
- public function newInstance($attributes = [], $exists = false)
- {
- // This method just provides a convenient way for us to generate fresh model
- // instances of this current model. It is particularly useful during the
- // hydration of new objects via the Eloquent query builder instances.
- $model = new static((array) $attributes);
-
- $model->exists = $exists;
-
- $model->setConnection(
- $this->getConnectionName()
- );
-
- $model->setTable($this->getTable());
-
- return $model;
- }
-
- /**
- * Create a new model instance that is existing.
- *
- * @param array $attributes
- * @param string|null $connection
- * @return static
- */
- public function newFromBuilder($attributes = [], $connection = null)
- {
- $model = $this->newInstance([], true);
-
- $model->setRawAttributes((array) $attributes, true);
-
- $model->setConnection($connection ?: $this->getConnectionName());
-
- $model->fireModelEvent('retrieved', false);
-
- return $model;
- }
-
- /**
- * Begin querying the model on a given connection.
- *
- * @param string|null $connection
- * @return \Illuminate\Database\Eloquent\Builder
- */
- public static function on($connection = null)
- {
- // First we will just create a fresh instance of this model, and then we can set the
- // connection on the model so that it is used for the queries we execute, as well
- // as being set on every relation we retrieve without a custom connection name.
- $instance = new static;
-
- $instance->setConnection($connection);
-
- return $instance->newQuery();
- }
-
- /**
- * Begin querying the model on the write connection.
- *
- * @return \Illuminate\Database\Query\Builder
- */
- public static function onWriteConnection()
- {
- $instance = new static;
-
- return $instance->newQuery()->useWritePdo();
- }
-
- /**
- * Get all of the models from the database.
- *
- * @param array|mixed $columns
- * @return \Illuminate\Database\Eloquent\Collection|static[]
- */
- public static function all($columns = ['*'])
- {
- return (new static)->newQuery()->get(
- is_array($columns) ? $columns : func_get_args()
- );
- }
-
- /**
- * Begin querying a model with eager loading.
- *
- * @param array|string $relations
- * @return \Illuminate\Database\Eloquent\Builder|static
- */
- public static function with($relations)
- {
- return (new static)->newQuery()->with(
- is_string($relations) ? func_get_args() : $relations
- );
- }
-
- /**
- * Eager load relations on the model.
- *
- * @param array|string $relations
- * @return $this
- */
- public function load($relations)
- {
- $query = $this->newQueryWithoutRelationships()->with(
- is_string($relations) ? func_get_args() : $relations
- );
-
- $query->eagerLoadRelations([$this]);
-
- return $this;
- }
-
- /**
- * Eager load relations on the model if they are not already eager loaded.
- *
- * @param array|string $relations
- * @return $this
- */
- public function loadMissing($relations)
- {
- $relations = is_string($relations) ? func_get_args() : $relations;
-
- $this->newCollection([$this])->loadMissing($relations);
-
- return $this;
- }
-
- /**
- * Increment a column's value by a given amount.
- *
- * @param string $column
- * @param float|int $amount
- * @param array $extra
- * @return int
- */
- protected function increment($column, $amount = 1, array $extra = [])
- {
- return $this->incrementOrDecrement($column, $amount, $extra, 'increment');
- }
-
- /**
- * Decrement a column's value by a given amount.
- *
- * @param string $column
- * @param float|int $amount
- * @param array $extra
- * @return int
- */
- protected function decrement($column, $amount = 1, array $extra = [])
- {
- return $this->incrementOrDecrement($column, $amount, $extra, 'decrement');
- }
-
- /**
- * Run the increment or decrement method on the model.
- *
- * @param string $column
- * @param float|int $amount
- * @param array $extra
- * @param string $method
- * @return int
- */
- protected function incrementOrDecrement($column, $amount, $extra, $method)
- {
- $query = $this->newModelQuery();
-
- if (! $this->exists) {
- return $query->{$method}($column, $amount, $extra);
- }
-
- $this->incrementOrDecrementAttributeValue($column, $amount, $extra, $method);
-
- return $query->where(
- $this->getKeyName(), $this->getKey()
- )->{$method}($column, $amount, $extra);
- }
-
- /**
- * Increment the underlying attribute value and sync with original.
- *
- * @param string $column
- * @param float|int $amount
- * @param array $extra
- * @param string $method
- * @return void
- */
- protected function incrementOrDecrementAttributeValue($column, $amount, $extra, $method)
- {
- $this->{$column} = $this->{$column} + ($method === 'increment' ? $amount : $amount * -1);
-
- $this->forceFill($extra);
-
- $this->syncOriginalAttribute($column);
- }
-
- /**
- * Update the model in the database.
- *
- * @param array $attributes
- * @param array $options
- * @return bool
- */
- public function update(array $attributes = [], array $options = [])
- {
- if (! $this->exists) {
- return false;
- }
-
- return $this->fill($attributes)->save($options);
- }
-
- /**
- * Save the model and all of its relationships.
- *
- * @return bool
- */
- public function push()
- {
- if (! $this->save()) {
- return false;
- }
-
- // To sync all of the relationships to the database, we will simply spin through
- // the relationships and save each model via this "push" method, which allows
- // us to recurse into all of these nested relations for the model instance.
- foreach ($this->relations as $models) {
- $models = $models instanceof Collection
- ? $models->all() : [$models];
-
- foreach (array_filter($models) as $model) {
- if (! $model->push()) {
- return false;
- }
- }
- }
-
- return true;
- }
-
- /**
- * Save the model to the database.
- *
- * @param array $options
- * @return bool
- */
- public function save(array $options = [])
- {
- $query = $this->newModelQuery();
-
- // If the "saving" event returns false we'll bail out of the save and return
- // false, indicating that the save failed. This provides a chance for any
- // listeners to cancel save operations if validations fail or whatever.
- if ($this->fireModelEvent('saving') === false) {
- return false;
- }
-
- // If the model already exists in the database we can just update our record
- // that is already in this database using the current IDs in this "where"
- // clause to only update this model. Otherwise, we'll just insert them.
- if ($this->exists) {
- $saved = $this->isDirty() ?
- $this->performUpdate($query) : true;
- }
-
- // If the model is brand new, we'll insert it into our database and set the
- // ID attribute on the model to the value of the newly inserted row's ID
- // which is typically an auto-increment value managed by the database.
- else {
- $saved = $this->performInsert($query);
-
- if (! $this->getConnectionName() &&
- $connection = $query->getConnection()) {
- $this->setConnection($connection->getName());
- }
- }
-
- // If the model is successfully saved, we need to do a few more things once
- // that is done. We will call the "saved" method here to run any actions
- // we need to happen after a model gets successfully saved right here.
- if ($saved) {
- $this->finishSave($options);
- }
-
- return $saved;
- }
-
- /**
- * Save the model to the database using transaction.
- *
- * @param array $options
- * @return bool
- *
- * @throws \Throwable
- */
- public function saveOrFail(array $options = [])
- {
- return $this->getConnection()->transaction(function () use ($options) {
- return $this->save($options);
- });
- }
-
- /**
- * Perform any actions that are necessary after the model is saved.
- *
- * @param array $options
- * @return void
- */
- protected function finishSave(array $options)
- {
- $this->fireModelEvent('saved', false);
-
- if ($this->isDirty() && ($options['touch'] ?? true)) {
- $this->touchOwners();
- }
-
- $this->syncOriginal();
- }
-
- /**
- * Perform a model update operation.
- *
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @return bool
- */
- protected function performUpdate(Builder $query)
- {
- // If the updating event returns false, we will cancel the update operation so
- // developers can hook Validation systems into their models and cancel this
- // operation if the model does not pass validation. Otherwise, we update.
- if ($this->fireModelEvent('updating') === false) {
- return false;
- }
-
- // First we need to create a fresh query instance and touch the creation and
- // update timestamp on the model which are maintained by us for developer
- // convenience. Then we will just continue saving the model instances.
- if ($this->usesTimestamps()) {
- $this->updateTimestamps();
- }
-
- // Once we have run the update operation, we will fire the "updated" event for
- // this model instance. This will allow developers to hook into these after
- // models are updated, giving them a chance to do any special processing.
- $dirty = $this->getDirty();
-
- if (count($dirty) > 0) {
- $this->setKeysForSaveQuery($query)->update($dirty);
-
- $this->syncChanges();
-
- $this->fireModelEvent('updated', false);
- }
-
- return true;
- }
-
- /**
- * Set the keys for a save update query.
- *
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @return \Illuminate\Database\Eloquent\Builder
- */
- protected function setKeysForSaveQuery(Builder $query)
- {
- $query->where($this->getKeyName(), '=', $this->getKeyForSaveQuery());
-
- return $query;
- }
-
- /**
- * Get the primary key value for a save query.
- *
- * @return mixed
- */
- protected function getKeyForSaveQuery()
- {
- return $this->original[$this->getKeyName()]
- ?? $this->getKey();
- }
-
- /**
- * Perform a model insert operation.
- *
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @return bool
- */
- protected function performInsert(Builder $query)
- {
- if ($this->fireModelEvent('creating') === false) {
- return false;
- }
-
- // First we'll need to create a fresh query instance and touch the creation and
- // update timestamps on this model, which are maintained by us for developer
- // convenience. After, we will just continue saving these model instances.
- if ($this->usesTimestamps()) {
- $this->updateTimestamps();
- }
-
- // If the model has an incrementing key, we can use the "insertGetId" method on
- // the query builder, which will give us back the final inserted ID for this
- // table from the database. Not all tables have to be incrementing though.
- $attributes = $this->getAttributes();
-
- if ($this->getIncrementing()) {
- $this->insertAndSetId($query, $attributes);
- }
-
- // If the table isn't incrementing we'll simply insert these attributes as they
- // are. These attribute arrays must contain an "id" column previously placed
- // there by the developer as the manually determined key for these models.
- else {
- if (empty($attributes)) {
- return true;
- }
-
- $query->insert($attributes);
- }
-
- // We will go ahead and set the exists property to true, so that it is set when
- // the created event is fired, just in case the developer tries to update it
- // during the event. This will allow them to do so and run an update here.
- $this->exists = true;
-
- $this->wasRecentlyCreated = true;
-
- $this->fireModelEvent('created', false);
-
- return true;
- }
-
- /**
- * Insert the given attributes and set the ID on the model.
- *
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @param array $attributes
- * @return void
- */
- protected function insertAndSetId(Builder $query, $attributes)
- {
- $id = $query->insertGetId($attributes, $keyName = $this->getKeyName());
-
- $this->setAttribute($keyName, $id);
- }
-
- /**
- * Destroy the models for the given IDs.
- *
- * @param \Illuminate\Support\Collection|array|int $ids
- * @return int
- */
- public static function destroy($ids)
- {
- // We'll initialize a count here so we will return the total number of deletes
- // for the operation. The developers can then check this number as a boolean
- // type value or get this total count of records deleted for logging, etc.
- $count = 0;
-
- if ($ids instanceof BaseCollection) {
- $ids = $ids->all();
- }
-
- $ids = is_array($ids) ? $ids : func_get_args();
-
- // We will actually pull the models from the database table and call delete on
- // each of them individually so that their events get fired properly with a
- // correct set of attributes in case the developers wants to check these.
- $key = ($instance = new static)->getKeyName();
-
- foreach ($instance->whereIn($key, $ids)->get() as $model) {
- if ($model->delete()) {
- $count++;
- }
- }
-
- return $count;
- }
-
- /**
- * Delete the model from the database.
- *
- * @return bool|null
- *
- * @throws \Exception
- */
- public function delete()
- {
- if (is_null($this->getKeyName())) {
- throw new Exception('No primary key defined on model.');
- }
-
- // If the model doesn't exist, there is nothing to delete so we'll just return
- // immediately and not do anything else. Otherwise, we will continue with a
- // deletion process on the model, firing the proper events, and so forth.
- if (! $this->exists) {
- return;
- }
-
- if ($this->fireModelEvent('deleting') === false) {
- return false;
- }
-
- // Here, we'll touch the owning models, verifying these timestamps get updated
- // for the models. This will allow any caching to get broken on the parents
- // by the timestamp. Then we will go ahead and delete the model instance.
- $this->touchOwners();
-
- $this->performDeleteOnModel();
-
- // Once the model has been deleted, we will fire off the deleted event so that
- // the developers may hook into post-delete operations. We will then return
- // a boolean true as the delete is presumably successful on the database.
- $this->fireModelEvent('deleted', false);
-
- return true;
- }
-
- /**
- * Force a hard delete on a soft deleted model.
- *
- * This method protects developers from running forceDelete when trait is missing.
- *
- * @return bool|null
- */
- public function forceDelete()
- {
- return $this->delete();
- }
-
- /**
- * Perform the actual delete query on this model instance.
- *
- * @return void
- */
- protected function performDeleteOnModel()
- {
- $this->setKeysForSaveQuery($this->newModelQuery())->delete();
-
- $this->exists = false;
- }
-
- /**
- * Begin querying the model.
- *
- * @return \Illuminate\Database\Eloquent\Builder
- */
- public static function query()
- {
- return (new static)->newQuery();
- }
-
- /**
- * Get a new query builder for the model's table.
- *
- * @return \Illuminate\Database\Eloquent\Builder
- */
- public function newQuery()
- {
- return $this->registerGlobalScopes($this->newQueryWithoutScopes());
- }
-
- /**
- * Get a new query builder that doesn't have any global scopes or eager loading.
- *
- * @return \Illuminate\Database\Eloquent\Builder|static
- */
- public function newModelQuery()
- {
- return $this->newEloquentBuilder(
- $this->newBaseQueryBuilder()
- )->setModel($this);
- }
-
- /**
- * Get a new query builder with no relationships loaded.
- *
- * @return \Illuminate\Database\Eloquent\Builder
- */
- public function newQueryWithoutRelationships()
- {
- return $this->registerGlobalScopes($this->newModelQuery());
- }
-
- /**
- * Register the global scopes for this builder instance.
- *
- * @param \Illuminate\Database\Eloquent\Builder $builder
- * @return \Illuminate\Database\Eloquent\Builder
- */
- public function registerGlobalScopes($builder)
- {
- foreach ($this->getGlobalScopes() as $identifier => $scope) {
- $builder->withGlobalScope($identifier, $scope);
- }
-
- return $builder;
- }
-
- /**
- * Get a new query builder that doesn't have any global scopes.
- *
- * @return \Illuminate\Database\Eloquent\Builder|static
- */
- public function newQueryWithoutScopes()
- {
- return $this->newModelQuery()
- ->with($this->with)
- ->withCount($this->withCount);
- }
-
- /**
- * Get a new query instance without a given scope.
- *
- * @param \Illuminate\Database\Eloquent\Scope|string $scope
- * @return \Illuminate\Database\Eloquent\Builder
- */
- public function newQueryWithoutScope($scope)
- {
- return $this->newQuery()->withoutGlobalScope($scope);
- }
-
- /**
- * Get a new query to restore one or more models by their queueable IDs.
- *
- * @param array|int $ids
- * @return \Illuminate\Database\Eloquent\Builder
- */
- public function newQueryForRestoration($ids)
- {
- return is_array($ids)
- ? $this->newQueryWithoutScopes()->whereIn($this->getQualifiedKeyName(), $ids)
- : $this->newQueryWithoutScopes()->whereKey($ids);
- }
-
- /**
- * Create a new Eloquent query builder for the model.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @return \Illuminate\Database\Eloquent\Builder|static
- */
- public function newEloquentBuilder($query)
- {
- return new Builder($query);
- }
-
- /**
- * Get a new query builder instance for the connection.
- *
- * @return \Illuminate\Database\Query\Builder
- */
- protected function newBaseQueryBuilder()
- {
- $connection = $this->getConnection();
-
- return new QueryBuilder(
- $connection, $connection->getQueryGrammar(), $connection->getPostProcessor()
- );
- }
-
- /**
- * Create a new Eloquent Collection instance.
- *
- * @param array $models
- * @return \Illuminate\Database\Eloquent\Collection
- */
- public function newCollection(array $models = [])
- {
- return new Collection($models);
- }
-
- /**
- * Create a new pivot model instance.
- *
- * @param \Illuminate\Database\Eloquent\Model $parent
- * @param array $attributes
- * @param string $table
- * @param bool $exists
- * @param string|null $using
- * @return \Illuminate\Database\Eloquent\Relations\Pivot
- */
- public function newPivot(self $parent, array $attributes, $table, $exists, $using = null)
- {
- return $using ? $using::fromRawAttributes($parent, $attributes, $table, $exists)
- : Pivot::fromAttributes($parent, $attributes, $table, $exists);
- }
-
- /**
- * Convert the model instance to an array.
- *
- * @return array
- */
- public function toArray()
- {
- return array_merge($this->attributesToArray(), $this->relationsToArray());
- }
-
- /**
- * Convert the model instance to JSON.
- *
- * @param int $options
- * @return string
- *
- * @throws \Illuminate\Database\Eloquent\JsonEncodingException
- */
- public function toJson($options = 0)
- {
- $json = json_encode($this->jsonSerialize(), $options);
-
- if (JSON_ERROR_NONE !== json_last_error()) {
- throw JsonEncodingException::forModel($this, json_last_error_msg());
- }
-
- return $json;
- }
-
- /**
- * Convert the object into something JSON serializable.
- *
- * @return array
- */
- public function jsonSerialize()
- {
- return $this->toArray();
- }
-
- /**
- * Reload a fresh model instance from the database.
- *
- * @param array|string $with
- * @return static|null
- */
- public function fresh($with = [])
- {
- if (! $this->exists) {
- return;
- }
-
- return static::newQueryWithoutScopes()
- ->with(is_string($with) ? func_get_args() : $with)
- ->where($this->getKeyName(), $this->getKey())
- ->first();
- }
-
- /**
- * Reload the current model instance with fresh attributes from the database.
- *
- * @return $this
- */
- public function refresh()
- {
- if (! $this->exists) {
- return $this;
- }
-
- $this->setRawAttributes(
- static::newQueryWithoutScopes()->findOrFail($this->getKey())->attributes
- );
-
- $this->load(collect($this->relations)->except('pivot')->keys()->toArray());
-
- $this->syncOriginal();
-
- return $this;
- }
-
- /**
- * Clone the model into a new, non-existing instance.
- *
- * @param array|null $except
- * @return static
- */
- public function replicate(array $except = null)
- {
- $defaults = [
- $this->getKeyName(),
- $this->getCreatedAtColumn(),
- $this->getUpdatedAtColumn(),
- ];
-
- $attributes = Arr::except(
- $this->attributes, $except ? array_unique(array_merge($except, $defaults)) : $defaults
- );
-
- return tap(new static, function ($instance) use ($attributes) {
- $instance->setRawAttributes($attributes);
-
- $instance->setRelations($this->relations);
- });
- }
-
- /**
- * Determine if two models have the same ID and belong to the same table.
- *
- * @param \Illuminate\Database\Eloquent\Model|null $model
- * @return bool
- */
- public function is($model)
- {
- return ! is_null($model) &&
- $this->getKey() === $model->getKey() &&
- $this->getTable() === $model->getTable() &&
- $this->getConnectionName() === $model->getConnectionName();
- }
-
- /**
- * Determine if two models are not the same.
- *
- * @param \Illuminate\Database\Eloquent\Model|null $model
- * @return bool
- */
- public function isNot($model)
- {
- return ! $this->is($model);
- }
-
- /**
- * Get the database connection for the model.
- *
- * @return \Illuminate\Database\Connection
- */
- public function getConnection()
- {
- return static::resolveConnection($this->getConnectionName());
- }
-
- /**
- * Get the current connection name for the model.
- *
- * @return string
- */
- public function getConnectionName()
- {
- return $this->connection;
- }
-
- /**
- * Set the connection associated with the model.
- *
- * @param string $name
- * @return $this
- */
- public function setConnection($name)
- {
- $this->connection = $name;
-
- return $this;
- }
-
- /**
- * Resolve a connection instance.
- *
- * @param string|null $connection
- * @return \Illuminate\Database\Connection
- */
- public static function resolveConnection($connection = null)
- {
- return static::$resolver->connection($connection);
- }
-
- /**
- * Get the connection resolver instance.
- *
- * @return \Illuminate\Database\ConnectionResolverInterface
- */
- public static function getConnectionResolver()
- {
- return static::$resolver;
- }
-
- /**
- * Set the connection resolver instance.
- *
- * @param \Illuminate\Database\ConnectionResolverInterface $resolver
- * @return void
- */
- public static function setConnectionResolver(Resolver $resolver)
- {
- static::$resolver = $resolver;
- }
-
- /**
- * Unset the connection resolver for models.
- *
- * @return void
- */
- public static function unsetConnectionResolver()
- {
- static::$resolver = null;
- }
-
- /**
- * Get the table associated with the model.
- *
- * @return string
- */
- public function getTable()
- {
- if (! isset($this->table)) {
- return str_replace(
- '\\', '', Str::snake(Str::plural(class_basename($this)))
- );
- }
-
- return $this->table;
- }
-
- /**
- * Set the table associated with the model.
- *
- * @param string $table
- * @return $this
- */
- public function setTable($table)
- {
- $this->table = $table;
-
- return $this;
- }
-
- /**
- * Get the primary key for the model.
- *
- * @return string
- */
- public function getKeyName()
- {
- return $this->primaryKey;
- }
-
- /**
- * Set the primary key for the model.
- *
- * @param string $key
- * @return $this
- */
- public function setKeyName($key)
- {
- $this->primaryKey = $key;
-
- return $this;
- }
-
- /**
- * Get the table qualified key name.
- *
- * @return string
- */
- public function getQualifiedKeyName()
- {
- return $this->qualifyColumn($this->getKeyName());
- }
-
- /**
- * Get the auto-incrementing key type.
- *
- * @return string
- */
- public function getKeyType()
- {
- return $this->keyType;
- }
-
- /**
- * Set the data type for the primary key.
- *
- * @param string $type
- * @return $this
- */
- public function setKeyType($type)
- {
- $this->keyType = $type;
-
- return $this;
- }
-
- /**
- * Get the value indicating whether the IDs are incrementing.
- *
- * @return bool
- */
- public function getIncrementing()
- {
- return $this->incrementing;
- }
-
- /**
- * Set whether IDs are incrementing.
- *
- * @param bool $value
- * @return $this
- */
- public function setIncrementing($value)
- {
- $this->incrementing = $value;
-
- return $this;
- }
-
- /**
- * Get the value of the model's primary key.
- *
- * @return mixed
- */
- public function getKey()
- {
- return $this->getAttribute($this->getKeyName());
- }
-
- /**
- * Get the queueable identity for the entity.
- *
- * @return mixed
- */
- public function getQueueableId()
- {
- return $this->getKey();
- }
-
- /**
- * Get the queueable relationships for the entity.
- *
- * @return array
- */
- public function getQueueableRelations()
- {
- $relations = [];
-
- foreach ($this->getRelations() as $key => $relation) {
- if (method_exists($this, $key)) {
- $relations[] = $key;
- }
-
- if ($relation instanceof QueueableCollection) {
- foreach ($relation->getQueueableRelations() as $collectionValue) {
- $relations[] = $key.'.'.$collectionValue;
- }
- }
-
- if ($relation instanceof QueueableEntity) {
- foreach ($relation->getQueueableRelations() as $entityKey => $entityValue) {
- $relations[] = $key.'.'.$entityValue;
- }
- }
- }
-
- return array_unique($relations);
- }
-
- /**
- * Get the queueable connection for the entity.
- *
- * @return mixed
- */
- public function getQueueableConnection()
- {
- return $this->getConnectionName();
- }
-
- /**
- * Get the value of the model's route key.
- *
- * @return mixed
- */
- public function getRouteKey()
- {
- return $this->getAttribute($this->getRouteKeyName());
- }
-
- /**
- * Get the route key for the model.
- *
- * @return string
- */
- public function getRouteKeyName()
- {
- return $this->getKeyName();
- }
-
- /**
- * Retrieve the model for a bound value.
- *
- * @param mixed $value
- * @return \Illuminate\Database\Eloquent\Model|null
- */
- public function resolveRouteBinding($value)
- {
- return $this->where($this->getRouteKeyName(), $value)->first();
- }
-
- /**
- * Get the default foreign key name for the model.
- *
- * @return string
- */
- public function getForeignKey()
- {
- return Str::snake(class_basename($this)).'_'.$this->getKeyName();
- }
-
- /**
- * Get the number of models to return per page.
- *
- * @return int
- */
- public function getPerPage()
- {
- return $this->perPage;
- }
-
- /**
- * Set the number of models to return per page.
- *
- * @param int $perPage
- * @return $this
- */
- public function setPerPage($perPage)
- {
- $this->perPage = $perPage;
-
- return $this;
- }
-
- /**
- * Dynamically retrieve attributes on the model.
- *
- * @param string $key
- * @return mixed
- */
- public function __get($key)
- {
- return $this->getAttribute($key);
- }
-
- /**
- * Dynamically set attributes on the model.
- *
- * @param string $key
- * @param mixed $value
- * @return void
- */
- public function __set($key, $value)
- {
- $this->setAttribute($key, $value);
- }
-
- /**
- * Determine if the given attribute exists.
- *
- * @param mixed $offset
- * @return bool
- */
- public function offsetExists($offset)
- {
- return ! is_null($this->getAttribute($offset));
- }
-
- /**
- * Get the value for a given offset.
- *
- * @param mixed $offset
- * @return mixed
- */
- public function offsetGet($offset)
- {
- return $this->getAttribute($offset);
- }
-
- /**
- * Set the value for a given offset.
- *
- * @param mixed $offset
- * @param mixed $value
- * @return void
- */
- public function offsetSet($offset, $value)
- {
- $this->setAttribute($offset, $value);
- }
-
- /**
- * Unset the value for a given offset.
- *
- * @param mixed $offset
- * @return void
- */
- public function offsetUnset($offset)
- {
- unset($this->attributes[$offset], $this->relations[$offset]);
- }
-
- /**
- * Determine if an attribute or relation exists on the model.
- *
- * @param string $key
- * @return bool
- */
- public function __isset($key)
- {
- return $this->offsetExists($key);
- }
-
- /**
- * Unset an attribute on the model.
- *
- * @param string $key
- * @return void
- */
- public function __unset($key)
- {
- $this->offsetUnset($key);
- }
-
- /**
- * Handle dynamic method calls into the model.
- *
- * @param string $method
- * @param array $parameters
- * @return mixed
- */
- public function __call($method, $parameters)
- {
- if (in_array($method, ['increment', 'decrement'])) {
- return $this->$method(...$parameters);
- }
-
- return $this->forwardCallTo($this->newQuery(), $method, $parameters);
- }
-
- /**
- * Handle dynamic static method calls into the method.
- *
- * @param string $method
- * @param array $parameters
- * @return mixed
- */
- public static function __callStatic($method, $parameters)
- {
- return (new static)->$method(...$parameters);
- }
-
- /**
- * Convert the model to its string representation.
- *
- * @return string
- */
- public function __toString()
- {
- return $this->toJson();
- }
-
- /**
- * When a model is being unserialized, check if it needs to be booted.
- *
- * @return void
- */
- public function __wakeup()
- {
- $this->bootIfNotBooted();
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/ModelNotFoundException.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/ModelNotFoundException.php
deleted file mode 100755
index c3db824..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/ModelNotFoundException.php
+++ /dev/null
@@ -1,66 +0,0 @@
-model = $model;
- $this->ids = Arr::wrap($ids);
-
- $this->message = "No query results for model [{$model}]";
-
- if (count($this->ids) > 0) {
- $this->message .= ' '.implode(', ', $this->ids);
- } else {
- $this->message .= '.';
- }
-
- return $this;
- }
-
- /**
- * Get the affected Eloquent model.
- *
- * @return string
- */
- public function getModel()
- {
- return $this->model;
- }
-
- /**
- * Get the affected Eloquent model IDs.
- *
- * @return int|array
- */
- public function getIds()
- {
- return $this->ids;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/QueueEntityResolver.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/QueueEntityResolver.php
deleted file mode 100644
index 22fccf2..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/QueueEntityResolver.php
+++ /dev/null
@@ -1,29 +0,0 @@
-find($id);
-
- if ($instance) {
- return $instance;
- }
-
- throw new EntityNotFoundException($type, $id);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/RelationNotFoundException.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/RelationNotFoundException.php
deleted file mode 100755
index 088429c..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/RelationNotFoundException.php
+++ /dev/null
@@ -1,41 +0,0 @@
-model = $model;
- $instance->relation = $relation;
-
- return $instance;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsTo.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsTo.php
deleted file mode 100755
index 3fbbe04..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsTo.php
+++ /dev/null
@@ -1,358 +0,0 @@
-ownerKey = $ownerKey;
- $this->relation = $relation;
- $this->foreignKey = $foreignKey;
-
- // In the underlying base relationship class, this variable is referred to as
- // the "parent" since most relationships are not inversed. But, since this
- // one is we will create a "child" variable for much better readability.
- $this->child = $child;
-
- parent::__construct($query, $child);
- }
-
- /**
- * Get the results of the relationship.
- *
- * @return mixed
- */
- public function getResults()
- {
- if (is_null($this->child->{$this->foreignKey})) {
- return $this->getDefaultFor($this->parent);
- }
-
- return $this->query->first() ?: $this->getDefaultFor($this->parent);
- }
-
- /**
- * Set the base constraints on the relation query.
- *
- * @return void
- */
- public function addConstraints()
- {
- if (static::$constraints) {
- // For belongs to relationships, which are essentially the inverse of has one
- // or has many relationships, we need to actually query on the primary key
- // of the related models matching on the foreign key that's on a parent.
- $table = $this->related->getTable();
-
- $this->query->where($table.'.'.$this->ownerKey, '=', $this->child->{$this->foreignKey});
- }
- }
-
- /**
- * Set the constraints for an eager load of the relation.
- *
- * @param array $models
- * @return void
- */
- public function addEagerConstraints(array $models)
- {
- // We'll grab the primary key name of the related models since it could be set to
- // a non-standard name and not "id". We will then construct the constraint for
- // our eagerly loading query so it returns the proper models from execution.
- $key = $this->related->getTable().'.'.$this->ownerKey;
-
- $whereIn = $this->whereInMethod($this->related, $this->ownerKey);
-
- $this->query->{$whereIn}($key, $this->getEagerModelKeys($models));
- }
-
- /**
- * Gather the keys from an array of related models.
- *
- * @param array $models
- * @return array
- */
- protected function getEagerModelKeys(array $models)
- {
- $keys = [];
-
- // First we need to gather all of the keys from the parent models so we know what
- // to query for via the eager loading query. We will add them to an array then
- // execute a "where in" statement to gather up all of those related records.
- foreach ($models as $model) {
- if (! is_null($value = $model->{$this->foreignKey})) {
- $keys[] = $value;
- }
- }
-
- sort($keys);
-
- return array_values(array_unique($keys));
- }
-
- /**
- * Initialize the relation on a set of models.
- *
- * @param array $models
- * @param string $relation
- * @return array
- */
- public function initRelation(array $models, $relation)
- {
- foreach ($models as $model) {
- $model->setRelation($relation, $this->getDefaultFor($model));
- }
-
- return $models;
- }
-
- /**
- * Match the eagerly loaded results to their parents.
- *
- * @param array $models
- * @param \Illuminate\Database\Eloquent\Collection $results
- * @param string $relation
- * @return array
- */
- public function match(array $models, Collection $results, $relation)
- {
- $foreign = $this->foreignKey;
-
- $owner = $this->ownerKey;
-
- // First we will get to build a dictionary of the child models by their primary
- // key of the relationship, then we can easily match the children back onto
- // the parents using that dictionary and the primary key of the children.
- $dictionary = [];
-
- foreach ($results as $result) {
- $dictionary[$result->getAttribute($owner)] = $result;
- }
-
- // Once we have the dictionary constructed, we can loop through all the parents
- // and match back onto their children using these keys of the dictionary and
- // the primary key of the children to map them onto the correct instances.
- foreach ($models as $model) {
- if (isset($dictionary[$model->{$foreign}])) {
- $model->setRelation($relation, $dictionary[$model->{$foreign}]);
- }
- }
-
- return $models;
- }
-
- /**
- * Update the parent model on the relationship.
- *
- * @param array $attributes
- * @return mixed
- */
- public function update(array $attributes)
- {
- return $this->getResults()->fill($attributes)->save();
- }
-
- /**
- * Associate the model instance to the given parent.
- *
- * @param \Illuminate\Database\Eloquent\Model|int|string $model
- * @return \Illuminate\Database\Eloquent\Model
- */
- public function associate($model)
- {
- $ownerKey = $model instanceof Model ? $model->getAttribute($this->ownerKey) : $model;
-
- $this->child->setAttribute($this->foreignKey, $ownerKey);
-
- if ($model instanceof Model) {
- $this->child->setRelation($this->relation, $model);
- }
-
- return $this->child;
- }
-
- /**
- * Dissociate previously associated model from the given parent.
- *
- * @return \Illuminate\Database\Eloquent\Model
- */
- public function dissociate()
- {
- $this->child->setAttribute($this->foreignKey, null);
-
- return $this->child->setRelation($this->relation, null);
- }
-
- /**
- * Add the constraints for a relationship query.
- *
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @param \Illuminate\Database\Eloquent\Builder $parentQuery
- * @param array|mixed $columns
- * @return \Illuminate\Database\Eloquent\Builder
- */
- public function getRelationExistenceQuery(Builder $query, Builder $parentQuery, $columns = ['*'])
- {
- if ($parentQuery->getQuery()->from == $query->getQuery()->from) {
- return $this->getRelationExistenceQueryForSelfRelation($query, $parentQuery, $columns);
- }
-
- return $query->select($columns)->whereColumn(
- $this->getQualifiedForeignKey(), '=', $query->qualifyColumn($this->ownerKey)
- );
- }
-
- /**
- * Add the constraints for a relationship query on the same table.
- *
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @param \Illuminate\Database\Eloquent\Builder $parentQuery
- * @param array|mixed $columns
- * @return \Illuminate\Database\Eloquent\Builder
- */
- public function getRelationExistenceQueryForSelfRelation(Builder $query, Builder $parentQuery, $columns = ['*'])
- {
- $query->select($columns)->from(
- $query->getModel()->getTable().' as '.$hash = $this->getRelationCountHash()
- );
-
- $query->getModel()->setTable($hash);
-
- return $query->whereColumn(
- $hash.'.'.$this->ownerKey, '=', $this->getQualifiedForeignKey()
- );
- }
-
- /**
- * Get a relationship join table hash.
- *
- * @return string
- */
- public function getRelationCountHash()
- {
- return 'laravel_reserved_'.static::$selfJoinCount++;
- }
-
- /**
- * Determine if the related model has an auto-incrementing ID.
- *
- * @return bool
- */
- protected function relationHasIncrementingId()
- {
- return $this->related->getIncrementing() &&
- $this->related->getKeyType() === 'int';
- }
-
- /**
- * Make a new related instance for the given model.
- *
- * @param \Illuminate\Database\Eloquent\Model $parent
- * @return \Illuminate\Database\Eloquent\Model
- */
- protected function newRelatedInstanceFor(Model $parent)
- {
- return $this->related->newInstance();
- }
-
- /**
- * Get the foreign key of the relationship.
- *
- * @return string
- */
- public function getForeignKey()
- {
- return $this->foreignKey;
- }
-
- /**
- * Get the fully qualified foreign key of the relationship.
- *
- * @return string
- */
- public function getQualifiedForeignKey()
- {
- return $this->child->qualifyColumn($this->foreignKey);
- }
-
- /**
- * Get the associated key of the relationship.
- *
- * @return string
- */
- public function getOwnerKey()
- {
- return $this->ownerKey;
- }
-
- /**
- * Get the fully qualified associated key of the relationship.
- *
- * @return string
- */
- public function getQualifiedOwnerKeyName()
- {
- return $this->related->qualifyColumn($this->ownerKey);
- }
-
- /**
- * Get the name of the relationship.
- *
- * @return string
- */
- public function getRelation()
- {
- return $this->relation;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php
deleted file mode 100755
index 2eebe42..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php
+++ /dev/null
@@ -1,1111 +0,0 @@
-table = $table;
- $this->parentKey = $parentKey;
- $this->relatedKey = $relatedKey;
- $this->relationName = $relationName;
- $this->relatedPivotKey = $relatedPivotKey;
- $this->foreignPivotKey = $foreignPivotKey;
-
- parent::__construct($query, $parent);
- }
-
- /**
- * Set the base constraints on the relation query.
- *
- * @return void
- */
- public function addConstraints()
- {
- $this->performJoin();
-
- if (static::$constraints) {
- $this->addWhereConstraints();
- }
- }
-
- /**
- * Set the join clause for the relation query.
- *
- * @param \Illuminate\Database\Eloquent\Builder|null $query
- * @return $this
- */
- protected function performJoin($query = null)
- {
- $query = $query ?: $this->query;
-
- // We need to join to the intermediate table on the related model's primary
- // key column with the intermediate table's foreign key for the related
- // model instance. Then we can set the "where" for the parent models.
- $baseTable = $this->related->getTable();
-
- $key = $baseTable.'.'.$this->relatedKey;
-
- $query->join($this->table, $key, '=', $this->getQualifiedRelatedPivotKeyName());
-
- return $this;
- }
-
- /**
- * Set the where clause for the relation query.
- *
- * @return $this
- */
- protected function addWhereConstraints()
- {
- $this->query->where(
- $this->getQualifiedForeignPivotKeyName(), '=', $this->parent->{$this->parentKey}
- );
-
- return $this;
- }
-
- /**
- * Set the constraints for an eager load of the relation.
- *
- * @param array $models
- * @return void
- */
- public function addEagerConstraints(array $models)
- {
- $whereIn = $this->whereInMethod($this->parent, $this->parentKey);
-
- $this->query->{$whereIn}(
- $this->getQualifiedForeignPivotKeyName(),
- $this->getKeys($models, $this->parentKey)
- );
- }
-
- /**
- * Initialize the relation on a set of models.
- *
- * @param array $models
- * @param string $relation
- * @return array
- */
- public function initRelation(array $models, $relation)
- {
- foreach ($models as $model) {
- $model->setRelation($relation, $this->related->newCollection());
- }
-
- return $models;
- }
-
- /**
- * Match the eagerly loaded results to their parents.
- *
- * @param array $models
- * @param \Illuminate\Database\Eloquent\Collection $results
- * @param string $relation
- * @return array
- */
- public function match(array $models, Collection $results, $relation)
- {
- $dictionary = $this->buildDictionary($results);
-
- // Once we have an array dictionary of child objects we can easily match the
- // children back to their parent using the dictionary and the keys on the
- // the parent models. Then we will return the hydrated models back out.
- foreach ($models as $model) {
- if (isset($dictionary[$key = $model->{$this->parentKey}])) {
- $model->setRelation(
- $relation, $this->related->newCollection($dictionary[$key])
- );
- }
- }
-
- return $models;
- }
-
- /**
- * Build model dictionary keyed by the relation's foreign key.
- *
- * @param \Illuminate\Database\Eloquent\Collection $results
- * @return array
- */
- protected function buildDictionary(Collection $results)
- {
- // First we will build a dictionary of child models keyed by the foreign key
- // of the relation so that we will easily and quickly match them to their
- // parents without having a possibly slow inner loops for every models.
- $dictionary = [];
-
- foreach ($results as $result) {
- $dictionary[$result->{$this->accessor}->{$this->foreignPivotKey}][] = $result;
- }
-
- return $dictionary;
- }
-
- /**
- * Get the class being used for pivot models.
- *
- * @return string
- */
- public function getPivotClass()
- {
- return $this->using ?? Pivot::class;
- }
-
- /**
- * Specify the custom pivot model to use for the relationship.
- *
- * @param string $class
- * @return $this
- */
- public function using($class)
- {
- $this->using = $class;
-
- return $this;
- }
-
- /**
- * Specify the custom pivot accessor to use for the relationship.
- *
- * @param string $accessor
- * @return $this
- */
- public function as($accessor)
- {
- $this->accessor = $accessor;
-
- return $this;
- }
-
- /**
- * Set a where clause for a pivot table column.
- *
- * @param string $column
- * @param string $operator
- * @param mixed $value
- * @param string $boolean
- * @return $this
- */
- public function wherePivot($column, $operator = null, $value = null, $boolean = 'and')
- {
- $this->pivotWheres[] = func_get_args();
-
- return $this->where($this->table.'.'.$column, $operator, $value, $boolean);
- }
-
- /**
- * Set a "where in" clause for a pivot table column.
- *
- * @param string $column
- * @param mixed $values
- * @param string $boolean
- * @param bool $not
- * @return $this
- */
- public function wherePivotIn($column, $values, $boolean = 'and', $not = false)
- {
- $this->pivotWhereIns[] = func_get_args();
-
- return $this->whereIn($this->table.'.'.$column, $values, $boolean, $not);
- }
-
- /**
- * Set an "or where" clause for a pivot table column.
- *
- * @param string $column
- * @param string $operator
- * @param mixed $value
- * @return $this
- */
- public function orWherePivot($column, $operator = null, $value = null)
- {
- return $this->wherePivot($column, $operator, $value, 'or');
- }
-
- /**
- * Set a where clause for a pivot table column.
- *
- * In addition, new pivot records will receive this value.
- *
- * @param string|array $column
- * @param mixed $value
- * @return $this
- */
- public function withPivotValue($column, $value = null)
- {
- if (is_array($column)) {
- foreach ($column as $name => $value) {
- $this->withPivotValue($name, $value);
- }
-
- return $this;
- }
-
- if (is_null($value)) {
- throw new InvalidArgumentException('The provided value may not be null.');
- }
-
- $this->pivotValues[] = compact('column', 'value');
-
- return $this->wherePivot($column, '=', $value);
- }
-
- /**
- * Set an "or where in" clause for a pivot table column.
- *
- * @param string $column
- * @param mixed $values
- * @return $this
- */
- public function orWherePivotIn($column, $values)
- {
- return $this->wherePivotIn($column, $values, 'or');
- }
-
- /**
- * Find a related model by its primary key or return new instance of the related model.
- *
- * @param mixed $id
- * @param array $columns
- * @return \Illuminate\Support\Collection|\Illuminate\Database\Eloquent\Model
- */
- public function findOrNew($id, $columns = ['*'])
- {
- if (is_null($instance = $this->find($id, $columns))) {
- $instance = $this->related->newInstance();
- }
-
- return $instance;
- }
-
- /**
- * Get the first related model record matching the attributes or instantiate it.
- *
- * @param array $attributes
- * @return \Illuminate\Database\Eloquent\Model
- */
- public function firstOrNew(array $attributes)
- {
- if (is_null($instance = $this->where($attributes)->first())) {
- $instance = $this->related->newInstance($attributes);
- }
-
- return $instance;
- }
-
- /**
- * Get the first related record matching the attributes or create it.
- *
- * @param array $attributes
- * @param array $joining
- * @param bool $touch
- * @return \Illuminate\Database\Eloquent\Model
- */
- public function firstOrCreate(array $attributes, array $joining = [], $touch = true)
- {
- if (is_null($instance = $this->where($attributes)->first())) {
- $instance = $this->create($attributes, $joining, $touch);
- }
-
- return $instance;
- }
-
- /**
- * Create or update a related record matching the attributes, and fill it with values.
- *
- * @param array $attributes
- * @param array $values
- * @param array $joining
- * @param bool $touch
- * @return \Illuminate\Database\Eloquent\Model
- */
- public function updateOrCreate(array $attributes, array $values = [], array $joining = [], $touch = true)
- {
- if (is_null($instance = $this->where($attributes)->first())) {
- return $this->create($values, $joining, $touch);
- }
-
- $instance->fill($values);
-
- $instance->save(['touch' => false]);
-
- return $instance;
- }
-
- /**
- * Find a related model by its primary key.
- *
- * @param mixed $id
- * @param array $columns
- * @return \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection|null
- */
- public function find($id, $columns = ['*'])
- {
- return is_array($id) ? $this->findMany($id, $columns) : $this->where(
- $this->getRelated()->getQualifiedKeyName(), '=', $id
- )->first($columns);
- }
-
- /**
- * Find multiple related models by their primary keys.
- *
- * @param mixed $ids
- * @param array $columns
- * @return \Illuminate\Database\Eloquent\Collection
- */
- public function findMany($ids, $columns = ['*'])
- {
- return empty($ids) ? $this->getRelated()->newCollection() : $this->whereIn(
- $this->getRelated()->getQualifiedKeyName(), $ids
- )->get($columns);
- }
-
- /**
- * Find a related model by its primary key or throw an exception.
- *
- * @param mixed $id
- * @param array $columns
- * @return \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection
- *
- * @throws \Illuminate\Database\Eloquent\ModelNotFoundException
- */
- public function findOrFail($id, $columns = ['*'])
- {
- $result = $this->find($id, $columns);
-
- if (is_array($id)) {
- if (count($result) === count(array_unique($id))) {
- return $result;
- }
- } elseif (! is_null($result)) {
- return $result;
- }
-
- throw (new ModelNotFoundException)->setModel(get_class($this->related), $id);
- }
-
- /**
- * Execute the query and get the first result.
- *
- * @param array $columns
- * @return mixed
- */
- public function first($columns = ['*'])
- {
- $results = $this->take(1)->get($columns);
-
- return count($results) > 0 ? $results->first() : null;
- }
-
- /**
- * Execute the query and get the first result or throw an exception.
- *
- * @param array $columns
- * @return \Illuminate\Database\Eloquent\Model|static
- *
- * @throws \Illuminate\Database\Eloquent\ModelNotFoundException
- */
- public function firstOrFail($columns = ['*'])
- {
- if (! is_null($model = $this->first($columns))) {
- return $model;
- }
-
- throw (new ModelNotFoundException)->setModel(get_class($this->related));
- }
-
- /**
- * Get the results of the relationship.
- *
- * @return mixed
- */
- public function getResults()
- {
- return ! is_null($this->parent->{$this->parentKey})
- ? $this->get()
- : $this->related->newCollection();
- }
-
- /**
- * Execute the query as a "select" statement.
- *
- * @param array $columns
- * @return \Illuminate\Database\Eloquent\Collection
- */
- public function get($columns = ['*'])
- {
- // First we'll add the proper select columns onto the query so it is run with
- // the proper columns. Then, we will get the results and hydrate out pivot
- // models with the result of those columns as a separate model relation.
- $builder = $this->query->applyScopes();
-
- $columns = $builder->getQuery()->columns ? [] : $columns;
-
- $models = $builder->addSelect(
- $this->shouldSelect($columns)
- )->getModels();
-
- $this->hydratePivotRelation($models);
-
- // If we actually found models we will also eager load any relationships that
- // have been specified as needing to be eager loaded. This will solve the
- // n + 1 query problem for the developer and also increase performance.
- if (count($models) > 0) {
- $models = $builder->eagerLoadRelations($models);
- }
-
- return $this->related->newCollection($models);
- }
-
- /**
- * Get the select columns for the relation query.
- *
- * @param array $columns
- * @return array
- */
- protected function shouldSelect(array $columns = ['*'])
- {
- if ($columns == ['*']) {
- $columns = [$this->related->getTable().'.*'];
- }
-
- return array_merge($columns, $this->aliasedPivotColumns());
- }
-
- /**
- * Get the pivot columns for the relation.
- *
- * "pivot_" is prefixed ot each column for easy removal later.
- *
- * @return array
- */
- protected function aliasedPivotColumns()
- {
- $defaults = [$this->foreignPivotKey, $this->relatedPivotKey];
-
- return collect(array_merge($defaults, $this->pivotColumns))->map(function ($column) {
- return $this->table.'.'.$column.' as pivot_'.$column;
- })->unique()->all();
- }
-
- /**
- * Get a paginator for the "select" statement.
- *
- * @param int $perPage
- * @param array $columns
- * @param string $pageName
- * @param int|null $page
- * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator
- */
- public function paginate($perPage = null, $columns = ['*'], $pageName = 'page', $page = null)
- {
- $this->query->addSelect($this->shouldSelect($columns));
-
- return tap($this->query->paginate($perPage, $columns, $pageName, $page), function ($paginator) {
- $this->hydratePivotRelation($paginator->items());
- });
- }
-
- /**
- * Paginate the given query into a simple paginator.
- *
- * @param int $perPage
- * @param array $columns
- * @param string $pageName
- * @param int|null $page
- * @return \Illuminate\Contracts\Pagination\Paginator
- */
- public function simplePaginate($perPage = null, $columns = ['*'], $pageName = 'page', $page = null)
- {
- $this->query->addSelect($this->shouldSelect($columns));
-
- return tap($this->query->simplePaginate($perPage, $columns, $pageName, $page), function ($paginator) {
- $this->hydratePivotRelation($paginator->items());
- });
- }
-
- /**
- * Chunk the results of the query.
- *
- * @param int $count
- * @param callable $callback
- * @return bool
- */
- public function chunk($count, callable $callback)
- {
- $this->query->addSelect($this->shouldSelect());
-
- return $this->query->chunk($count, function ($results) use ($callback) {
- $this->hydratePivotRelation($results->all());
-
- return $callback($results);
- });
- }
-
- /**
- * Chunk the results of a query by comparing numeric IDs.
- *
- * @param int $count
- * @param callable $callback
- * @param string|null $column
- * @param string|null $alias
- * @return bool
- */
- public function chunkById($count, callable $callback, $column = null, $alias = null)
- {
- $this->query->addSelect($this->shouldSelect());
-
- $column = $column ?? $this->getRelated()->qualifyColumn(
- $this->getRelatedKeyName()
- );
-
- $alias = $alias ?? $this->getRelatedKeyName();
-
- return $this->query->chunkById($count, function ($results) use ($callback) {
- $this->hydratePivotRelation($results->all());
-
- return $callback($results);
- }, $column, $alias);
- }
-
- /**
- * Execute a callback over each item while chunking.
- *
- * @param callable $callback
- * @param int $count
- * @return bool
- */
- public function each(callable $callback, $count = 1000)
- {
- return $this->chunk($count, function ($results) use ($callback) {
- foreach ($results as $key => $value) {
- if ($callback($value, $key) === false) {
- return false;
- }
- }
- });
- }
-
- /**
- * Hydrate the pivot table relationship on the models.
- *
- * @param array $models
- * @return void
- */
- protected function hydratePivotRelation(array $models)
- {
- // To hydrate the pivot relationship, we will just gather the pivot attributes
- // and create a new Pivot model, which is basically a dynamic model that we
- // will set the attributes, table, and connections on it so it will work.
- foreach ($models as $model) {
- $model->setRelation($this->accessor, $this->newExistingPivot(
- $this->migratePivotAttributes($model)
- ));
- }
- }
-
- /**
- * Get the pivot attributes from a model.
- *
- * @param \Illuminate\Database\Eloquent\Model $model
- * @return array
- */
- protected function migratePivotAttributes(Model $model)
- {
- $values = [];
-
- foreach ($model->getAttributes() as $key => $value) {
- // To get the pivots attributes we will just take any of the attributes which
- // begin with "pivot_" and add those to this arrays, as well as unsetting
- // them from the parent's models since they exist in a different table.
- if (strpos($key, 'pivot_') === 0) {
- $values[substr($key, 6)] = $value;
-
- unset($model->$key);
- }
- }
-
- return $values;
- }
-
- /**
- * If we're touching the parent model, touch.
- *
- * @return void
- */
- public function touchIfTouching()
- {
- if ($this->touchingParent()) {
- $this->getParent()->touch();
- }
-
- if ($this->getParent()->touches($this->relationName)) {
- $this->touch();
- }
- }
-
- /**
- * Determine if we should touch the parent on sync.
- *
- * @return bool
- */
- protected function touchingParent()
- {
- return $this->getRelated()->touches($this->guessInverseRelation());
- }
-
- /**
- * Attempt to guess the name of the inverse of the relation.
- *
- * @return string
- */
- protected function guessInverseRelation()
- {
- return Str::camel(Str::plural(class_basename($this->getParent())));
- }
-
- /**
- * Touch all of the related models for the relationship.
- *
- * E.g.: Touch all roles associated with this user.
- *
- * @return void
- */
- public function touch()
- {
- $key = $this->getRelated()->getKeyName();
-
- $columns = [
- $this->related->getUpdatedAtColumn() => $this->related->freshTimestampString(),
- ];
-
- // If we actually have IDs for the relation, we will run the query to update all
- // the related model's timestamps, to make sure these all reflect the changes
- // to the parent models. This will help us keep any caching synced up here.
- if (count($ids = $this->allRelatedIds()) > 0) {
- $this->getRelated()->newModelQuery()->whereIn($key, $ids)->update($columns);
- }
- }
-
- /**
- * Get all of the IDs for the related models.
- *
- * @return \Illuminate\Support\Collection
- */
- public function allRelatedIds()
- {
- return $this->newPivotQuery()->pluck($this->relatedPivotKey);
- }
-
- /**
- * Save a new model and attach it to the parent model.
- *
- * @param \Illuminate\Database\Eloquent\Model $model
- * @param array $pivotAttributes
- * @param bool $touch
- * @return \Illuminate\Database\Eloquent\Model
- */
- public function save(Model $model, array $pivotAttributes = [], $touch = true)
- {
- $model->save(['touch' => false]);
-
- $this->attach($model, $pivotAttributes, $touch);
-
- return $model;
- }
-
- /**
- * Save an array of new models and attach them to the parent model.
- *
- * @param \Illuminate\Support\Collection|array $models
- * @param array $pivotAttributes
- * @return array
- */
- public function saveMany($models, array $pivotAttributes = [])
- {
- foreach ($models as $key => $model) {
- $this->save($model, (array) ($pivotAttributes[$key] ?? []), false);
- }
-
- $this->touchIfTouching();
-
- return $models;
- }
-
- /**
- * Create a new instance of the related model.
- *
- * @param array $attributes
- * @param array $joining
- * @param bool $touch
- * @return \Illuminate\Database\Eloquent\Model
- */
- public function create(array $attributes = [], array $joining = [], $touch = true)
- {
- $instance = $this->related->newInstance($attributes);
-
- // Once we save the related model, we need to attach it to the base model via
- // through intermediate table so we'll use the existing "attach" method to
- // accomplish this which will insert the record and any more attributes.
- $instance->save(['touch' => false]);
-
- $this->attach($instance, $joining, $touch);
-
- return $instance;
- }
-
- /**
- * Create an array of new instances of the related models.
- *
- * @param array $records
- * @param array $joinings
- * @return array
- */
- public function createMany(array $records, array $joinings = [])
- {
- $instances = [];
-
- foreach ($records as $key => $record) {
- $instances[] = $this->create($record, (array) ($joinings[$key] ?? []), false);
- }
-
- $this->touchIfTouching();
-
- return $instances;
- }
-
- /**
- * Add the constraints for a relationship query.
- *
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @param \Illuminate\Database\Eloquent\Builder $parentQuery
- * @param array|mixed $columns
- * @return \Illuminate\Database\Eloquent\Builder
- */
- public function getRelationExistenceQuery(Builder $query, Builder $parentQuery, $columns = ['*'])
- {
- if ($parentQuery->getQuery()->from == $query->getQuery()->from) {
- return $this->getRelationExistenceQueryForSelfJoin($query, $parentQuery, $columns);
- }
-
- $this->performJoin($query);
-
- return parent::getRelationExistenceQuery($query, $parentQuery, $columns);
- }
-
- /**
- * Add the constraints for a relationship query on the same table.
- *
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @param \Illuminate\Database\Eloquent\Builder $parentQuery
- * @param array|mixed $columns
- * @return \Illuminate\Database\Eloquent\Builder
- */
- public function getRelationExistenceQueryForSelfJoin(Builder $query, Builder $parentQuery, $columns = ['*'])
- {
- $query->select($columns);
-
- $query->from($this->related->getTable().' as '.$hash = $this->getRelationCountHash());
-
- $this->related->setTable($hash);
-
- $this->performJoin($query);
-
- return parent::getRelationExistenceQuery($query, $parentQuery, $columns);
- }
-
- /**
- * Get the key for comparing against the parent key in "has" query.
- *
- * @return string
- */
- public function getExistenceCompareKey()
- {
- return $this->getQualifiedForeignPivotKeyName();
- }
-
- /**
- * Get a relationship join table hash.
- *
- * @return string
- */
- public function getRelationCountHash()
- {
- return 'laravel_reserved_'.static::$selfJoinCount++;
- }
-
- /**
- * Specify that the pivot table has creation and update timestamps.
- *
- * @param mixed $createdAt
- * @param mixed $updatedAt
- * @return $this
- */
- public function withTimestamps($createdAt = null, $updatedAt = null)
- {
- $this->withTimestamps = true;
-
- $this->pivotCreatedAt = $createdAt;
- $this->pivotUpdatedAt = $updatedAt;
-
- return $this->withPivot($this->createdAt(), $this->updatedAt());
- }
-
- /**
- * Get the name of the "created at" column.
- *
- * @return string
- */
- public function createdAt()
- {
- return $this->pivotCreatedAt ?: $this->parent->getCreatedAtColumn();
- }
-
- /**
- * Get the name of the "updated at" column.
- *
- * @return string
- */
- public function updatedAt()
- {
- return $this->pivotUpdatedAt ?: $this->parent->getUpdatedAtColumn();
- }
-
- /**
- * Get the foreign key for the relation.
- *
- * @return string
- */
- public function getForeignPivotKeyName()
- {
- return $this->foreignPivotKey;
- }
-
- /**
- * Get the fully qualified foreign key for the relation.
- *
- * @return string
- */
- public function getQualifiedForeignPivotKeyName()
- {
- return $this->table.'.'.$this->foreignPivotKey;
- }
-
- /**
- * Get the "related key" for the relation.
- *
- * @return string
- */
- public function getRelatedPivotKeyName()
- {
- return $this->relatedPivotKey;
- }
-
- /**
- * Get the fully qualified "related key" for the relation.
- *
- * @return string
- */
- public function getQualifiedRelatedPivotKeyName()
- {
- return $this->table.'.'.$this->relatedPivotKey;
- }
-
- /**
- * Get the parent key for the relationship.
- *
- * @return string
- */
- public function getParentKeyName()
- {
- return $this->parentKey;
- }
-
- /**
- * Get the fully qualified parent key name for the relation.
- *
- * @return string
- */
- public function getQualifiedParentKeyName()
- {
- return $this->parent->qualifyColumn($this->parentKey);
- }
-
- /**
- * Get the related key for the relationship.
- *
- * @return string
- */
- public function getRelatedKeyName()
- {
- return $this->relatedKey;
- }
-
- /**
- * Get the intermediate table for the relationship.
- *
- * @return string
- */
- public function getTable()
- {
- return $this->table;
- }
-
- /**
- * Get the relationship name for the relationship.
- *
- * @return string
- */
- public function getRelationName()
- {
- return $this->relationName;
- }
-
- /**
- * Get the name of the pivot accessor for this relationship.
- *
- * @return string
- */
- public function getPivotAccessor()
- {
- return $this->accessor;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/AsPivot.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/AsPivot.php
deleted file mode 100644
index 58f5430..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/AsPivot.php
+++ /dev/null
@@ -1,295 +0,0 @@
-setConnection($parent->getConnectionName())
- ->setTable($table)
- ->forceFill($attributes)
- ->syncOriginal();
-
- // We store off the parent instance so we will access the timestamp column names
- // for the model, since the pivot model timestamps aren't easily configurable
- // from the developer's point of view. We can use the parents to get these.
- $instance->pivotParent = $parent;
-
- $instance->exists = $exists;
-
- $instance->timestamps = $instance->hasTimestampAttributes();
-
- return $instance;
- }
-
- /**
- * Create a new pivot model from raw values returned from a query.
- *
- * @param \Illuminate\Database\Eloquent\Model $parent
- * @param array $attributes
- * @param string $table
- * @param bool $exists
- * @return static
- */
- public static function fromRawAttributes(Model $parent, $attributes, $table, $exists = false)
- {
- $instance = static::fromAttributes($parent, [], $table, $exists);
-
- $instance->setRawAttributes($attributes, true);
-
- $instance->timestamps = $instance->hasTimestampAttributes();
-
- return $instance;
- }
-
- /**
- * Set the keys for a save update query.
- *
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @return \Illuminate\Database\Eloquent\Builder
- */
- protected function setKeysForSaveQuery(Builder $query)
- {
- if (isset($this->attributes[$this->getKeyName()])) {
- return parent::setKeysForSaveQuery($query);
- }
-
- $query->where($this->foreignKey, $this->getOriginal(
- $this->foreignKey, $this->getAttribute($this->foreignKey)
- ));
-
- return $query->where($this->relatedKey, $this->getOriginal(
- $this->relatedKey, $this->getAttribute($this->relatedKey)
- ));
- }
-
- /**
- * Delete the pivot model record from the database.
- *
- * @return int
- */
- public function delete()
- {
- if (isset($this->attributes[$this->getKeyName()])) {
- return parent::delete();
- }
-
- return $this->getDeleteQuery()->delete();
- }
-
- /**
- * Get the query builder for a delete operation on the pivot.
- *
- * @return \Illuminate\Database\Eloquent\Builder
- */
- protected function getDeleteQuery()
- {
- return $this->newModelQuery()->where([
- $this->foreignKey => $this->getOriginal($this->foreignKey, $this->getAttribute($this->foreignKey)),
- $this->relatedKey => $this->getOriginal($this->relatedKey, $this->getAttribute($this->relatedKey)),
- ]);
- }
-
- /**
- * Get the table associated with the model.
- *
- * @return string
- */
- public function getTable()
- {
- if (! isset($this->table)) {
- $this->setTable(str_replace(
- '\\', '', Str::snake(Str::singular(class_basename($this)))
- ));
- }
-
- return $this->table;
- }
-
- /**
- * Get the foreign key column name.
- *
- * @return string
- */
- public function getForeignKey()
- {
- return $this->foreignKey;
- }
-
- /**
- * Get the "related key" column name.
- *
- * @return string
- */
- public function getRelatedKey()
- {
- return $this->relatedKey;
- }
-
- /**
- * Get the "related key" column name.
- *
- * @return string
- */
- public function getOtherKey()
- {
- return $this->getRelatedKey();
- }
-
- /**
- * Set the key names for the pivot model instance.
- *
- * @param string $foreignKey
- * @param string $relatedKey
- * @return $this
- */
- public function setPivotKeys($foreignKey, $relatedKey)
- {
- $this->foreignKey = $foreignKey;
-
- $this->relatedKey = $relatedKey;
-
- return $this;
- }
-
- /**
- * Determine if the pivot model has timestamp attributes.
- *
- * @return bool
- */
- public function hasTimestampAttributes()
- {
- return array_key_exists($this->getCreatedAtColumn(), $this->attributes);
- }
-
- /**
- * Get the name of the "created at" column.
- *
- * @return string
- */
- public function getCreatedAtColumn()
- {
- return $this->pivotParent
- ? $this->pivotParent->getCreatedAtColumn()
- : parent::getCreatedAtColumn();
- }
-
- /**
- * Get the name of the "updated at" column.
- *
- * @return string
- */
- public function getUpdatedAtColumn()
- {
- return $this->pivotParent
- ? $this->pivotParent->getUpdatedAtColumn()
- : parent::getUpdatedAtColumn();
- }
-
- /**
- * Get the queueable identity for the entity.
- *
- * @return mixed
- */
- public function getQueueableId()
- {
- if (isset($this->attributes[$this->getKeyName()])) {
- return $this->getKey();
- }
-
- return sprintf(
- '%s:%s:%s:%s',
- $this->foreignKey, $this->getAttribute($this->foreignKey),
- $this->relatedKey, $this->getAttribute($this->relatedKey)
- );
- }
-
- /**
- * Get a new query to restore one or more models by their queueable IDs.
- *
- * @param array $ids
- * @return \Illuminate\Database\Eloquent\Builder
- */
- public function newQueryForRestoration($ids)
- {
- if (is_array($ids)) {
- return $this->newQueryForCollectionRestoration($ids);
- }
-
- if (! Str::contains($ids, ':')) {
- return parent::newQueryForRestoration($ids);
- }
-
- $segments = explode(':', $ids);
-
- return $this->newQueryWithoutScopes()
- ->where($segments[0], $segments[1])
- ->where($segments[2], $segments[3]);
- }
-
- /**
- * Get a new query to restore multiple models by their queueable IDs.
- *
- * @param array|int $ids
- * @return \Illuminate\Database\Eloquent\Builder
- */
- protected function newQueryForCollectionRestoration(array $ids)
- {
- if (! Str::contains($ids[0], ':')) {
- return parent::newQueryForRestoration($ids);
- }
-
- $query = $this->newQueryWithoutScopes();
-
- foreach ($ids as $id) {
- $segments = explode(':', $id);
-
- $query->orWhere(function ($query) use ($segments) {
- return $query->where($segments[0], $segments[1])
- ->where($segments[2], $segments[3]);
- });
- }
-
- return $query;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php
deleted file mode 100644
index 1984ec6..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php
+++ /dev/null
@@ -1,565 +0,0 @@
- [], 'detached' => [],
- ];
-
- $records = $this->formatRecordsList($this->parseIds($ids));
-
- // Next, we will determine which IDs should get removed from the join table by
- // checking which of the given ID/records is in the list of current records
- // and removing all of those rows from this "intermediate" joining table.
- $detach = array_values(array_intersect(
- $this->newPivotQuery()->pluck($this->relatedPivotKey)->all(),
- array_keys($records)
- ));
-
- if (count($detach) > 0) {
- $this->detach($detach, false);
-
- $changes['detached'] = $this->castKeys($detach);
- }
-
- // Finally, for all of the records which were not "detached", we'll attach the
- // records into the intermediate table. Then, we will add those attaches to
- // this change list and get ready to return these results to the callers.
- $attach = array_diff_key($records, array_flip($detach));
-
- if (count($attach) > 0) {
- $this->attach($attach, [], false);
-
- $changes['attached'] = array_keys($attach);
- }
-
- // Once we have finished attaching or detaching the records, we will see if we
- // have done any attaching or detaching, and if we have we will touch these
- // relationships if they are configured to touch on any database updates.
- if ($touch && (count($changes['attached']) ||
- count($changes['detached']))) {
- $this->touchIfTouching();
- }
-
- return $changes;
- }
-
- /**
- * Sync the intermediate tables with a list of IDs without detaching.
- *
- * @param \Illuminate\Support\Collection|\Illuminate\Database\Eloquent\Model|array $ids
- * @return array
- */
- public function syncWithoutDetaching($ids)
- {
- return $this->sync($ids, false);
- }
-
- /**
- * Sync the intermediate tables with a list of IDs or collection of models.
- *
- * @param \Illuminate\Support\Collection|\Illuminate\Database\Eloquent\Model|array $ids
- * @param bool $detaching
- * @return array
- */
- public function sync($ids, $detaching = true)
- {
- $changes = [
- 'attached' => [], 'detached' => [], 'updated' => [],
- ];
-
- // First we need to attach any of the associated models that are not currently
- // in this joining table. We'll spin through the given IDs, checking to see
- // if they exist in the array of current ones, and if not we will insert.
- $current = $this->newPivotQuery()->pluck(
- $this->relatedPivotKey
- )->all();
-
- $detach = array_diff($current, array_keys(
- $records = $this->formatRecordsList($this->parseIds($ids))
- ));
-
- // Next, we will take the differences of the currents and given IDs and detach
- // all of the entities that exist in the "current" array but are not in the
- // array of the new IDs given to the method which will complete the sync.
- if ($detaching && count($detach) > 0) {
- $this->detach($detach);
-
- $changes['detached'] = $this->castKeys($detach);
- }
-
- // Now we are finally ready to attach the new records. Note that we'll disable
- // touching until after the entire operation is complete so we don't fire a
- // ton of touch operations until we are totally done syncing the records.
- $changes = array_merge(
- $changes, $this->attachNew($records, $current, false)
- );
-
- // Once we have finished attaching or detaching the records, we will see if we
- // have done any attaching or detaching, and if we have we will touch these
- // relationships if they are configured to touch on any database updates.
- if (count($changes['attached']) ||
- count($changes['updated'])) {
- $this->touchIfTouching();
- }
-
- return $changes;
- }
-
- /**
- * Format the sync / toggle record list so that it is keyed by ID.
- *
- * @param array $records
- * @return array
- */
- protected function formatRecordsList(array $records)
- {
- return collect($records)->mapWithKeys(function ($attributes, $id) {
- if (! is_array($attributes)) {
- [$id, $attributes] = [$attributes, []];
- }
-
- return [$id => $attributes];
- })->all();
- }
-
- /**
- * Attach all of the records that aren't in the given current records.
- *
- * @param array $records
- * @param array $current
- * @param bool $touch
- * @return array
- */
- protected function attachNew(array $records, array $current, $touch = true)
- {
- $changes = ['attached' => [], 'updated' => []];
-
- foreach ($records as $id => $attributes) {
- // If the ID is not in the list of existing pivot IDs, we will insert a new pivot
- // record, otherwise, we will just update this existing record on this joining
- // table, so that the developers will easily update these records pain free.
- if (! in_array($id, $current)) {
- $this->attach($id, $attributes, $touch);
-
- $changes['attached'][] = $this->castKey($id);
- }
-
- // Now we'll try to update an existing pivot record with the attributes that were
- // given to the method. If the model is actually updated we will add it to the
- // list of updated pivot records so we return them back out to the consumer.
- elseif (count($attributes) > 0 &&
- $this->updateExistingPivot($id, $attributes, $touch)) {
- $changes['updated'][] = $this->castKey($id);
- }
- }
-
- return $changes;
- }
-
- /**
- * Update an existing pivot record on the table.
- *
- * @param mixed $id
- * @param array $attributes
- * @param bool $touch
- * @return int
- */
- public function updateExistingPivot($id, array $attributes, $touch = true)
- {
- if (in_array($this->updatedAt(), $this->pivotColumns)) {
- $attributes = $this->addTimestampsToAttachment($attributes, true);
- }
-
- $updated = $this->newPivotStatementForId($this->parseId($id))->update(
- $this->castAttributes($attributes)
- );
-
- if ($touch) {
- $this->touchIfTouching();
- }
-
- return $updated;
- }
-
- /**
- * Attach a model to the parent.
- *
- * @param mixed $id
- * @param array $attributes
- * @param bool $touch
- * @return void
- */
- public function attach($id, array $attributes = [], $touch = true)
- {
- // Here we will insert the attachment records into the pivot table. Once we have
- // inserted the records, we will touch the relationships if necessary and the
- // function will return. We can parse the IDs before inserting the records.
- $this->newPivotStatement()->insert($this->formatAttachRecords(
- $this->parseIds($id), $attributes
- ));
-
- if ($touch) {
- $this->touchIfTouching();
- }
- }
-
- /**
- * Create an array of records to insert into the pivot table.
- *
- * @param array $ids
- * @param array $attributes
- * @return array
- */
- protected function formatAttachRecords($ids, array $attributes)
- {
- $records = [];
-
- $hasTimestamps = ($this->hasPivotColumn($this->createdAt()) ||
- $this->hasPivotColumn($this->updatedAt()));
-
- // To create the attachment records, we will simply spin through the IDs given
- // and create a new record to insert for each ID. Each ID may actually be a
- // key in the array, with extra attributes to be placed in other columns.
- foreach ($ids as $key => $value) {
- $records[] = $this->formatAttachRecord(
- $key, $value, $attributes, $hasTimestamps
- );
- }
-
- return $records;
- }
-
- /**
- * Create a full attachment record payload.
- *
- * @param int $key
- * @param mixed $value
- * @param array $attributes
- * @param bool $hasTimestamps
- * @return array
- */
- protected function formatAttachRecord($key, $value, $attributes, $hasTimestamps)
- {
- [$id, $attributes] = $this->extractAttachIdAndAttributes($key, $value, $attributes);
-
- return array_merge(
- $this->baseAttachRecord($id, $hasTimestamps), $this->castAttributes($attributes)
- );
- }
-
- /**
- * Get the attach record ID and extra attributes.
- *
- * @param mixed $key
- * @param mixed $value
- * @param array $attributes
- * @return array
- */
- protected function extractAttachIdAndAttributes($key, $value, array $attributes)
- {
- return is_array($value)
- ? [$key, array_merge($value, $attributes)]
- : [$value, $attributes];
- }
-
- /**
- * Create a new pivot attachment record.
- *
- * @param int $id
- * @param bool $timed
- * @return array
- */
- protected function baseAttachRecord($id, $timed)
- {
- $record[$this->relatedPivotKey] = $id;
-
- $record[$this->foreignPivotKey] = $this->parent->{$this->parentKey};
-
- // If the record needs to have creation and update timestamps, we will make
- // them by calling the parent model's "freshTimestamp" method which will
- // provide us with a fresh timestamp in this model's preferred format.
- if ($timed) {
- $record = $this->addTimestampsToAttachment($record);
- }
-
- foreach ($this->pivotValues as $value) {
- $record[$value['column']] = $value['value'];
- }
-
- return $record;
- }
-
- /**
- * Set the creation and update timestamps on an attach record.
- *
- * @param array $record
- * @param bool $exists
- * @return array
- */
- protected function addTimestampsToAttachment(array $record, $exists = false)
- {
- $fresh = $this->parent->freshTimestamp();
-
- if ($this->using) {
- $pivotModel = new $this->using;
-
- $fresh = $fresh->format($pivotModel->getDateFormat());
- }
-
- if (! $exists && $this->hasPivotColumn($this->createdAt())) {
- $record[$this->createdAt()] = $fresh;
- }
-
- if ($this->hasPivotColumn($this->updatedAt())) {
- $record[$this->updatedAt()] = $fresh;
- }
-
- return $record;
- }
-
- /**
- * Determine whether the given column is defined as a pivot column.
- *
- * @param string $column
- * @return bool
- */
- protected function hasPivotColumn($column)
- {
- return in_array($column, $this->pivotColumns);
- }
-
- /**
- * Detach models from the relationship.
- *
- * @param mixed $ids
- * @param bool $touch
- * @return int
- */
- public function detach($ids = null, $touch = true)
- {
- $query = $this->newPivotQuery();
-
- // If associated IDs were passed to the method we will only delete those
- // associations, otherwise all of the association ties will be broken.
- // We'll return the numbers of affected rows when we do the deletes.
- if (! is_null($ids)) {
- $ids = $this->parseIds($ids);
-
- if (empty($ids)) {
- return 0;
- }
-
- $query->whereIn($this->relatedPivotKey, (array) $ids);
- }
-
- // Once we have all of the conditions set on the statement, we are ready
- // to run the delete on the pivot table. Then, if the touch parameter
- // is true, we will go ahead and touch all related models to sync.
- $results = $query->delete();
-
- if ($touch) {
- $this->touchIfTouching();
- }
-
- return $results;
- }
-
- /**
- * Create a new pivot model instance.
- *
- * @param array $attributes
- * @param bool $exists
- * @return \Illuminate\Database\Eloquent\Relations\Pivot
- */
- public function newPivot(array $attributes = [], $exists = false)
- {
- $pivot = $this->related->newPivot(
- $this->parent, $attributes, $this->table, $exists, $this->using
- );
-
- return $pivot->setPivotKeys($this->foreignPivotKey, $this->relatedPivotKey);
- }
-
- /**
- * Create a new existing pivot model instance.
- *
- * @param array $attributes
- * @return \Illuminate\Database\Eloquent\Relations\Pivot
- */
- public function newExistingPivot(array $attributes = [])
- {
- return $this->newPivot($attributes, true);
- }
-
- /**
- * Get a new plain query builder for the pivot table.
- *
- * @return \Illuminate\Database\Query\Builder
- */
- public function newPivotStatement()
- {
- return $this->query->getQuery()->newQuery()->from($this->table);
- }
-
- /**
- * Get a new pivot statement for a given "other" ID.
- *
- * @param mixed $id
- * @return \Illuminate\Database\Query\Builder
- */
- public function newPivotStatementForId($id)
- {
- return $this->newPivotQuery()->whereIn($this->relatedPivotKey, $this->parseIds($id));
- }
-
- /**
- * Create a new query builder for the pivot table.
- *
- * @return \Illuminate\Database\Query\Builder
- */
- protected function newPivotQuery()
- {
- $query = $this->newPivotStatement();
-
- foreach ($this->pivotWheres as $arguments) {
- call_user_func_array([$query, 'where'], $arguments);
- }
-
- foreach ($this->pivotWhereIns as $arguments) {
- call_user_func_array([$query, 'whereIn'], $arguments);
- }
-
- return $query->where($this->foreignPivotKey, $this->parent->{$this->parentKey});
- }
-
- /**
- * Set the columns on the pivot table to retrieve.
- *
- * @param array|mixed $columns
- * @return $this
- */
- public function withPivot($columns)
- {
- $this->pivotColumns = array_merge(
- $this->pivotColumns, is_array($columns) ? $columns : func_get_args()
- );
-
- return $this;
- }
-
- /**
- * Get all of the IDs from the given mixed value.
- *
- * @param mixed $value
- * @return array
- */
- protected function parseIds($value)
- {
- if ($value instanceof Model) {
- return [$value->{$this->relatedKey}];
- }
-
- if ($value instanceof Collection) {
- return $value->pluck($this->relatedKey)->all();
- }
-
- if ($value instanceof BaseCollection) {
- return $value->toArray();
- }
-
- return (array) $value;
- }
-
- /**
- * Get the ID from the given mixed value.
- *
- * @param mixed $value
- * @return mixed
- */
- protected function parseId($value)
- {
- return $value instanceof Model ? $value->{$this->relatedKey} : $value;
- }
-
- /**
- * Cast the given keys to integers if they are numeric and string otherwise.
- *
- * @param array $keys
- * @return array
- */
- protected function castKeys(array $keys)
- {
- return array_map(function ($v) {
- return $this->castKey($v);
- }, $keys);
- }
-
- /**
- * Cast the given key to convert to primary key type.
- *
- * @param mixed $key
- * @return mixed
- */
- protected function castKey($key)
- {
- return $this->getTypeSwapValue(
- $this->related->getKeyType(),
- $key
- );
- }
-
- /**
- * Cast the given pivot attributes.
- *
- * @param array $attributes
- * @return array
- */
- protected function castAttributes($attributes)
- {
- return $this->using
- ? $this->newPivot()->fill($attributes)->getAttributes()
- : $attributes;
- }
-
- /**
- * Converts a given value to a given type value.
- *
- * @param string $type
- * @param mixed $value
- * @return mixed
- */
- protected function getTypeSwapValue($type, $value)
- {
- switch (strtolower($type)) {
- case 'int':
- case 'integer':
- return (int) $value;
- case 'real':
- case 'float':
- case 'double':
- return (float) $value;
- case 'string':
- return (string) $value;
- default:
- return $value;
- }
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/SupportsDefaultModels.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/SupportsDefaultModels.php
deleted file mode 100644
index 74e758f..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/SupportsDefaultModels.php
+++ /dev/null
@@ -1,63 +0,0 @@
-withDefault = $callback;
-
- return $this;
- }
-
- /**
- * Get the default value for this relation.
- *
- * @param \Illuminate\Database\Eloquent\Model $parent
- * @return \Illuminate\Database\Eloquent\Model|null
- */
- protected function getDefaultFor(Model $parent)
- {
- if (! $this->withDefault) {
- return;
- }
-
- $instance = $this->newRelatedInstanceFor($parent);
-
- if (is_callable($this->withDefault)) {
- return call_user_func($this->withDefault, $instance, $parent) ?: $instance;
- }
-
- if (is_array($this->withDefault)) {
- $instance->forceFill($this->withDefault);
- }
-
- return $instance;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasMany.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasMany.php
deleted file mode 100755
index 8971a7d..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasMany.php
+++ /dev/null
@@ -1,49 +0,0 @@
-getParentKey())
- ? $this->query->get()
- : $this->related->newCollection();
- }
-
- /**
- * Initialize the relation on a set of models.
- *
- * @param array $models
- * @param string $relation
- * @return array
- */
- public function initRelation(array $models, $relation)
- {
- foreach ($models as $model) {
- $model->setRelation($relation, $this->related->newCollection());
- }
-
- return $models;
- }
-
- /**
- * Match the eagerly loaded results to their parents.
- *
- * @param array $models
- * @param \Illuminate\Database\Eloquent\Collection $results
- * @param string $relation
- * @return array
- */
- public function match(array $models, Collection $results, $relation)
- {
- return $this->matchMany($models, $results, $relation);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php
deleted file mode 100644
index 3bb2f33..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php
+++ /dev/null
@@ -1,655 +0,0 @@
-localKey = $localKey;
- $this->firstKey = $firstKey;
- $this->secondKey = $secondKey;
- $this->farParent = $farParent;
- $this->throughParent = $throughParent;
- $this->secondLocalKey = $secondLocalKey;
-
- parent::__construct($query, $throughParent);
- }
-
- /**
- * Set the base constraints on the relation query.
- *
- * @return void
- */
- public function addConstraints()
- {
- $localValue = $this->farParent[$this->localKey];
-
- $this->performJoin();
-
- if (static::$constraints) {
- $this->query->where($this->getQualifiedFirstKeyName(), '=', $localValue);
- }
- }
-
- /**
- * Set the join clause on the query.
- *
- * @param \Illuminate\Database\Eloquent\Builder|null $query
- * @return void
- */
- protected function performJoin(Builder $query = null)
- {
- $query = $query ?: $this->query;
-
- $farKey = $this->getQualifiedFarKeyName();
-
- $query->join($this->throughParent->getTable(), $this->getQualifiedParentKeyName(), '=', $farKey);
-
- if ($this->throughParentSoftDeletes()) {
- $query->whereNull($this->throughParent->getQualifiedDeletedAtColumn());
- }
- }
-
- /**
- * Get the fully qualified parent key name.
- *
- * @return string
- */
- public function getQualifiedParentKeyName()
- {
- return $this->parent->qualifyColumn($this->secondLocalKey);
- }
-
- /**
- * Determine whether "through" parent of the relation uses Soft Deletes.
- *
- * @return bool
- */
- public function throughParentSoftDeletes()
- {
- return in_array(SoftDeletes::class, class_uses_recursive($this->throughParent));
- }
-
- /**
- * Set the constraints for an eager load of the relation.
- *
- * @param array $models
- * @return void
- */
- public function addEagerConstraints(array $models)
- {
- $whereIn = $this->whereInMethod($this->farParent, $this->localKey);
-
- $this->query->{$whereIn}(
- $this->getQualifiedFirstKeyName(), $this->getKeys($models, $this->localKey)
- );
- }
-
- /**
- * Initialize the relation on a set of models.
- *
- * @param array $models
- * @param string $relation
- * @return array
- */
- public function initRelation(array $models, $relation)
- {
- foreach ($models as $model) {
- $model->setRelation($relation, $this->related->newCollection());
- }
-
- return $models;
- }
-
- /**
- * Match the eagerly loaded results to their parents.
- *
- * @param array $models
- * @param \Illuminate\Database\Eloquent\Collection $results
- * @param string $relation
- * @return array
- */
- public function match(array $models, Collection $results, $relation)
- {
- $dictionary = $this->buildDictionary($results);
-
- // Once we have the dictionary we can simply spin through the parent models to
- // link them up with their children using the keyed dictionary to make the
- // matching very convenient and easy work. Then we'll just return them.
- foreach ($models as $model) {
- if (isset($dictionary[$key = $model->getAttribute($this->localKey)])) {
- $model->setRelation(
- $relation, $this->related->newCollection($dictionary[$key])
- );
- }
- }
-
- return $models;
- }
-
- /**
- * Build model dictionary keyed by the relation's foreign key.
- *
- * @param \Illuminate\Database\Eloquent\Collection $results
- * @return array
- */
- protected function buildDictionary(Collection $results)
- {
- $dictionary = [];
-
- // First we will create a dictionary of models keyed by the foreign key of the
- // relationship as this will allow us to quickly access all of the related
- // models without having to do nested looping which will be quite slow.
- foreach ($results as $result) {
- $dictionary[$result->{$this->firstKey}][] = $result;
- }
-
- return $dictionary;
- }
-
- /**
- * Get the first related model record matching the attributes or instantiate it.
- *
- * @param array $attributes
- * @return \Illuminate\Database\Eloquent\Model
- */
- public function firstOrNew(array $attributes)
- {
- if (is_null($instance = $this->where($attributes)->first())) {
- $instance = $this->related->newInstance($attributes);
- }
-
- return $instance;
- }
-
- /**
- * Create or update a related record matching the attributes, and fill it with values.
- *
- * @param array $attributes
- * @param array $values
- * @return \Illuminate\Database\Eloquent\Model
- */
- public function updateOrCreate(array $attributes, array $values = [])
- {
- $instance = $this->firstOrNew($attributes);
-
- $instance->fill($values)->save();
-
- return $instance;
- }
-
- /**
- * Execute the query and get the first related model.
- *
- * @param array $columns
- * @return mixed
- */
- public function first($columns = ['*'])
- {
- $results = $this->take(1)->get($columns);
-
- return count($results) > 0 ? $results->first() : null;
- }
-
- /**
- * Execute the query and get the first result or throw an exception.
- *
- * @param array $columns
- * @return \Illuminate\Database\Eloquent\Model|static
- *
- * @throws \Illuminate\Database\Eloquent\ModelNotFoundException
- */
- public function firstOrFail($columns = ['*'])
- {
- if (! is_null($model = $this->first($columns))) {
- return $model;
- }
-
- throw (new ModelNotFoundException)->setModel(get_class($this->related));
- }
-
- /**
- * Find a related model by its primary key.
- *
- * @param mixed $id
- * @param array $columns
- * @return \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection|null
- */
- public function find($id, $columns = ['*'])
- {
- if (is_array($id)) {
- return $this->findMany($id, $columns);
- }
-
- return $this->where(
- $this->getRelated()->getQualifiedKeyName(), '=', $id
- )->first($columns);
- }
-
- /**
- * Find multiple related models by their primary keys.
- *
- * @param mixed $ids
- * @param array $columns
- * @return \Illuminate\Database\Eloquent\Collection
- */
- public function findMany($ids, $columns = ['*'])
- {
- if (empty($ids)) {
- return $this->getRelated()->newCollection();
- }
-
- return $this->whereIn(
- $this->getRelated()->getQualifiedKeyName(), $ids
- )->get($columns);
- }
-
- /**
- * Find a related model by its primary key or throw an exception.
- *
- * @param mixed $id
- * @param array $columns
- * @return \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection
- *
- * @throws \Illuminate\Database\Eloquent\ModelNotFoundException
- */
- public function findOrFail($id, $columns = ['*'])
- {
- $result = $this->find($id, $columns);
-
- if (is_array($id)) {
- if (count($result) === count(array_unique($id))) {
- return $result;
- }
- } elseif (! is_null($result)) {
- return $result;
- }
-
- throw (new ModelNotFoundException)->setModel(get_class($this->related), $id);
- }
-
- /**
- * Get the results of the relationship.
- *
- * @return mixed
- */
- public function getResults()
- {
- return ! is_null($this->farParent->{$this->localKey})
- ? $this->get()
- : $this->related->newCollection();
- }
-
- /**
- * Execute the query as a "select" statement.
- *
- * @param array $columns
- * @return \Illuminate\Database\Eloquent\Collection
- */
- public function get($columns = ['*'])
- {
- $builder = $this->prepareQueryBuilder($columns);
-
- $models = $builder->getModels();
-
- // If we actually found models we will also eager load any relationships that
- // have been specified as needing to be eager loaded. This will solve the
- // n + 1 query problem for the developer and also increase performance.
- if (count($models) > 0) {
- $models = $builder->eagerLoadRelations($models);
- }
-
- return $this->related->newCollection($models);
- }
-
- /**
- * Get a paginator for the "select" statement.
- *
- * @param int $perPage
- * @param array $columns
- * @param string $pageName
- * @param int $page
- * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator
- */
- public function paginate($perPage = null, $columns = ['*'], $pageName = 'page', $page = null)
- {
- $this->query->addSelect($this->shouldSelect($columns));
-
- return $this->query->paginate($perPage, $columns, $pageName, $page);
- }
-
- /**
- * Paginate the given query into a simple paginator.
- *
- * @param int $perPage
- * @param array $columns
- * @param string $pageName
- * @param int|null $page
- * @return \Illuminate\Contracts\Pagination\Paginator
- */
- public function simplePaginate($perPage = null, $columns = ['*'], $pageName = 'page', $page = null)
- {
- $this->query->addSelect($this->shouldSelect($columns));
-
- return $this->query->simplePaginate($perPage, $columns, $pageName, $page);
- }
-
- /**
- * Set the select clause for the relation query.
- *
- * @param array $columns
- * @return array
- */
- protected function shouldSelect(array $columns = ['*'])
- {
- if ($columns == ['*']) {
- $columns = [$this->related->getTable().'.*'];
- }
-
- return array_merge($columns, [$this->getQualifiedFirstKeyName()]);
- }
-
- /**
- * Chunk the results of the query.
- *
- * @param int $count
- * @param callable $callback
- * @return bool
- */
- public function chunk($count, callable $callback)
- {
- return $this->prepareQueryBuilder()->chunk($count, $callback);
- }
-
- /**
- * Chunk the results of a query by comparing numeric IDs.
- *
- * @param int $count
- * @param callable $callback
- * @param string|null $column
- * @param string|null $alias
- * @return bool
- */
- public function chunkById($count, callable $callback, $column = null, $alias = null)
- {
- $column = $column ?? $this->getRelated()->getQualifiedKeyName();
-
- $alias = $alias ?? $this->getRelated()->getKeyName();
-
- return $this->prepareQueryBuilder()->chunkById($count, $callback, $column, $alias);
- }
-
- /**
- * Get a generator for the given query.
- *
- * @return \Generator
- */
- public function cursor()
- {
- return $this->prepareQueryBuilder()->cursor();
- }
-
- /**
- * Execute a callback over each item while chunking.
- *
- * @param callable $callback
- * @param int $count
- * @return bool
- */
- public function each(callable $callback, $count = 1000)
- {
- return $this->chunk($count, function ($results) use ($callback) {
- foreach ($results as $key => $value) {
- if ($callback($value, $key) === false) {
- return false;
- }
- }
- });
- }
-
- /**
- * Prepare the query builder for query execution.
- *
- * @param array $columns
- * @return \Illuminate\Database\Eloquent\Builder
- */
- protected function prepareQueryBuilder($columns = ['*'])
- {
- $builder = $this->query->applyScopes();
-
- return $builder->addSelect(
- $this->shouldSelect($builder->getQuery()->columns ? [] : $columns)
- );
- }
-
- /**
- * Add the constraints for a relationship query.
- *
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @param \Illuminate\Database\Eloquent\Builder $parentQuery
- * @param array|mixed $columns
- * @return \Illuminate\Database\Eloquent\Builder
- */
- public function getRelationExistenceQuery(Builder $query, Builder $parentQuery, $columns = ['*'])
- {
- if ($parentQuery->getQuery()->from === $query->getQuery()->from) {
- return $this->getRelationExistenceQueryForSelfRelation($query, $parentQuery, $columns);
- }
-
- if ($parentQuery->getQuery()->from === $this->throughParent->getTable()) {
- return $this->getRelationExistenceQueryForThroughSelfRelation($query, $parentQuery, $columns);
- }
-
- $this->performJoin($query);
-
- return $query->select($columns)->whereColumn(
- $this->getQualifiedLocalKeyName(), '=', $this->getQualifiedFirstKeyName()
- );
- }
-
- /**
- * Add the constraints for a relationship query on the same table.
- *
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @param \Illuminate\Database\Eloquent\Builder $parentQuery
- * @param array|mixed $columns
- * @return \Illuminate\Database\Eloquent\Builder
- */
- public function getRelationExistenceQueryForSelfRelation(Builder $query, Builder $parentQuery, $columns = ['*'])
- {
- $query->from($query->getModel()->getTable().' as '.$hash = $this->getRelationCountHash());
-
- $query->join($this->throughParent->getTable(), $this->getQualifiedParentKeyName(), '=', $hash.'.'.$this->secondKey);
-
- if ($this->throughParentSoftDeletes()) {
- $query->whereNull($this->throughParent->getQualifiedDeletedAtColumn());
- }
-
- $query->getModel()->setTable($hash);
-
- return $query->select($columns)->whereColumn(
- $parentQuery->getQuery()->from.'.'.$this->localKey, '=', $this->getQualifiedFirstKeyName()
- );
- }
-
- /**
- * Add the constraints for a relationship query on the same table as the through parent.
- *
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @param \Illuminate\Database\Eloquent\Builder $parentQuery
- * @param array|mixed $columns
- * @return \Illuminate\Database\Eloquent\Builder
- */
- public function getRelationExistenceQueryForThroughSelfRelation(Builder $query, Builder $parentQuery, $columns = ['*'])
- {
- $table = $this->throughParent->getTable().' as '.$hash = $this->getRelationCountHash();
-
- $query->join($table, $hash.'.'.$this->secondLocalKey, '=', $this->getQualifiedFarKeyName());
-
- if ($this->throughParentSoftDeletes()) {
- $query->whereNull($hash.'.'.$this->throughParent->getDeletedAtColumn());
- }
-
- return $query->select($columns)->whereColumn(
- $parentQuery->getQuery()->from.'.'.$this->localKey, '=', $hash.'.'.$this->firstKey
- );
- }
-
- /**
- * Get a relationship join table hash.
- *
- * @return string
- */
- public function getRelationCountHash()
- {
- return 'laravel_reserved_'.static::$selfJoinCount++;
- }
-
- /**
- * Get the qualified foreign key on the related model.
- *
- * @return string
- */
- public function getQualifiedFarKeyName()
- {
- return $this->getQualifiedForeignKeyName();
- }
-
- /**
- * Get the foreign key on the "through" model.
- *
- * @return string
- */
- public function getFirstKeyName()
- {
- return $this->firstKey;
- }
-
- /**
- * Get the qualified foreign key on the "through" model.
- *
- * @return string
- */
- public function getQualifiedFirstKeyName()
- {
- return $this->throughParent->qualifyColumn($this->firstKey);
- }
-
- /**
- * Get the foreign key on the related model.
- *
- * @return string
- */
- public function getForeignKeyName()
- {
- return $this->secondKey;
- }
-
- /**
- * Get the qualified foreign key on the related model.
- *
- * @return string
- */
- public function getQualifiedForeignKeyName()
- {
- return $this->related->qualifyColumn($this->secondKey);
- }
-
- /**
- * Get the local key on the far parent model.
- *
- * @return string
- */
- public function getLocalKeyName()
- {
- return $this->localKey;
- }
-
- /**
- * Get the qualified local key on the far parent model.
- *
- * @return string
- */
- public function getQualifiedLocalKeyName()
- {
- return $this->farParent->qualifyColumn($this->localKey);
- }
-
- /**
- * Get the local key on the intermediary model.
- *
- * @return string
- */
- public function getSecondLocalKeyName()
- {
- return $this->secondLocalKey;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOne.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOne.php
deleted file mode 100755
index e4763ff..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOne.php
+++ /dev/null
@@ -1,68 +0,0 @@
-getParentKey())) {
- return $this->getDefaultFor($this->parent);
- }
-
- return $this->query->first() ?: $this->getDefaultFor($this->parent);
- }
-
- /**
- * Initialize the relation on a set of models.
- *
- * @param array $models
- * @param string $relation
- * @return array
- */
- public function initRelation(array $models, $relation)
- {
- foreach ($models as $model) {
- $model->setRelation($relation, $this->getDefaultFor($model));
- }
-
- return $models;
- }
-
- /**
- * Match the eagerly loaded results to their parents.
- *
- * @param array $models
- * @param \Illuminate\Database\Eloquent\Collection $results
- * @param string $relation
- * @return array
- */
- public function match(array $models, Collection $results, $relation)
- {
- return $this->matchOne($models, $results, $relation);
- }
-
- /**
- * Make a new related instance for the given model.
- *
- * @param \Illuminate\Database\Eloquent\Model $parent
- * @return \Illuminate\Database\Eloquent\Model
- */
- public function newRelatedInstanceFor(Model $parent)
- {
- return $this->related->newInstance()->setAttribute(
- $this->getForeignKeyName(), $parent->{$this->localKey}
- );
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php
deleted file mode 100755
index af59df9..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php
+++ /dev/null
@@ -1,420 +0,0 @@
-localKey = $localKey;
- $this->foreignKey = $foreignKey;
-
- parent::__construct($query, $parent);
- }
-
- /**
- * Create and return an un-saved instance of the related model.
- *
- * @param array $attributes
- * @return \Illuminate\Database\Eloquent\Model
- */
- public function make(array $attributes = [])
- {
- return tap($this->related->newInstance($attributes), function ($instance) {
- $this->setForeignAttributesForCreate($instance);
- });
- }
-
- /**
- * Set the base constraints on the relation query.
- *
- * @return void
- */
- public function addConstraints()
- {
- if (static::$constraints) {
- $this->query->where($this->foreignKey, '=', $this->getParentKey());
-
- $this->query->whereNotNull($this->foreignKey);
- }
- }
-
- /**
- * Set the constraints for an eager load of the relation.
- *
- * @param array $models
- * @return void
- */
- public function addEagerConstraints(array $models)
- {
- $whereIn = $this->whereInMethod($this->parent, $this->localKey);
-
- $this->query->{$whereIn}(
- $this->foreignKey, $this->getKeys($models, $this->localKey)
- );
- }
-
- /**
- * Match the eagerly loaded results to their single parents.
- *
- * @param array $models
- * @param \Illuminate\Database\Eloquent\Collection $results
- * @param string $relation
- * @return array
- */
- public function matchOne(array $models, Collection $results, $relation)
- {
- return $this->matchOneOrMany($models, $results, $relation, 'one');
- }
-
- /**
- * Match the eagerly loaded results to their many parents.
- *
- * @param array $models
- * @param \Illuminate\Database\Eloquent\Collection $results
- * @param string $relation
- * @return array
- */
- public function matchMany(array $models, Collection $results, $relation)
- {
- return $this->matchOneOrMany($models, $results, $relation, 'many');
- }
-
- /**
- * Match the eagerly loaded results to their many parents.
- *
- * @param array $models
- * @param \Illuminate\Database\Eloquent\Collection $results
- * @param string $relation
- * @param string $type
- * @return array
- */
- protected function matchOneOrMany(array $models, Collection $results, $relation, $type)
- {
- $dictionary = $this->buildDictionary($results);
-
- // Once we have the dictionary we can simply spin through the parent models to
- // link them up with their children using the keyed dictionary to make the
- // matching very convenient and easy work. Then we'll just return them.
- foreach ($models as $model) {
- if (isset($dictionary[$key = $model->getAttribute($this->localKey)])) {
- $model->setRelation(
- $relation, $this->getRelationValue($dictionary, $key, $type)
- );
- }
- }
-
- return $models;
- }
-
- /**
- * Get the value of a relationship by one or many type.
- *
- * @param array $dictionary
- * @param string $key
- * @param string $type
- * @return mixed
- */
- protected function getRelationValue(array $dictionary, $key, $type)
- {
- $value = $dictionary[$key];
-
- return $type === 'one' ? reset($value) : $this->related->newCollection($value);
- }
-
- /**
- * Build model dictionary keyed by the relation's foreign key.
- *
- * @param \Illuminate\Database\Eloquent\Collection $results
- * @return array
- */
- protected function buildDictionary(Collection $results)
- {
- $foreign = $this->getForeignKeyName();
-
- return $results->mapToDictionary(function ($result) use ($foreign) {
- return [$result->{$foreign} => $result];
- })->all();
- }
-
- /**
- * Find a model by its primary key or return new instance of the related model.
- *
- * @param mixed $id
- * @param array $columns
- * @return \Illuminate\Support\Collection|\Illuminate\Database\Eloquent\Model
- */
- public function findOrNew($id, $columns = ['*'])
- {
- if (is_null($instance = $this->find($id, $columns))) {
- $instance = $this->related->newInstance();
-
- $this->setForeignAttributesForCreate($instance);
- }
-
- return $instance;
- }
-
- /**
- * Get the first related model record matching the attributes or instantiate it.
- *
- * @param array $attributes
- * @param array $values
- * @return \Illuminate\Database\Eloquent\Model
- */
- public function firstOrNew(array $attributes, array $values = [])
- {
- if (is_null($instance = $this->where($attributes)->first())) {
- $instance = $this->related->newInstance($attributes + $values);
-
- $this->setForeignAttributesForCreate($instance);
- }
-
- return $instance;
- }
-
- /**
- * Get the first related record matching the attributes or create it.
- *
- * @param array $attributes
- * @param array $values
- * @return \Illuminate\Database\Eloquent\Model
- */
- public function firstOrCreate(array $attributes, array $values = [])
- {
- if (is_null($instance = $this->where($attributes)->first())) {
- $instance = $this->create($attributes + $values);
- }
-
- return $instance;
- }
-
- /**
- * Create or update a related record matching the attributes, and fill it with values.
- *
- * @param array $attributes
- * @param array $values
- * @return \Illuminate\Database\Eloquent\Model
- */
- public function updateOrCreate(array $attributes, array $values = [])
- {
- return tap($this->firstOrNew($attributes), function ($instance) use ($values) {
- $instance->fill($values);
-
- $instance->save();
- });
- }
-
- /**
- * Attach a model instance to the parent model.
- *
- * @param \Illuminate\Database\Eloquent\Model $model
- * @return \Illuminate\Database\Eloquent\Model|false
- */
- public function save(Model $model)
- {
- $this->setForeignAttributesForCreate($model);
-
- return $model->save() ? $model : false;
- }
-
- /**
- * Attach a collection of models to the parent instance.
- *
- * @param iterable $models
- * @return iterable
- */
- public function saveMany($models)
- {
- foreach ($models as $model) {
- $this->save($model);
- }
-
- return $models;
- }
-
- /**
- * Create a new instance of the related model.
- *
- * @param array $attributes
- * @return \Illuminate\Database\Eloquent\Model
- */
- public function create(array $attributes = [])
- {
- return tap($this->related->newInstance($attributes), function ($instance) {
- $this->setForeignAttributesForCreate($instance);
-
- $instance->save();
- });
- }
-
- /**
- * Create a Collection of new instances of the related model.
- *
- * @param array $records
- * @return \Illuminate\Database\Eloquent\Collection
- */
- public function createMany(array $records)
- {
- $instances = $this->related->newCollection();
-
- foreach ($records as $record) {
- $instances->push($this->create($record));
- }
-
- return $instances;
- }
-
- /**
- * Set the foreign ID for creating a related model.
- *
- * @param \Illuminate\Database\Eloquent\Model $model
- * @return void
- */
- protected function setForeignAttributesForCreate(Model $model)
- {
- $model->setAttribute($this->getForeignKeyName(), $this->getParentKey());
- }
-
- /**
- * Add the constraints for a relationship query.
- *
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @param \Illuminate\Database\Eloquent\Builder $parentQuery
- * @param array|mixed $columns
- * @return \Illuminate\Database\Eloquent\Builder
- */
- public function getRelationExistenceQuery(Builder $query, Builder $parentQuery, $columns = ['*'])
- {
- if ($query->getQuery()->from == $parentQuery->getQuery()->from) {
- return $this->getRelationExistenceQueryForSelfRelation($query, $parentQuery, $columns);
- }
-
- return parent::getRelationExistenceQuery($query, $parentQuery, $columns);
- }
-
- /**
- * Add the constraints for a relationship query on the same table.
- *
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @param \Illuminate\Database\Eloquent\Builder $parentQuery
- * @param array|mixed $columns
- * @return \Illuminate\Database\Eloquent\Builder
- */
- public function getRelationExistenceQueryForSelfRelation(Builder $query, Builder $parentQuery, $columns = ['*'])
- {
- $query->from($query->getModel()->getTable().' as '.$hash = $this->getRelationCountHash());
-
- $query->getModel()->setTable($hash);
-
- return $query->select($columns)->whereColumn(
- $this->getQualifiedParentKeyName(), '=', $hash.'.'.$this->getForeignKeyName()
- );
- }
-
- /**
- * Get a relationship join table hash.
- *
- * @return string
- */
- public function getRelationCountHash()
- {
- return 'laravel_reserved_'.static::$selfJoinCount++;
- }
-
- /**
- * Get the key for comparing against the parent key in "has" query.
- *
- * @return string
- */
- public function getExistenceCompareKey()
- {
- return $this->getQualifiedForeignKeyName();
- }
-
- /**
- * Get the key value of the parent's local key.
- *
- * @return mixed
- */
- public function getParentKey()
- {
- return $this->parent->getAttribute($this->localKey);
- }
-
- /**
- * Get the fully qualified parent key name.
- *
- * @return string
- */
- public function getQualifiedParentKeyName()
- {
- return $this->parent->qualifyColumn($this->localKey);
- }
-
- /**
- * Get the plain foreign key.
- *
- * @return string
- */
- public function getForeignKeyName()
- {
- $segments = explode('.', $this->getQualifiedForeignKeyName());
-
- return end($segments);
- }
-
- /**
- * Get the foreign key for the relationship.
- *
- * @return string
- */
- public function getQualifiedForeignKeyName()
- {
- return $this->foreignKey;
- }
-
- /**
- * Get the local key for the relationship.
- *
- * @return string
- */
- public function getLocalKeyName()
- {
- return $this->localKey;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphMany.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphMany.php
deleted file mode 100755
index a4c6376..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphMany.php
+++ /dev/null
@@ -1,49 +0,0 @@
-getParentKey())
- ? $this->query->get()
- : $this->related->newCollection();
- }
-
- /**
- * Initialize the relation on a set of models.
- *
- * @param array $models
- * @param string $relation
- * @return array
- */
- public function initRelation(array $models, $relation)
- {
- foreach ($models as $model) {
- $model->setRelation($relation, $this->related->newCollection());
- }
-
- return $models;
- }
-
- /**
- * Match the eagerly loaded results to their parents.
- *
- * @param array $models
- * @param \Illuminate\Database\Eloquent\Collection $results
- * @param string $relation
- * @return array
- */
- public function match(array $models, Collection $results, $relation)
- {
- return $this->matchMany($models, $results, $relation);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOne.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOne.php
deleted file mode 100755
index 0327ffa..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOne.php
+++ /dev/null
@@ -1,68 +0,0 @@
-getParentKey())) {
- return $this->getDefaultFor($this->parent);
- }
-
- return $this->query->first() ?: $this->getDefaultFor($this->parent);
- }
-
- /**
- * Initialize the relation on a set of models.
- *
- * @param array $models
- * @param string $relation
- * @return array
- */
- public function initRelation(array $models, $relation)
- {
- foreach ($models as $model) {
- $model->setRelation($relation, $this->getDefaultFor($model));
- }
-
- return $models;
- }
-
- /**
- * Match the eagerly loaded results to their parents.
- *
- * @param array $models
- * @param \Illuminate\Database\Eloquent\Collection $results
- * @param string $relation
- * @return array
- */
- public function match(array $models, Collection $results, $relation)
- {
- return $this->matchOne($models, $results, $relation);
- }
-
- /**
- * Make a new related instance for the given model.
- *
- * @param \Illuminate\Database\Eloquent\Model $parent
- * @return \Illuminate\Database\Eloquent\Model
- */
- public function newRelatedInstanceFor(Model $parent)
- {
- return $this->related->newInstance()
- ->setAttribute($this->getForeignKeyName(), $parent->{$this->localKey})
- ->setAttribute($this->getMorphType(), $this->morphClass);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOneOrMany.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOneOrMany.php
deleted file mode 100755
index 58de31c..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOneOrMany.php
+++ /dev/null
@@ -1,127 +0,0 @@
-morphType = $type;
-
- $this->morphClass = $parent->getMorphClass();
-
- parent::__construct($query, $parent, $id, $localKey);
- }
-
- /**
- * Set the base constraints on the relation query.
- *
- * @return void
- */
- public function addConstraints()
- {
- if (static::$constraints) {
- parent::addConstraints();
-
- $this->query->where($this->morphType, $this->morphClass);
- }
- }
-
- /**
- * Set the constraints for an eager load of the relation.
- *
- * @param array $models
- * @return void
- */
- public function addEagerConstraints(array $models)
- {
- parent::addEagerConstraints($models);
-
- $this->query->where($this->morphType, $this->morphClass);
- }
-
- /**
- * Set the foreign ID and type for creating a related model.
- *
- * @param \Illuminate\Database\Eloquent\Model $model
- * @return void
- */
- protected function setForeignAttributesForCreate(Model $model)
- {
- $model->{$this->getForeignKeyName()} = $this->getParentKey();
-
- $model->{$this->getMorphType()} = $this->morphClass;
- }
-
- /**
- * Get the relationship query.
- *
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @param \Illuminate\Database\Eloquent\Builder $parentQuery
- * @param array|mixed $columns
- * @return \Illuminate\Database\Eloquent\Builder
- */
- public function getRelationExistenceQuery(Builder $query, Builder $parentQuery, $columns = ['*'])
- {
- return parent::getRelationExistenceQuery($query, $parentQuery, $columns)->where(
- $this->morphType, $this->morphClass
- );
- }
-
- /**
- * Get the foreign key "type" name.
- *
- * @return string
- */
- public function getQualifiedMorphType()
- {
- return $this->morphType;
- }
-
- /**
- * Get the plain morph type name without the table.
- *
- * @return string
- */
- public function getMorphType()
- {
- return last(explode('.', $this->morphType));
- }
-
- /**
- * Get the class name of the parent model.
- *
- * @return string
- */
- public function getMorphClass()
- {
- return $this->morphClass;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphPivot.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphPivot.php
deleted file mode 100644
index ade5953..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphPivot.php
+++ /dev/null
@@ -1,150 +0,0 @@
-where($this->morphType, $this->morphClass);
-
- return parent::setKeysForSaveQuery($query);
- }
-
- /**
- * Delete the pivot model record from the database.
- *
- * @return int
- */
- public function delete()
- {
- $query = $this->getDeleteQuery();
-
- $query->where($this->morphType, $this->morphClass);
-
- return $query->delete();
- }
-
- /**
- * Set the morph type for the pivot.
- *
- * @param string $morphType
- * @return $this
- */
- public function setMorphType($morphType)
- {
- $this->morphType = $morphType;
-
- return $this;
- }
-
- /**
- * Set the morph class for the pivot.
- *
- * @param string $morphClass
- * @return \Illuminate\Database\Eloquent\Relations\MorphPivot
- */
- public function setMorphClass($morphClass)
- {
- $this->morphClass = $morphClass;
-
- return $this;
- }
-
- /**
- * Get the queueable identity for the entity.
- *
- * @return mixed
- */
- public function getQueueableId()
- {
- if (isset($this->attributes[$this->getKeyName()])) {
- return $this->getKey();
- }
-
- return sprintf(
- '%s:%s:%s:%s:%s:%s',
- $this->foreignKey, $this->getAttribute($this->foreignKey),
- $this->relatedKey, $this->getAttribute($this->relatedKey),
- $this->morphType, $this->morphClass
- );
- }
-
- /**
- * Get a new query to restore one or more models by their queueable IDs.
- *
- * @param array|int $ids
- * @return \Illuminate\Database\Eloquent\Builder
- */
- public function newQueryForRestoration($ids)
- {
- if (is_array($ids)) {
- return $this->newQueryForCollectionRestoration($ids);
- }
-
- if (! Str::contains($ids, ':')) {
- return parent::newQueryForRestoration($ids);
- }
-
- $segments = explode(':', $ids);
-
- return $this->newQueryWithoutScopes()
- ->where($segments[0], $segments[1])
- ->where($segments[2], $segments[3])
- ->where($segments[4], $segments[5]);
- }
-
- /**
- * Get a new query to restore multiple models by their queueable IDs.
- *
- * @param array $ids
- * @return \Illuminate\Database\Eloquent\Builder
- */
- protected function newQueryForCollectionRestoration(array $ids)
- {
- if (! Str::contains($ids[0], ':')) {
- return parent::newQueryForRestoration($ids);
- }
-
- $query = $this->newQueryWithoutScopes();
-
- foreach ($ids as $id) {
- $segments = explode(':', $id);
-
- $query->orWhere(function ($query) use ($segments) {
- return $query->where($segments[0], $segments[1])
- ->where($segments[2], $segments[3])
- ->where($segments[4], $segments[5]);
- });
- }
-
- return $query;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphTo.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphTo.php
deleted file mode 100644
index 8d2dc23..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphTo.php
+++ /dev/null
@@ -1,288 +0,0 @@
-morphType = $type;
-
- parent::__construct($query, $parent, $foreignKey, $ownerKey, $relation);
- }
-
- /**
- * Set the constraints for an eager load of the relation.
- *
- * @param array $models
- * @return void
- */
- public function addEagerConstraints(array $models)
- {
- $this->buildDictionary($this->models = Collection::make($models));
- }
-
- /**
- * Build a dictionary with the models.
- *
- * @param \Illuminate\Database\Eloquent\Collection $models
- * @return void
- */
- protected function buildDictionary(Collection $models)
- {
- foreach ($models as $model) {
- if ($model->{$this->morphType}) {
- $this->dictionary[$model->{$this->morphType}][$model->{$this->foreignKey}][] = $model;
- }
- }
- }
-
- /**
- * Get the results of the relationship.
- *
- * Called via eager load method of Eloquent query builder.
- *
- * @return mixed
- */
- public function getEager()
- {
- foreach (array_keys($this->dictionary) as $type) {
- $this->matchToMorphParents($type, $this->getResultsByType($type));
- }
-
- return $this->models;
- }
-
- /**
- * Get all of the relation results for a type.
- *
- * @param string $type
- * @return \Illuminate\Database\Eloquent\Collection
- */
- protected function getResultsByType($type)
- {
- $instance = $this->createModelByType($type);
-
- $ownerKey = $this->ownerKey ?? $instance->getKeyName();
-
- $query = $this->replayMacros($instance->newQuery())
- ->mergeConstraintsFrom($this->getQuery())
- ->with($this->getQuery()->getEagerLoads());
-
- return $query->whereIn(
- $instance->getTable().'.'.$ownerKey, $this->gatherKeysByType($type)
- )->get();
- }
-
- /**
- * Gather all of the foreign keys for a given type.
- *
- * @param string $type
- * @return array
- */
- protected function gatherKeysByType($type)
- {
- return collect($this->dictionary[$type])->map(function ($models) {
- return head($models)->{$this->foreignKey};
- })->values()->unique()->all();
- }
-
- /**
- * Create a new model instance by type.
- *
- * @param string $type
- * @return \Illuminate\Database\Eloquent\Model
- */
- public function createModelByType($type)
- {
- $class = Model::getActualClassNameForMorph($type);
-
- return new $class;
- }
-
- /**
- * Match the eagerly loaded results to their parents.
- *
- * @param array $models
- * @param \Illuminate\Database\Eloquent\Collection $results
- * @param string $relation
- * @return array
- */
- public function match(array $models, Collection $results, $relation)
- {
- return $models;
- }
-
- /**
- * Match the results for a given type to their parents.
- *
- * @param string $type
- * @param \Illuminate\Database\Eloquent\Collection $results
- * @return void
- */
- protected function matchToMorphParents($type, Collection $results)
- {
- foreach ($results as $result) {
- $ownerKey = ! is_null($this->ownerKey) ? $result->{$this->ownerKey} : $result->getKey();
-
- if (isset($this->dictionary[$type][$ownerKey])) {
- foreach ($this->dictionary[$type][$ownerKey] as $model) {
- $model->setRelation($this->relation, $result);
- }
- }
- }
- }
-
- /**
- * Associate the model instance to the given parent.
- *
- * @param \Illuminate\Database\Eloquent\Model $model
- * @return \Illuminate\Database\Eloquent\Model
- */
- public function associate($model)
- {
- $this->parent->setAttribute(
- $this->foreignKey, $model instanceof Model ? $model->getKey() : null
- );
-
- $this->parent->setAttribute(
- $this->morphType, $model instanceof Model ? $model->getMorphClass() : null
- );
-
- return $this->parent->setRelation($this->relation, $model);
- }
-
- /**
- * Dissociate previously associated model from the given parent.
- *
- * @return \Illuminate\Database\Eloquent\Model
- */
- public function dissociate()
- {
- $this->parent->setAttribute($this->foreignKey, null);
-
- $this->parent->setAttribute($this->morphType, null);
-
- return $this->parent->setRelation($this->relation, null);
- }
-
- /**
- * Touch all of the related models for the relationship.
- *
- * @return void
- */
- public function touch()
- {
- if (! is_null($this->child->{$this->foreignKey})) {
- parent::touch();
- }
- }
-
- /**
- * Get the foreign key "type" name.
- *
- * @return string
- */
- public function getMorphType()
- {
- return $this->morphType;
- }
-
- /**
- * Get the dictionary used by the relationship.
- *
- * @return array
- */
- public function getDictionary()
- {
- return $this->dictionary;
- }
-
- /**
- * Replay stored macro calls on the actual related instance.
- *
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @return \Illuminate\Database\Eloquent\Builder
- */
- protected function replayMacros(Builder $query)
- {
- foreach ($this->macroBuffer as $macro) {
- $query->{$macro['method']}(...$macro['parameters']);
- }
-
- return $query;
- }
-
- /**
- * Handle dynamic method calls to the relationship.
- *
- * @param string $method
- * @param array $parameters
- * @return mixed
- */
- public function __call($method, $parameters)
- {
- try {
- $result = parent::__call($method, $parameters);
-
- if (in_array($method, ['select', 'selectRaw', 'selectSub', 'addSelect', 'withoutGlobalScopes'])) {
- $this->macroBuffer[] = compact('method', 'parameters');
- }
-
- return $result;
- }
-
- // If we tried to call a method that does not exist on the parent Builder instance,
- // we'll assume that we want to call a query macro (e.g. withTrashed) that only
- // exists on related models. We will just store the call and replay it later.
- catch (BadMethodCallException $e) {
- $this->macroBuffer[] = compact('method', 'parameters');
-
- return $this;
- }
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphToMany.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphToMany.php
deleted file mode 100644
index e487af0..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphToMany.php
+++ /dev/null
@@ -1,194 +0,0 @@
-inverse = $inverse;
- $this->morphType = $name.'_type';
- $this->morphClass = $inverse ? $query->getModel()->getMorphClass() : $parent->getMorphClass();
-
- parent::__construct(
- $query, $parent, $table, $foreignPivotKey,
- $relatedPivotKey, $parentKey, $relatedKey, $relationName
- );
- }
-
- /**
- * Set the where clause for the relation query.
- *
- * @return $this
- */
- protected function addWhereConstraints()
- {
- parent::addWhereConstraints();
-
- $this->query->where($this->table.'.'.$this->morphType, $this->morphClass);
-
- return $this;
- }
-
- /**
- * Set the constraints for an eager load of the relation.
- *
- * @param array $models
- * @return void
- */
- public function addEagerConstraints(array $models)
- {
- parent::addEagerConstraints($models);
-
- $this->query->where($this->table.'.'.$this->morphType, $this->morphClass);
- }
-
- /**
- * Create a new pivot attachment record.
- *
- * @param int $id
- * @param bool $timed
- * @return array
- */
- protected function baseAttachRecord($id, $timed)
- {
- return Arr::add(
- parent::baseAttachRecord($id, $timed), $this->morphType, $this->morphClass
- );
- }
-
- /**
- * Add the constraints for a relationship count query.
- *
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @param \Illuminate\Database\Eloquent\Builder $parentQuery
- * @param array|mixed $columns
- * @return \Illuminate\Database\Eloquent\Builder
- */
- public function getRelationExistenceQuery(Builder $query, Builder $parentQuery, $columns = ['*'])
- {
- return parent::getRelationExistenceQuery($query, $parentQuery, $columns)->where(
- $this->table.'.'.$this->morphType, $this->morphClass
- );
- }
-
- /**
- * Create a new query builder for the pivot table.
- *
- * @return \Illuminate\Database\Query\Builder
- */
- protected function newPivotQuery()
- {
- return parent::newPivotQuery()->where($this->morphType, $this->morphClass);
- }
-
- /**
- * Create a new pivot model instance.
- *
- * @param array $attributes
- * @param bool $exists
- * @return \Illuminate\Database\Eloquent\Relations\Pivot
- */
- public function newPivot(array $attributes = [], $exists = false)
- {
- $using = $this->using;
-
- $pivot = $using ? $using::fromRawAttributes($this->parent, $attributes, $this->table, $exists)
- : MorphPivot::fromAttributes($this->parent, $attributes, $this->table, $exists);
-
- $pivot->setPivotKeys($this->foreignPivotKey, $this->relatedPivotKey)
- ->setMorphType($this->morphType)
- ->setMorphClass($this->morphClass);
-
- return $pivot;
- }
-
- /**
- * Get the pivot columns for the relation.
- *
- * "pivot_" is prefixed at each column for easy removal later.
- *
- * @return array
- */
- protected function aliasedPivotColumns()
- {
- $defaults = [$this->foreignPivotKey, $this->relatedPivotKey, $this->morphType];
-
- return collect(array_merge($defaults, $this->pivotColumns))->map(function ($column) {
- return $this->table.'.'.$column.' as pivot_'.$column;
- })->unique()->all();
- }
-
- /**
- * Get the foreign key "type" name.
- *
- * @return string
- */
- public function getMorphType()
- {
- return $this->morphType;
- }
-
- /**
- * Get the class name of the parent model.
- *
- * @return string
- */
- public function getMorphClass()
- {
- return $this->morphClass;
- }
-
- /**
- * Get the indicator for a reverse relationship.
- *
- * @return bool
- */
- public function getInverse()
- {
- return $this->inverse;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Pivot.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Pivot.php
deleted file mode 100755
index 2ec8235..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Pivot.php
+++ /dev/null
@@ -1,18 +0,0 @@
-query = $query;
- $this->parent = $parent;
- $this->related = $query->getModel();
-
- $this->addConstraints();
- }
-
- /**
- * Run a callback with constraints disabled on the relation.
- *
- * @param \Closure $callback
- * @return mixed
- */
- public static function noConstraints(Closure $callback)
- {
- $previous = static::$constraints;
-
- static::$constraints = false;
-
- // When resetting the relation where clause, we want to shift the first element
- // off of the bindings, leaving only the constraints that the developers put
- // as "extra" on the relationships, and not original relation constraints.
- try {
- return call_user_func($callback);
- } finally {
- static::$constraints = $previous;
- }
- }
-
- /**
- * Set the base constraints on the relation query.
- *
- * @return void
- */
- abstract public function addConstraints();
-
- /**
- * Set the constraints for an eager load of the relation.
- *
- * @param array $models
- * @return void
- */
- abstract public function addEagerConstraints(array $models);
-
- /**
- * Initialize the relation on a set of models.
- *
- * @param array $models
- * @param string $relation
- * @return array
- */
- abstract public function initRelation(array $models, $relation);
-
- /**
- * Match the eagerly loaded results to their parents.
- *
- * @param array $models
- * @param \Illuminate\Database\Eloquent\Collection $results
- * @param string $relation
- * @return array
- */
- abstract public function match(array $models, Collection $results, $relation);
-
- /**
- * Get the results of the relationship.
- *
- * @return mixed
- */
- abstract public function getResults();
-
- /**
- * Get the relationship for eager loading.
- *
- * @return \Illuminate\Database\Eloquent\Collection
- */
- public function getEager()
- {
- return $this->get();
- }
-
- /**
- * Execute the query as a "select" statement.
- *
- * @param array $columns
- * @return \Illuminate\Database\Eloquent\Collection
- */
- public function get($columns = ['*'])
- {
- return $this->query->get($columns);
- }
-
- /**
- * Touch all of the related models for the relationship.
- *
- * @return void
- */
- public function touch()
- {
- $model = $this->getRelated();
-
- if (! $model::isIgnoringTouch()) {
- $this->rawUpdate([
- $model->getUpdatedAtColumn() => $model->freshTimestampString(),
- ]);
- }
- }
-
- /**
- * Run a raw update against the base query.
- *
- * @param array $attributes
- * @return int
- */
- public function rawUpdate(array $attributes = [])
- {
- return $this->query->withoutGlobalScopes()->update($attributes);
- }
-
- /**
- * Add the constraints for a relationship count query.
- *
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @param \Illuminate\Database\Eloquent\Builder $parentQuery
- * @return \Illuminate\Database\Eloquent\Builder
- */
- public function getRelationExistenceCountQuery(Builder $query, Builder $parentQuery)
- {
- return $this->getRelationExistenceQuery(
- $query, $parentQuery, new Expression('count(*)')
- )->setBindings([], 'select');
- }
-
- /**
- * Add the constraints for an internal relationship existence query.
- *
- * Essentially, these queries compare on column names like whereColumn.
- *
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @param \Illuminate\Database\Eloquent\Builder $parentQuery
- * @param array|mixed $columns
- * @return \Illuminate\Database\Eloquent\Builder
- */
- public function getRelationExistenceQuery(Builder $query, Builder $parentQuery, $columns = ['*'])
- {
- return $query->select($columns)->whereColumn(
- $this->getQualifiedParentKeyName(), '=', $this->getExistenceCompareKey()
- );
- }
-
- /**
- * Get all of the primary keys for an array of models.
- *
- * @param array $models
- * @param string $key
- * @return array
- */
- protected function getKeys(array $models, $key = null)
- {
- return collect($models)->map(function ($value) use ($key) {
- return $key ? $value->getAttribute($key) : $value->getKey();
- })->values()->unique(null, true)->sort()->all();
- }
-
- /**
- * Get the underlying query for the relation.
- *
- * @return \Illuminate\Database\Eloquent\Builder
- */
- public function getQuery()
- {
- return $this->query;
- }
-
- /**
- * Get the base query builder driving the Eloquent builder.
- *
- * @return \Illuminate\Database\Query\Builder
- */
- public function getBaseQuery()
- {
- return $this->query->getQuery();
- }
-
- /**
- * Get the parent model of the relation.
- *
- * @return \Illuminate\Database\Eloquent\Model
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Get the fully qualified parent key name.
- *
- * @return string
- */
- public function getQualifiedParentKeyName()
- {
- return $this->parent->getQualifiedKeyName();
- }
-
- /**
- * Get the related model of the relation.
- *
- * @return \Illuminate\Database\Eloquent\Model
- */
- public function getRelated()
- {
- return $this->related;
- }
-
- /**
- * Get the name of the "created at" column.
- *
- * @return string
- */
- public function createdAt()
- {
- return $this->parent->getCreatedAtColumn();
- }
-
- /**
- * Get the name of the "updated at" column.
- *
- * @return string
- */
- public function updatedAt()
- {
- return $this->parent->getUpdatedAtColumn();
- }
-
- /**
- * Get the name of the related model's "updated at" column.
- *
- * @return string
- */
- public function relatedUpdatedAt()
- {
- return $this->related->getUpdatedAtColumn();
- }
-
- /**
- * Get the name of the "where in" method for eager loading.
- *
- * @param \Illuminate\Database\Eloquent\Model $model
- * @param string $key
- * @return string
- */
- protected function whereInMethod(Model $model, $key)
- {
- return $model->getKeyName() === last(explode('.', $key))
- && $model->getIncrementing()
- && in_array($model->getKeyType(), ['int', 'integer'])
- ? 'whereIntegerInRaw'
- : 'whereIn';
- }
-
- /**
- * Set or get the morph map for polymorphic relations.
- *
- * @param array|null $map
- * @param bool $merge
- * @return array
- */
- public static function morphMap(array $map = null, $merge = true)
- {
- $map = static::buildMorphMapFromModels($map);
-
- if (is_array($map)) {
- static::$morphMap = $merge && static::$morphMap
- ? $map + static::$morphMap : $map;
- }
-
- return static::$morphMap;
- }
-
- /**
- * Builds a table-keyed array from model class names.
- *
- * @param string[]|null $models
- * @return array|null
- */
- protected static function buildMorphMapFromModels(array $models = null)
- {
- if (is_null($models) || Arr::isAssoc($models)) {
- return $models;
- }
-
- return array_combine(array_map(function ($model) {
- return (new $model)->getTable();
- }, $models), $models);
- }
-
- /**
- * Get the model associated with a custom polymorphic type.
- *
- * @param string $alias
- * @return string|null
- */
- public static function getMorphedModel($alias)
- {
- return self::$morphMap[$alias] ?? null;
- }
-
- /**
- * Handle dynamic method calls to the relationship.
- *
- * @param string $method
- * @param array $parameters
- * @return mixed
- */
- public function __call($method, $parameters)
- {
- if (static::hasMacro($method)) {
- return $this->macroCall($method, $parameters);
- }
-
- $result = $this->forwardCallTo($this->query, $method, $parameters);
-
- if ($result === $this->query) {
- return $this;
- }
-
- return $result;
- }
-
- /**
- * Force a clone of the underlying query builder when cloning.
- *
- * @return void
- */
- public function __clone()
- {
- $this->query = clone $this->query;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Scope.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Scope.php
deleted file mode 100644
index 63cba6a..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Scope.php
+++ /dev/null
@@ -1,15 +0,0 @@
-forceDeleting = true;
-
- return tap($this->delete(), function ($deleted) {
- $this->forceDeleting = false;
-
- if ($deleted) {
- $this->fireModelEvent('forceDeleted', false);
- }
- });
- }
-
- /**
- * Perform the actual delete query on this model instance.
- *
- * @return mixed
- */
- protected function performDeleteOnModel()
- {
- if ($this->forceDeleting) {
- $this->exists = false;
-
- return $this->newModelQuery()->where($this->getKeyName(), $this->getKey())->forceDelete();
- }
-
- return $this->runSoftDelete();
- }
-
- /**
- * Perform the actual delete query on this model instance.
- *
- * @return void
- */
- protected function runSoftDelete()
- {
- $query = $this->newModelQuery()->where($this->getKeyName(), $this->getKey());
-
- $time = $this->freshTimestamp();
-
- $columns = [$this->getDeletedAtColumn() => $this->fromDateTime($time)];
-
- $this->{$this->getDeletedAtColumn()} = $time;
-
- if ($this->timestamps && ! is_null($this->getUpdatedAtColumn())) {
- $this->{$this->getUpdatedAtColumn()} = $time;
-
- $columns[$this->getUpdatedAtColumn()] = $this->fromDateTime($time);
- }
-
- $query->update($columns);
- }
-
- /**
- * Restore a soft-deleted model instance.
- *
- * @return bool|null
- */
- public function restore()
- {
- // If the restoring event does not return false, we will proceed with this
- // restore operation. Otherwise, we bail out so the developer will stop
- // the restore totally. We will clear the deleted timestamp and save.
- if ($this->fireModelEvent('restoring') === false) {
- return false;
- }
-
- $this->{$this->getDeletedAtColumn()} = null;
-
- // Once we have saved the model, we will fire the "restored" event so this
- // developer will do anything they need to after a restore operation is
- // totally finished. Then we will return the result of the save call.
- $this->exists = true;
-
- $result = $this->save();
-
- $this->fireModelEvent('restored', false);
-
- return $result;
- }
-
- /**
- * Determine if the model instance has been soft-deleted.
- *
- * @return bool
- */
- public function trashed()
- {
- return ! is_null($this->{$this->getDeletedAtColumn()});
- }
-
- /**
- * Register a restoring model event with the dispatcher.
- *
- * @param \Closure|string $callback
- * @return void
- */
- public static function restoring($callback)
- {
- static::registerModelEvent('restoring', $callback);
- }
-
- /**
- * Register a restored model event with the dispatcher.
- *
- * @param \Closure|string $callback
- * @return void
- */
- public static function restored($callback)
- {
- static::registerModelEvent('restored', $callback);
- }
-
- /**
- * Determine if the model is currently force deleting.
- *
- * @return bool
- */
- public function isForceDeleting()
- {
- return $this->forceDeleting;
- }
-
- /**
- * Get the name of the "deleted at" column.
- *
- * @return string
- */
- public function getDeletedAtColumn()
- {
- return defined('static::DELETED_AT') ? static::DELETED_AT : 'deleted_at';
- }
-
- /**
- * Get the fully qualified "deleted at" column.
- *
- * @return string
- */
- public function getQualifiedDeletedAtColumn()
- {
- return $this->qualifyColumn($this->getDeletedAtColumn());
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletingScope.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletingScope.php
deleted file mode 100644
index 0d51696..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletingScope.php
+++ /dev/null
@@ -1,131 +0,0 @@
-whereNull($model->getQualifiedDeletedAtColumn());
- }
-
- /**
- * Extend the query builder with the needed functions.
- *
- * @param \Illuminate\Database\Eloquent\Builder $builder
- * @return void
- */
- public function extend(Builder $builder)
- {
- foreach ($this->extensions as $extension) {
- $this->{"add{$extension}"}($builder);
- }
-
- $builder->onDelete(function (Builder $builder) {
- $column = $this->getDeletedAtColumn($builder);
-
- return $builder->update([
- $column => $builder->getModel()->freshTimestampString(),
- ]);
- });
- }
-
- /**
- * Get the "deleted at" column for the builder.
- *
- * @param \Illuminate\Database\Eloquent\Builder $builder
- * @return string
- */
- protected function getDeletedAtColumn(Builder $builder)
- {
- if (count((array) $builder->getQuery()->joins) > 0) {
- return $builder->getModel()->getQualifiedDeletedAtColumn();
- }
-
- return $builder->getModel()->getDeletedAtColumn();
- }
-
- /**
- * Add the restore extension to the builder.
- *
- * @param \Illuminate\Database\Eloquent\Builder $builder
- * @return void
- */
- protected function addRestore(Builder $builder)
- {
- $builder->macro('restore', function (Builder $builder) {
- $builder->withTrashed();
-
- return $builder->update([$builder->getModel()->getDeletedAtColumn() => null]);
- });
- }
-
- /**
- * Add the with-trashed extension to the builder.
- *
- * @param \Illuminate\Database\Eloquent\Builder $builder
- * @return void
- */
- protected function addWithTrashed(Builder $builder)
- {
- $builder->macro('withTrashed', function (Builder $builder, $withTrashed = true) {
- if (! $withTrashed) {
- return $builder->withoutTrashed();
- }
-
- return $builder->withoutGlobalScope($this);
- });
- }
-
- /**
- * Add the without-trashed extension to the builder.
- *
- * @param \Illuminate\Database\Eloquent\Builder $builder
- * @return void
- */
- protected function addWithoutTrashed(Builder $builder)
- {
- $builder->macro('withoutTrashed', function (Builder $builder) {
- $model = $builder->getModel();
-
- $builder->withoutGlobalScope($this)->whereNull(
- $model->getQualifiedDeletedAtColumn()
- );
-
- return $builder;
- });
- }
-
- /**
- * Add the only-trashed extension to the builder.
- *
- * @param \Illuminate\Database\Eloquent\Builder $builder
- * @return void
- */
- protected function addOnlyTrashed(Builder $builder)
- {
- $builder->macro('onlyTrashed', function (Builder $builder) {
- $model = $builder->getModel();
-
- $builder->withoutGlobalScope($this)->whereNotNull(
- $model->getQualifiedDeletedAtColumn()
- );
-
- return $builder;
- });
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Events/ConnectionEvent.php b/vendor/laravel/framework/src/Illuminate/Database/Events/ConnectionEvent.php
deleted file mode 100644
index 818c785..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Events/ConnectionEvent.php
+++ /dev/null
@@ -1,32 +0,0 @@
-connection = $connection;
- $this->connectionName = $connection->getName();
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Events/QueryExecuted.php b/vendor/laravel/framework/src/Illuminate/Database/Events/QueryExecuted.php
deleted file mode 100644
index 833a21e..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Events/QueryExecuted.php
+++ /dev/null
@@ -1,59 +0,0 @@
-sql = $sql;
- $this->time = $time;
- $this->bindings = $bindings;
- $this->connection = $connection;
- $this->connectionName = $connection->getName();
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Events/StatementPrepared.php b/vendor/laravel/framework/src/Illuminate/Database/Events/StatementPrepared.php
deleted file mode 100644
index 2f60323..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Events/StatementPrepared.php
+++ /dev/null
@@ -1,33 +0,0 @@
-statement = $statement;
- $this->connection = $connection;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Events/TransactionBeginning.php b/vendor/laravel/framework/src/Illuminate/Database/Events/TransactionBeginning.php
deleted file mode 100644
index 3287b5c..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Events/TransactionBeginning.php
+++ /dev/null
@@ -1,8 +0,0 @@
-isExpression($table)) {
- return $this->wrap($this->tablePrefix.$table, true);
- }
-
- return $this->getValue($table);
- }
-
- /**
- * Wrap a value in keyword identifiers.
- *
- * @param \Illuminate\Database\Query\Expression|string $value
- * @param bool $prefixAlias
- * @return string
- */
- public function wrap($value, $prefixAlias = false)
- {
- if ($this->isExpression($value)) {
- return $this->getValue($value);
- }
-
- // If the value being wrapped has a column alias we will need to separate out
- // the pieces so we can wrap each of the segments of the expression on its
- // own, and then join these both back together using the "as" connector.
- if (stripos($value, ' as ') !== false) {
- return $this->wrapAliasedValue($value, $prefixAlias);
- }
-
- return $this->wrapSegments(explode('.', $value));
- }
-
- /**
- * Wrap a value that has an alias.
- *
- * @param string $value
- * @param bool $prefixAlias
- * @return string
- */
- protected function wrapAliasedValue($value, $prefixAlias = false)
- {
- $segments = preg_split('/\s+as\s+/i', $value);
-
- // If we are wrapping a table we need to prefix the alias with the table prefix
- // as well in order to generate proper syntax. If this is a column of course
- // no prefix is necessary. The condition will be true when from wrapTable.
- if ($prefixAlias) {
- $segments[1] = $this->tablePrefix.$segments[1];
- }
-
- return $this->wrap(
- $segments[0]).' as '.$this->wrapValue($segments[1]
- );
- }
-
- /**
- * Wrap the given value segments.
- *
- * @param array $segments
- * @return string
- */
- protected function wrapSegments($segments)
- {
- return collect($segments)->map(function ($segment, $key) use ($segments) {
- return $key == 0 && count($segments) > 1
- ? $this->wrapTable($segment)
- : $this->wrapValue($segment);
- })->implode('.');
- }
-
- /**
- * Wrap a single string in keyword identifiers.
- *
- * @param string $value
- * @return string
- */
- protected function wrapValue($value)
- {
- if ($value !== '*') {
- return '"'.str_replace('"', '""', $value).'"';
- }
-
- return $value;
- }
-
- /**
- * Convert an array of column names into a delimited string.
- *
- * @param array $columns
- * @return string
- */
- public function columnize(array $columns)
- {
- return implode(', ', array_map([$this, 'wrap'], $columns));
- }
-
- /**
- * Create query parameter place-holders for an array.
- *
- * @param array $values
- * @return string
- */
- public function parameterize(array $values)
- {
- return implode(', ', array_map([$this, 'parameter'], $values));
- }
-
- /**
- * Get the appropriate query parameter place-holder for a value.
- *
- * @param mixed $value
- * @return string
- */
- public function parameter($value)
- {
- return $this->isExpression($value) ? $this->getValue($value) : '?';
- }
-
- /**
- * Quote the given string literal.
- *
- * @param string|array $value
- * @return string
- */
- public function quoteString($value)
- {
- if (is_array($value)) {
- return implode(', ', array_map([$this, __FUNCTION__], $value));
- }
-
- return "'$value'";
- }
-
- /**
- * Determine if the given value is a raw expression.
- *
- * @param mixed $value
- * @return bool
- */
- public function isExpression($value)
- {
- return $value instanceof Expression;
- }
-
- /**
- * Get the value of a raw expression.
- *
- * @param \Illuminate\Database\Query\Expression $expression
- * @return string
- */
- public function getValue($expression)
- {
- return $expression->getValue();
- }
-
- /**
- * Get the format for database stored dates.
- *
- * @return string
- */
- public function getDateFormat()
- {
- return 'Y-m-d H:i:s';
- }
-
- /**
- * Get the grammar's table prefix.
- *
- * @return string
- */
- public function getTablePrefix()
- {
- return $this->tablePrefix;
- }
-
- /**
- * Set the grammar's table prefix.
- *
- * @param string $prefix
- * @return $this
- */
- public function setTablePrefix($prefix)
- {
- $this->tablePrefix = $prefix;
-
- return $this;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/MigrationServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Database/MigrationServiceProvider.php
deleted file mode 100755
index a8b92ab..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/MigrationServiceProvider.php
+++ /dev/null
@@ -1,87 +0,0 @@
-registerRepository();
-
- $this->registerMigrator();
-
- $this->registerCreator();
- }
-
- /**
- * Register the migration repository service.
- *
- * @return void
- */
- protected function registerRepository()
- {
- $this->app->singleton('migration.repository', function ($app) {
- $table = $app['config']['database.migrations'];
-
- return new DatabaseMigrationRepository($app['db'], $table);
- });
- }
-
- /**
- * Register the migrator service.
- *
- * @return void
- */
- protected function registerMigrator()
- {
- // The migrator is responsible for actually running and rollback the migration
- // files in the application. We'll pass in our database connection resolver
- // so the migrator can resolve any of these connections when it needs to.
- $this->app->singleton('migrator', function ($app) {
- $repository = $app['migration.repository'];
-
- return new Migrator($repository, $app['db'], $app['files']);
- });
- }
-
- /**
- * Register the migration creator.
- *
- * @return void
- */
- protected function registerCreator()
- {
- $this->app->singleton('migration.creator', function ($app) {
- return new MigrationCreator($app['files']);
- });
- }
-
- /**
- * Get the services provided by the provider.
- *
- * @return array
- */
- public function provides()
- {
- return [
- 'migrator', 'migration.repository', 'migration.creator',
- ];
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php b/vendor/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php
deleted file mode 100755
index 1ace1a6..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php
+++ /dev/null
@@ -1,212 +0,0 @@
-table = $table;
- $this->resolver = $resolver;
- }
-
- /**
- * Get the completed migrations.
- *
- * @return array
- */
- public function getRan()
- {
- return $this->table()
- ->orderBy('batch', 'asc')
- ->orderBy('migration', 'asc')
- ->pluck('migration')->all();
- }
-
- /**
- * Get list of migrations.
- *
- * @param int $steps
- * @return array
- */
- public function getMigrations($steps)
- {
- $query = $this->table()->where('batch', '>=', '1');
-
- return $query->orderBy('batch', 'desc')
- ->orderBy('migration', 'desc')
- ->take($steps)->get()->all();
- }
-
- /**
- * Get the last migration batch.
- *
- * @return array
- */
- public function getLast()
- {
- $query = $this->table()->where('batch', $this->getLastBatchNumber());
-
- return $query->orderBy('migration', 'desc')->get()->all();
- }
-
- /**
- * Get the completed migrations with their batch numbers.
- *
- * @return array
- */
- public function getMigrationBatches()
- {
- return $this->table()
- ->orderBy('batch', 'asc')
- ->orderBy('migration', 'asc')
- ->pluck('batch', 'migration')->all();
- }
-
- /**
- * Log that a migration was run.
- *
- * @param string $file
- * @param int $batch
- * @return void
- */
- public function log($file, $batch)
- {
- $record = ['migration' => $file, 'batch' => $batch];
-
- $this->table()->insert($record);
- }
-
- /**
- * Remove a migration from the log.
- *
- * @param object $migration
- * @return void
- */
- public function delete($migration)
- {
- $this->table()->where('migration', $migration->migration)->delete();
- }
-
- /**
- * Get the next migration batch number.
- *
- * @return int
- */
- public function getNextBatchNumber()
- {
- return $this->getLastBatchNumber() + 1;
- }
-
- /**
- * Get the last migration batch number.
- *
- * @return int
- */
- public function getLastBatchNumber()
- {
- return $this->table()->max('batch');
- }
-
- /**
- * Create the migration repository data store.
- *
- * @return void
- */
- public function createRepository()
- {
- $schema = $this->getConnection()->getSchemaBuilder();
-
- $schema->create($this->table, function ($table) {
- // The migrations table is responsible for keeping track of which of the
- // migrations have actually run for the application. We'll create the
- // table to hold the migration file's path as well as the batch ID.
- $table->increments('id');
- $table->string('migration');
- $table->integer('batch');
- });
- }
-
- /**
- * Determine if the migration repository exists.
- *
- * @return bool
- */
- public function repositoryExists()
- {
- $schema = $this->getConnection()->getSchemaBuilder();
-
- return $schema->hasTable($this->table);
- }
-
- /**
- * Get a query builder for the migration table.
- *
- * @return \Illuminate\Database\Query\Builder
- */
- protected function table()
- {
- return $this->getConnection()->table($this->table)->useWritePdo();
- }
-
- /**
- * Get the connection resolver instance.
- *
- * @return \Illuminate\Database\ConnectionResolverInterface
- */
- public function getConnectionResolver()
- {
- return $this->resolver;
- }
-
- /**
- * Resolve the database connection instance.
- *
- * @return \Illuminate\Database\Connection
- */
- public function getConnection()
- {
- return $this->resolver->connection($this->connection);
- }
-
- /**
- * Set the information source to gather data.
- *
- * @param string $name
- * @return void
- */
- public function setSource($name)
- {
- $this->connection = $name;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migration.php b/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migration.php
deleted file mode 100755
index ac1b9e7..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migration.php
+++ /dev/null
@@ -1,30 +0,0 @@
-connection;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Migrations/MigrationCreator.php b/vendor/laravel/framework/src/Illuminate/Database/Migrations/MigrationCreator.php
deleted file mode 100755
index 88ab403..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Migrations/MigrationCreator.php
+++ /dev/null
@@ -1,204 +0,0 @@
-files = $files;
- }
-
- /**
- * Create a new migration at the given path.
- *
- * @param string $name
- * @param string $path
- * @param string $table
- * @param bool $create
- * @return string
- *
- * @throws \Exception
- */
- public function create($name, $path, $table = null, $create = false)
- {
- $this->ensureMigrationDoesntAlreadyExist($name);
-
- // First we will get the stub file for the migration, which serves as a type
- // of template for the migration. Once we have those we will populate the
- // various place-holders, save the file, and run the post create event.
- $stub = $this->getStub($table, $create);
-
- $this->files->put(
- $path = $this->getPath($name, $path),
- $this->populateStub($name, $stub, $table)
- );
-
- // Next, we will fire any hooks that are supposed to fire after a migration is
- // created. Once that is done we'll be ready to return the full path to the
- // migration file so it can be used however it's needed by the developer.
- $this->firePostCreateHooks($table);
-
- return $path;
- }
-
- /**
- * Ensure that a migration with the given name doesn't already exist.
- *
- * @param string $name
- * @return void
- *
- * @throws \InvalidArgumentException
- */
- protected function ensureMigrationDoesntAlreadyExist($name)
- {
- if (class_exists($className = $this->getClassName($name))) {
- throw new InvalidArgumentException("A {$className} class already exists.");
- }
- }
-
- /**
- * Get the migration stub file.
- *
- * @param string $table
- * @param bool $create
- * @return string
- */
- protected function getStub($table, $create)
- {
- if (is_null($table)) {
- return $this->files->get($this->stubPath().'/blank.stub');
- }
-
- // We also have stubs for creating new tables and modifying existing tables
- // to save the developer some typing when they are creating a new tables
- // or modifying existing tables. We'll grab the appropriate stub here.
- $stub = $create ? 'create.stub' : 'update.stub';
-
- return $this->files->get($this->stubPath()."/{$stub}");
- }
-
- /**
- * Populate the place-holders in the migration stub.
- *
- * @param string $name
- * @param string $stub
- * @param string $table
- * @return string
- */
- protected function populateStub($name, $stub, $table)
- {
- $stub = str_replace('DummyClass', $this->getClassName($name), $stub);
-
- // Here we will replace the table place-holders with the table specified by
- // the developer, which is useful for quickly creating a tables creation
- // or update migration from the console instead of typing it manually.
- if (! is_null($table)) {
- $stub = str_replace('DummyTable', $table, $stub);
- }
-
- return $stub;
- }
-
- /**
- * Get the class name of a migration name.
- *
- * @param string $name
- * @return string
- */
- protected function getClassName($name)
- {
- return Str::studly($name);
- }
-
- /**
- * Get the full path to the migration.
- *
- * @param string $name
- * @param string $path
- * @return string
- */
- protected function getPath($name, $path)
- {
- return $path.'/'.$this->getDatePrefix().'_'.$name.'.php';
- }
-
- /**
- * Fire the registered post create hooks.
- *
- * @param string $table
- * @return void
- */
- protected function firePostCreateHooks($table)
- {
- foreach ($this->postCreate as $callback) {
- call_user_func($callback, $table);
- }
- }
-
- /**
- * Register a post migration create hook.
- *
- * @param \Closure $callback
- * @return void
- */
- public function afterCreate(Closure $callback)
- {
- $this->postCreate[] = $callback;
- }
-
- /**
- * Get the date prefix for the migration.
- *
- * @return string
- */
- protected function getDatePrefix()
- {
- return date('Y_m_d_His');
- }
-
- /**
- * Get the path to the stubs.
- *
- * @return string
- */
- public function stubPath()
- {
- return __DIR__.'/stubs';
- }
-
- /**
- * Get the filesystem instance.
- *
- * @return \Illuminate\Filesystem\Filesystem
- */
- public function getFilesystem()
- {
- return $this->files;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Migrations/MigrationRepositoryInterface.php b/vendor/laravel/framework/src/Illuminate/Database/Migrations/MigrationRepositoryInterface.php
deleted file mode 100755
index 410326a..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Migrations/MigrationRepositoryInterface.php
+++ /dev/null
@@ -1,81 +0,0 @@
-files = $files;
- $this->resolver = $resolver;
- $this->repository = $repository;
- }
-
- /**
- * Run the pending migrations at a given path.
- *
- * @param array|string $paths
- * @param array $options
- * @return array
- */
- public function run($paths = [], array $options = [])
- {
- $this->notes = [];
-
- // Once we grab all of the migration files for the path, we will compare them
- // against the migrations that have already been run for this package then
- // run each of the outstanding migrations against a database connection.
- $files = $this->getMigrationFiles($paths);
-
- $this->requireFiles($migrations = $this->pendingMigrations(
- $files, $this->repository->getRan()
- ));
-
- // Once we have all these migrations that are outstanding we are ready to run
- // we will go ahead and run them "up". This will execute each migration as
- // an operation against a database. Then we'll return this list of them.
- $this->runPending($migrations, $options);
-
- return $migrations;
- }
-
- /**
- * Get the migration files that have not yet run.
- *
- * @param array $files
- * @param array $ran
- * @return array
- */
- protected function pendingMigrations($files, $ran)
- {
- return Collection::make($files)
- ->reject(function ($file) use ($ran) {
- return in_array($this->getMigrationName($file), $ran);
- })->values()->all();
- }
-
- /**
- * Run an array of migrations.
- *
- * @param array $migrations
- * @param array $options
- * @return void
- */
- public function runPending(array $migrations, array $options = [])
- {
- // First we will just make sure that there are any migrations to run. If there
- // aren't, we will just make a note of it to the developer so they're aware
- // that all of the migrations have been run against this database system.
- if (count($migrations) === 0) {
- $this->note('Nothing to migrate.');
-
- return;
- }
-
- // Next, we will get the next batch number for the migrations so we can insert
- // correct batch number in the database migrations repository when we store
- // each migration's execution. We will also extract a few of the options.
- $batch = $this->repository->getNextBatchNumber();
-
- $pretend = $options['pretend'] ?? false;
-
- $step = $options['step'] ?? false;
-
- // Once we have the array of migrations, we will spin through them and run the
- // migrations "up" so the changes are made to the databases. We'll then log
- // that the migration was run so we don't repeat it next time we execute.
- foreach ($migrations as $file) {
- $this->runUp($file, $batch, $pretend);
-
- if ($step) {
- $batch++;
- }
- }
- }
-
- /**
- * Run "up" a migration instance.
- *
- * @param string $file
- * @param int $batch
- * @param bool $pretend
- * @return void
- */
- protected function runUp($file, $batch, $pretend)
- {
- // First we will resolve a "real" instance of the migration class from this
- // migration file name. Once we have the instances we can run the actual
- // command such as "up" or "down", or we can just simulate the action.
- $migration = $this->resolve(
- $name = $this->getMigrationName($file)
- );
-
- if ($pretend) {
- return $this->pretendToRun($migration, 'up');
- }
-
- $this->note("Migrating: {$name}");
-
- $this->runMigration($migration, 'up');
-
- // Once we have run a migrations class, we will log that it was run in this
- // repository so that we don't try to run it next time we do a migration
- // in the application. A migration repository keeps the migrate order.
- $this->repository->log($name, $batch);
-
- $this->note("Migrated: {$name}");
- }
-
- /**
- * Rollback the last migration operation.
- *
- * @param array|string $paths
- * @param array $options
- * @return array
- */
- public function rollback($paths = [], array $options = [])
- {
- $this->notes = [];
-
- // We want to pull in the last batch of migrations that ran on the previous
- // migration operation. We'll then reverse those migrations and run each
- // of them "down" to reverse the last migration "operation" which ran.
- $migrations = $this->getMigrationsForRollback($options);
-
- if (count($migrations) === 0) {
- $this->note('Nothing to rollback.');
-
- return [];
- }
-
- return $this->rollbackMigrations($migrations, $paths, $options);
- }
-
- /**
- * Get the migrations for a rollback operation.
- *
- * @param array $options
- * @return array
- */
- protected function getMigrationsForRollback(array $options)
- {
- if (($steps = $options['step'] ?? 0) > 0) {
- return $this->repository->getMigrations($steps);
- }
-
- return $this->repository->getLast();
- }
-
- /**
- * Rollback the given migrations.
- *
- * @param array $migrations
- * @param array|string $paths
- * @param array $options
- * @return array
- */
- protected function rollbackMigrations(array $migrations, $paths, array $options)
- {
- $rolledBack = [];
-
- $this->requireFiles($files = $this->getMigrationFiles($paths));
-
- // Next we will run through all of the migrations and call the "down" method
- // which will reverse each migration in order. This getLast method on the
- // repository already returns these migration's names in reverse order.
- foreach ($migrations as $migration) {
- $migration = (object) $migration;
-
- if (! $file = Arr::get($files, $migration->migration)) {
- $this->note("Migration not found:> {$migration->migration}");
-
- continue;
- }
-
- $rolledBack[] = $file;
-
- $this->runDown(
- $file, $migration,
- $options['pretend'] ?? false
- );
- }
-
- return $rolledBack;
- }
-
- /**
- * Rolls all of the currently applied migrations back.
- *
- * @param array|string $paths
- * @param bool $pretend
- * @return array
- */
- public function reset($paths = [], $pretend = false)
- {
- $this->notes = [];
-
- // Next, we will reverse the migration list so we can run them back in the
- // correct order for resetting this database. This will allow us to get
- // the database back into its "empty" state ready for the migrations.
- $migrations = array_reverse($this->repository->getRan());
-
- if (count($migrations) === 0) {
- $this->note('Nothing to rollback.');
-
- return [];
- }
-
- return $this->resetMigrations($migrations, $paths, $pretend);
- }
-
- /**
- * Reset the given migrations.
- *
- * @param array $migrations
- * @param array $paths
- * @param bool $pretend
- * @return array
- */
- protected function resetMigrations(array $migrations, array $paths, $pretend = false)
- {
- // Since the getRan method that retrieves the migration name just gives us the
- // migration name, we will format the names into objects with the name as a
- // property on the objects so that we can pass it to the rollback method.
- $migrations = collect($migrations)->map(function ($m) {
- return (object) ['migration' => $m];
- })->all();
-
- return $this->rollbackMigrations(
- $migrations, $paths, compact('pretend')
- );
- }
-
- /**
- * Run "down" a migration instance.
- *
- * @param string $file
- * @param object $migration
- * @param bool $pretend
- * @return void
- */
- protected function runDown($file, $migration, $pretend)
- {
- // First we will get the file name of the migration so we can resolve out an
- // instance of the migration. Once we get an instance we can either run a
- // pretend execution of the migration or we can run the real migration.
- $instance = $this->resolve(
- $name = $this->getMigrationName($file)
- );
-
- $this->note("Rolling back: {$name}");
-
- if ($pretend) {
- return $this->pretendToRun($instance, 'down');
- }
-
- $this->runMigration($instance, 'down');
-
- // Once we have successfully run the migration "down" we will remove it from
- // the migration repository so it will be considered to have not been run
- // by the application then will be able to fire by any later operation.
- $this->repository->delete($migration);
-
- $this->note("Rolled back: {$name}");
- }
-
- /**
- * Run a migration inside a transaction if the database supports it.
- *
- * @param object $migration
- * @param string $method
- * @return void
- */
- protected function runMigration($migration, $method)
- {
- $connection = $this->resolveConnection(
- $migration->getConnection()
- );
-
- $callback = function () use ($migration, $method) {
- if (method_exists($migration, $method)) {
- $migration->{$method}();
- }
- };
-
- $this->getSchemaGrammar($connection)->supportsSchemaTransactions()
- && $migration->withinTransaction
- ? $connection->transaction($callback)
- : $callback();
- }
-
- /**
- * Pretend to run the migrations.
- *
- * @param object $migration
- * @param string $method
- * @return void
- */
- protected function pretendToRun($migration, $method)
- {
- foreach ($this->getQueries($migration, $method) as $query) {
- $name = get_class($migration);
-
- $this->note("{$name}: {$query['query']}");
- }
- }
-
- /**
- * Get all of the queries that would be run for a migration.
- *
- * @param object $migration
- * @param string $method
- * @return array
- */
- protected function getQueries($migration, $method)
- {
- // Now that we have the connections we can resolve it and pretend to run the
- // queries against the database returning the array of raw SQL statements
- // that would get fired against the database system for this migration.
- $db = $this->resolveConnection(
- $migration->getConnection()
- );
-
- return $db->pretend(function () use ($migration, $method) {
- if (method_exists($migration, $method)) {
- $migration->{$method}();
- }
- });
- }
-
- /**
- * Resolve a migration instance from a file.
- *
- * @param string $file
- * @return object
- */
- public function resolve($file)
- {
- $class = Str::studly(implode('_', array_slice(explode('_', $file), 4)));
-
- return new $class;
- }
-
- /**
- * Get all of the migration files in a given path.
- *
- * @param string|array $paths
- * @return array
- */
- public function getMigrationFiles($paths)
- {
- return Collection::make($paths)->flatMap(function ($path) {
- return Str::endsWith($path, '.php') ? [$path] : $this->files->glob($path.'/*_*.php');
- })->filter()->sortBy(function ($file) {
- return $this->getMigrationName($file);
- })->values()->keyBy(function ($file) {
- return $this->getMigrationName($file);
- })->all();
- }
-
- /**
- * Require in all the migration files in a given path.
- *
- * @param array $files
- * @return void
- */
- public function requireFiles(array $files)
- {
- foreach ($files as $file) {
- $this->files->requireOnce($file);
- }
- }
-
- /**
- * Get the name of the migration.
- *
- * @param string $path
- * @return string
- */
- public function getMigrationName($path)
- {
- return str_replace('.php', '', basename($path));
- }
-
- /**
- * Register a custom migration path.
- *
- * @param string $path
- * @return void
- */
- public function path($path)
- {
- $this->paths = array_unique(array_merge($this->paths, [$path]));
- }
-
- /**
- * Get all of the custom migration paths.
- *
- * @return array
- */
- public function paths()
- {
- return $this->paths;
- }
-
- /**
- * Get the default connection name.
- *
- * @return string
- */
- public function getConnection()
- {
- return $this->connection;
- }
-
- /**
- * Set the default connection name.
- *
- * @param string $name
- * @return void
- */
- public function setConnection($name)
- {
- if (! is_null($name)) {
- $this->resolver->setDefaultConnection($name);
- }
-
- $this->repository->setSource($name);
-
- $this->connection = $name;
- }
-
- /**
- * Resolve the database connection instance.
- *
- * @param string $connection
- * @return \Illuminate\Database\Connection
- */
- public function resolveConnection($connection)
- {
- return $this->resolver->connection($connection ?: $this->connection);
- }
-
- /**
- * Get the schema grammar out of a migration connection.
- *
- * @param \Illuminate\Database\Connection $connection
- * @return \Illuminate\Database\Schema\Grammars\Grammar
- */
- protected function getSchemaGrammar($connection)
- {
- if (is_null($grammar = $connection->getSchemaGrammar())) {
- $connection->useDefaultSchemaGrammar();
-
- $grammar = $connection->getSchemaGrammar();
- }
-
- return $grammar;
- }
-
- /**
- * Get the migration repository instance.
- *
- * @return \Illuminate\Database\Migrations\MigrationRepositoryInterface
- */
- public function getRepository()
- {
- return $this->repository;
- }
-
- /**
- * Determine if the migration repository exists.
- *
- * @return bool
- */
- public function repositoryExists()
- {
- return $this->repository->repositoryExists();
- }
-
- /**
- * Get the file system instance.
- *
- * @return \Illuminate\Filesystem\Filesystem
- */
- public function getFilesystem()
- {
- return $this->files;
- }
-
- /**
- * Set the output implementation that should be used by the console.
- *
- * @param \Illuminate\Console\OutputStyle $output
- * @return $this
- */
- public function setOutput(OutputStyle $output)
- {
- $this->output = $output;
-
- return $this;
- }
-
- /**
- * Write a note to the conosle's output.
- *
- * @param string $message
- * @return void
- */
- protected function note($message)
- {
- if ($this->output) {
- $this->output->writeln($message);
- }
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Migrations/stubs/blank.stub b/vendor/laravel/framework/src/Illuminate/Database/Migrations/stubs/blank.stub
deleted file mode 100755
index da4ce82..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Migrations/stubs/blank.stub
+++ /dev/null
@@ -1,28 +0,0 @@
-increments('id');
- $table->timestamps();
- });
- }
-
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('DummyTable');
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Migrations/stubs/update.stub b/vendor/laravel/framework/src/Illuminate/Database/Migrations/stubs/update.stub
deleted file mode 100755
index 1fd4f6e..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Migrations/stubs/update.stub
+++ /dev/null
@@ -1,32 +0,0 @@
-withTablePrefix(new QueryGrammar);
- }
-
- /**
- * Get a schema builder instance for the connection.
- *
- * @return \Illuminate\Database\Schema\MySqlBuilder
- */
- public function getSchemaBuilder()
- {
- if (is_null($this->schemaGrammar)) {
- $this->useDefaultSchemaGrammar();
- }
-
- return new MySqlBuilder($this);
- }
-
- /**
- * Get the default schema grammar instance.
- *
- * @return \Illuminate\Database\Schema\Grammars\MySqlGrammar
- */
- protected function getDefaultSchemaGrammar()
- {
- return $this->withTablePrefix(new SchemaGrammar);
- }
-
- /**
- * Get the default post processor instance.
- *
- * @return \Illuminate\Database\Query\Processors\MySqlProcessor
- */
- protected function getDefaultPostProcessor()
- {
- return new MySqlProcessor;
- }
-
- /**
- * Get the Doctrine DBAL driver.
- *
- * @return \Doctrine\DBAL\Driver\PDOMySql\Driver
- */
- protected function getDoctrineDriver()
- {
- return new DoctrineDriver;
- }
-
- /**
- * Bind values to their parameters in the given statement.
- *
- * @param \PDOStatement $statement
- * @param array $bindings
- * @return void
- */
- public function bindValues($statement, $bindings)
- {
- foreach ($bindings as $key => $value) {
- $statement->bindValue(
- is_string($key) ? $key : $key + 1, $value,
- is_int($value) || is_float($value) ? PDO::PARAM_INT : PDO::PARAM_STR
- );
- }
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/PostgresConnection.php b/vendor/laravel/framework/src/Illuminate/Database/PostgresConnection.php
deleted file mode 100755
index 01804a7..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/PostgresConnection.php
+++ /dev/null
@@ -1,66 +0,0 @@
-withTablePrefix(new QueryGrammar);
- }
-
- /**
- * Get a schema builder instance for the connection.
- *
- * @return \Illuminate\Database\Schema\PostgresBuilder
- */
- public function getSchemaBuilder()
- {
- if (is_null($this->schemaGrammar)) {
- $this->useDefaultSchemaGrammar();
- }
-
- return new PostgresBuilder($this);
- }
-
- /**
- * Get the default schema grammar instance.
- *
- * @return \Illuminate\Database\Schema\Grammars\PostgresGrammar
- */
- protected function getDefaultSchemaGrammar()
- {
- return $this->withTablePrefix(new SchemaGrammar);
- }
-
- /**
- * Get the default post processor instance.
- *
- * @return \Illuminate\Database\Query\Processors\PostgresProcessor
- */
- protected function getDefaultPostProcessor()
- {
- return new PostgresProcessor;
- }
-
- /**
- * Get the Doctrine DBAL driver.
- *
- * @return \Doctrine\DBAL\Driver\PDOPgSql\Driver
- */
- protected function getDoctrineDriver()
- {
- return new DoctrineDriver;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php
deleted file mode 100755
index 4fa3c6d..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php
+++ /dev/null
@@ -1,2969 +0,0 @@
- [],
- 'from' => [],
- 'join' => [],
- 'where' => [],
- 'having' => [],
- 'order' => [],
- 'union' => [],
- ];
-
- /**
- * An aggregate function and column to be run.
- *
- * @var array
- */
- public $aggregate;
-
- /**
- * The columns that should be returned.
- *
- * @var array
- */
- public $columns;
-
- /**
- * Indicates if the query returns distinct results.
- *
- * @var bool
- */
- public $distinct = false;
-
- /**
- * The table which the query is targeting.
- *
- * @var string
- */
- public $from;
-
- /**
- * The table joins for the query.
- *
- * @var array
- */
- public $joins;
-
- /**
- * The where constraints for the query.
- *
- * @var array
- */
- public $wheres = [];
-
- /**
- * The groupings for the query.
- *
- * @var array
- */
- public $groups;
-
- /**
- * The having constraints for the query.
- *
- * @var array
- */
- public $havings;
-
- /**
- * The orderings for the query.
- *
- * @var array
- */
- public $orders;
-
- /**
- * The maximum number of records to return.
- *
- * @var int
- */
- public $limit;
-
- /**
- * The number of records to skip.
- *
- * @var int
- */
- public $offset;
-
- /**
- * The query union statements.
- *
- * @var array
- */
- public $unions;
-
- /**
- * The maximum number of union records to return.
- *
- * @var int
- */
- public $unionLimit;
-
- /**
- * The number of union records to skip.
- *
- * @var int
- */
- public $unionOffset;
-
- /**
- * The orderings for the union query.
- *
- * @var array
- */
- public $unionOrders;
-
- /**
- * Indicates whether row locking is being used.
- *
- * @var string|bool
- */
- public $lock;
-
- /**
- * All of the available clause operators.
- *
- * @var array
- */
- public $operators = [
- '=', '<', '>', '<=', '>=', '<>', '!=', '<=>',
- 'like', 'like binary', 'not like', 'ilike',
- '&', '|', '^', '<<', '>>',
- 'rlike', 'regexp', 'not regexp',
- '~', '~*', '!~', '!~*', 'similar to',
- 'not similar to', 'not ilike', '~~*', '!~~*',
- ];
-
- /**
- * Whether use write pdo for select.
- *
- * @var bool
- */
- public $useWritePdo = false;
-
- /**
- * Create a new query builder instance.
- *
- * @param \Illuminate\Database\ConnectionInterface $connection
- * @param \Illuminate\Database\Query\Grammars\Grammar $grammar
- * @param \Illuminate\Database\Query\Processors\Processor $processor
- * @return void
- */
- public function __construct(ConnectionInterface $connection,
- Grammar $grammar = null,
- Processor $processor = null)
- {
- $this->connection = $connection;
- $this->grammar = $grammar ?: $connection->getQueryGrammar();
- $this->processor = $processor ?: $connection->getPostProcessor();
- }
-
- /**
- * Set the columns to be selected.
- *
- * @param array|mixed $columns
- * @return $this
- */
- public function select($columns = ['*'])
- {
- $this->columns = is_array($columns) ? $columns : func_get_args();
-
- return $this;
- }
-
- /**
- * Add a subselect expression to the query.
- *
- * @param \Closure|\Illuminate\Database\Query\Builder|string $query
- * @param string $as
- * @return \Illuminate\Database\Query\Builder|static
- *
- * @throws \InvalidArgumentException
- */
- public function selectSub($query, $as)
- {
- [$query, $bindings] = $this->createSub($query);
-
- return $this->selectRaw(
- '('.$query.') as '.$this->grammar->wrap($as), $bindings
- );
- }
-
- /**
- * Add a new "raw" select expression to the query.
- *
- * @param string $expression
- * @param array $bindings
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function selectRaw($expression, array $bindings = [])
- {
- $this->addSelect(new Expression($expression));
-
- if ($bindings) {
- $this->addBinding($bindings, 'select');
- }
-
- return $this;
- }
-
- /**
- * Makes "from" fetch from a subquery.
- *
- * @param \Closure|\Illuminate\Database\Query\Builder|string $query
- * @param string $as
- * @return \Illuminate\Database\Query\Builder|static
- *
- * @throws \InvalidArgumentException
- */
- public function fromSub($query, $as)
- {
- [$query, $bindings] = $this->createSub($query);
-
- return $this->fromRaw('('.$query.') as '.$this->grammar->wrap($as), $bindings);
- }
-
- /**
- * Add a raw from clause to the query.
- *
- * @param string $expression
- * @param mixed $bindings
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function fromRaw($expression, $bindings = [])
- {
- $this->from = new Expression($expression);
-
- $this->addBinding($bindings, 'from');
-
- return $this;
- }
-
- /**
- * Creates a subquery and parse it.
- *
- * @param \Closure|\Illuminate\Database\Query\Builder|string $query
- * @return array
- */
- protected function createSub($query)
- {
- // If the given query is a Closure, we will execute it while passing in a new
- // query instance to the Closure. This will give the developer a chance to
- // format and work with the query before we cast it to a raw SQL string.
- if ($query instanceof Closure) {
- $callback = $query;
-
- $callback($query = $this->forSubQuery());
- }
-
- return $this->parseSub($query);
- }
-
- /**
- * Parse the subquery into SQL and bindings.
- *
- * @param mixed $query
- * @return array
- */
- protected function parseSub($query)
- {
- if ($query instanceof self || $query instanceof EloquentBuilder) {
- return [$query->toSql(), $query->getBindings()];
- } elseif (is_string($query)) {
- return [$query, []];
- } else {
- throw new InvalidArgumentException;
- }
- }
-
- /**
- * Add a new select column to the query.
- *
- * @param array|mixed $column
- * @return $this
- */
- public function addSelect($column)
- {
- $column = is_array($column) ? $column : func_get_args();
-
- $this->columns = array_merge((array) $this->columns, $column);
-
- return $this;
- }
-
- /**
- * Force the query to only return distinct results.
- *
- * @return $this
- */
- public function distinct()
- {
- $this->distinct = true;
-
- return $this;
- }
-
- /**
- * Set the table which the query is targeting.
- *
- * @param string $table
- * @return $this
- */
- public function from($table)
- {
- $this->from = $table;
-
- return $this;
- }
-
- /**
- * Add a join clause to the query.
- *
- * @param string $table
- * @param \Closure|string $first
- * @param string|null $operator
- * @param string|null $second
- * @param string $type
- * @param bool $where
- * @return $this
- */
- public function join($table, $first, $operator = null, $second = null, $type = 'inner', $where = false)
- {
- $join = $this->newJoinClause($this, $type, $table);
-
- // If the first "column" of the join is really a Closure instance the developer
- // is trying to build a join with a complex "on" clause containing more than
- // one condition, so we'll add the join and call a Closure with the query.
- if ($first instanceof Closure) {
- call_user_func($first, $join);
-
- $this->joins[] = $join;
-
- $this->addBinding($join->getBindings(), 'join');
- }
-
- // If the column is simply a string, we can assume the join simply has a basic
- // "on" clause with a single condition. So we will just build the join with
- // this simple join clauses attached to it. There is not a join callback.
- else {
- $method = $where ? 'where' : 'on';
-
- $this->joins[] = $join->$method($first, $operator, $second);
-
- $this->addBinding($join->getBindings(), 'join');
- }
-
- return $this;
- }
-
- /**
- * Add a "join where" clause to the query.
- *
- * @param string $table
- * @param \Closure|string $first
- * @param string $operator
- * @param string $second
- * @param string $type
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function joinWhere($table, $first, $operator, $second, $type = 'inner')
- {
- return $this->join($table, $first, $operator, $second, $type, true);
- }
-
- /**
- * Add a subquery join clause to the query.
- *
- * @param \Closure|\Illuminate\Database\Query\Builder|string $query
- * @param string $as
- * @param \Closure|string $first
- * @param string|null $operator
- * @param string|null $second
- * @param string $type
- * @param bool $where
- * @return \Illuminate\Database\Query\Builder|static
- *
- * @throws \InvalidArgumentException
- */
- public function joinSub($query, $as, $first, $operator = null, $second = null, $type = 'inner', $where = false)
- {
- [$query, $bindings] = $this->createSub($query);
-
- $expression = '('.$query.') as '.$this->grammar->wrap($as);
-
- $this->addBinding($bindings, 'join');
-
- return $this->join(new Expression($expression), $first, $operator, $second, $type, $where);
- }
-
- /**
- * Add a left join to the query.
- *
- * @param string $table
- * @param \Closure|string $first
- * @param string|null $operator
- * @param string|null $second
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function leftJoin($table, $first, $operator = null, $second = null)
- {
- return $this->join($table, $first, $operator, $second, 'left');
- }
-
- /**
- * Add a "join where" clause to the query.
- *
- * @param string $table
- * @param \Closure|string $first
- * @param string $operator
- * @param string $second
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function leftJoinWhere($table, $first, $operator, $second)
- {
- return $this->joinWhere($table, $first, $operator, $second, 'left');
- }
-
- /**
- * Add a subquery left join to the query.
- *
- * @param \Closure|\Illuminate\Database\Query\Builder|string $query
- * @param string $as
- * @param \Closure|string $first
- * @param string|null $operator
- * @param string|null $second
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function leftJoinSub($query, $as, $first, $operator = null, $second = null)
- {
- return $this->joinSub($query, $as, $first, $operator, $second, 'left');
- }
-
- /**
- * Add a right join to the query.
- *
- * @param string $table
- * @param \Closure|string $first
- * @param string|null $operator
- * @param string|null $second
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function rightJoin($table, $first, $operator = null, $second = null)
- {
- return $this->join($table, $first, $operator, $second, 'right');
- }
-
- /**
- * Add a "right join where" clause to the query.
- *
- * @param string $table
- * @param \Closure|string $first
- * @param string $operator
- * @param string $second
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function rightJoinWhere($table, $first, $operator, $second)
- {
- return $this->joinWhere($table, $first, $operator, $second, 'right');
- }
-
- /**
- * Add a subquery right join to the query.
- *
- * @param \Closure|\Illuminate\Database\Query\Builder|string $query
- * @param string $as
- * @param \Closure|string $first
- * @param string|null $operator
- * @param string|null $second
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function rightJoinSub($query, $as, $first, $operator = null, $second = null)
- {
- return $this->joinSub($query, $as, $first, $operator, $second, 'right');
- }
-
- /**
- * Add a "cross join" clause to the query.
- *
- * @param string $table
- * @param \Closure|string|null $first
- * @param string|null $operator
- * @param string|null $second
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function crossJoin($table, $first = null, $operator = null, $second = null)
- {
- if ($first) {
- return $this->join($table, $first, $operator, $second, 'cross');
- }
-
- $this->joins[] = $this->newJoinClause($this, 'cross', $table);
-
- return $this;
- }
-
- /**
- * Get a new join clause.
- *
- * @param \Illuminate\Database\Query\Builder $parentQuery
- * @param string $type
- * @param string $table
- * @return \Illuminate\Database\Query\JoinClause
- */
- protected function newJoinClause(self $parentQuery, $type, $table)
- {
- return new JoinClause($parentQuery, $type, $table);
- }
-
- /**
- * Merge an array of where clauses and bindings.
- *
- * @param array $wheres
- * @param array $bindings
- * @return void
- */
- public function mergeWheres($wheres, $bindings)
- {
- $this->wheres = array_merge($this->wheres, (array) $wheres);
-
- $this->bindings['where'] = array_values(
- array_merge($this->bindings['where'], (array) $bindings)
- );
- }
-
- /**
- * Add a basic where clause to the query.
- *
- * @param string|array|\Closure $column
- * @param mixed $operator
- * @param mixed $value
- * @param string $boolean
- * @return $this
- */
- public function where($column, $operator = null, $value = null, $boolean = 'and')
- {
- // If the column is an array, we will assume it is an array of key-value pairs
- // and can add them each as a where clause. We will maintain the boolean we
- // received when the method was called and pass it into the nested where.
- if (is_array($column)) {
- return $this->addArrayOfWheres($column, $boolean);
- }
-
- // Here we will make some assumptions about the operator. If only 2 values are
- // passed to the method, we will assume that the operator is an equals sign
- // and keep going. Otherwise, we'll require the operator to be passed in.
- [$value, $operator] = $this->prepareValueAndOperator(
- $value, $operator, func_num_args() === 2
- );
-
- // If the columns is actually a Closure instance, we will assume the developer
- // wants to begin a nested where statement which is wrapped in parenthesis.
- // We'll add that Closure to the query then return back out immediately.
- if ($column instanceof Closure) {
- return $this->whereNested($column, $boolean);
- }
-
- // If the given operator is not found in the list of valid operators we will
- // assume that the developer is just short-cutting the '=' operators and
- // we will set the operators to '=' and set the values appropriately.
- if ($this->invalidOperator($operator)) {
- [$value, $operator] = [$operator, '='];
- }
-
- // If the value is a Closure, it means the developer is performing an entire
- // sub-select within the query and we will need to compile the sub-select
- // within the where clause to get the appropriate query record results.
- if ($value instanceof Closure) {
- return $this->whereSub($column, $operator, $value, $boolean);
- }
-
- // If the value is "null", we will just assume the developer wants to add a
- // where null clause to the query. So, we will allow a short-cut here to
- // that method for convenience so the developer doesn't have to check.
- if (is_null($value)) {
- return $this->whereNull($column, $boolean, $operator !== '=');
- }
-
- // If the column is making a JSON reference we'll check to see if the value
- // is a boolean. If it is, we'll add the raw boolean string as an actual
- // value to the query to ensure this is properly handled by the query.
- if (Str::contains($column, '->') && is_bool($value)) {
- $value = new Expression($value ? 'true' : 'false');
- }
-
- // Now that we are working with just a simple query we can put the elements
- // in our array and add the query binding to our array of bindings that
- // will be bound to each SQL statements when it is finally executed.
- $type = 'Basic';
-
- $this->wheres[] = compact(
- 'type', 'column', 'operator', 'value', 'boolean'
- );
-
- if (! $value instanceof Expression) {
- $this->addBinding($value, 'where');
- }
-
- return $this;
- }
-
- /**
- * Add an array of where clauses to the query.
- *
- * @param array $column
- * @param string $boolean
- * @param string $method
- * @return $this
- */
- protected function addArrayOfWheres($column, $boolean, $method = 'where')
- {
- return $this->whereNested(function ($query) use ($column, $method, $boolean) {
- foreach ($column as $key => $value) {
- if (is_numeric($key) && is_array($value)) {
- $query->{$method}(...array_values($value));
- } else {
- $query->$method($key, '=', $value, $boolean);
- }
- }
- }, $boolean);
- }
-
- /**
- * Prepare the value and operator for a where clause.
- *
- * @param string $value
- * @param string $operator
- * @param bool $useDefault
- * @return array
- *
- * @throws \InvalidArgumentException
- */
- public function prepareValueAndOperator($value, $operator, $useDefault = false)
- {
- if ($useDefault) {
- return [$operator, '='];
- } elseif ($this->invalidOperatorAndValue($operator, $value)) {
- throw new InvalidArgumentException('Illegal operator and value combination.');
- }
-
- return [$value, $operator];
- }
-
- /**
- * Determine if the given operator and value combination is legal.
- *
- * Prevents using Null values with invalid operators.
- *
- * @param string $operator
- * @param mixed $value
- * @return bool
- */
- protected function invalidOperatorAndValue($operator, $value)
- {
- return is_null($value) && in_array($operator, $this->operators) &&
- ! in_array($operator, ['=', '<>', '!=']);
- }
-
- /**
- * Determine if the given operator is supported.
- *
- * @param string $operator
- * @return bool
- */
- protected function invalidOperator($operator)
- {
- return ! in_array(strtolower($operator), $this->operators, true) &&
- ! in_array(strtolower($operator), $this->grammar->getOperators(), true);
- }
-
- /**
- * Add an "or where" clause to the query.
- *
- * @param string|array|\Closure $column
- * @param mixed $operator
- * @param mixed $value
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function orWhere($column, $operator = null, $value = null)
- {
- [$value, $operator] = $this->prepareValueAndOperator(
- $value, $operator, func_num_args() === 2
- );
-
- return $this->where($column, $operator, $value, 'or');
- }
-
- /**
- * Add a "where" clause comparing two columns to the query.
- *
- * @param string|array $first
- * @param string|null $operator
- * @param string|null $second
- * @param string|null $boolean
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function whereColumn($first, $operator = null, $second = null, $boolean = 'and')
- {
- // If the column is an array, we will assume it is an array of key-value pairs
- // and can add them each as a where clause. We will maintain the boolean we
- // received when the method was called and pass it into the nested where.
- if (is_array($first)) {
- return $this->addArrayOfWheres($first, $boolean, 'whereColumn');
- }
-
- // If the given operator is not found in the list of valid operators we will
- // assume that the developer is just short-cutting the '=' operators and
- // we will set the operators to '=' and set the values appropriately.
- if ($this->invalidOperator($operator)) {
- [$second, $operator] = [$operator, '='];
- }
-
- // Finally, we will add this where clause into this array of clauses that we
- // are building for the query. All of them will be compiled via a grammar
- // once the query is about to be executed and run against the database.
- $type = 'Column';
-
- $this->wheres[] = compact(
- 'type', 'first', 'operator', 'second', 'boolean'
- );
-
- return $this;
- }
-
- /**
- * Add an "or where" clause comparing two columns to the query.
- *
- * @param string|array $first
- * @param string|null $operator
- * @param string|null $second
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function orWhereColumn($first, $operator = null, $second = null)
- {
- return $this->whereColumn($first, $operator, $second, 'or');
- }
-
- /**
- * Add a raw where clause to the query.
- *
- * @param string $sql
- * @param mixed $bindings
- * @param string $boolean
- * @return $this
- */
- public function whereRaw($sql, $bindings = [], $boolean = 'and')
- {
- $this->wheres[] = ['type' => 'raw', 'sql' => $sql, 'boolean' => $boolean];
-
- $this->addBinding((array) $bindings, 'where');
-
- return $this;
- }
-
- /**
- * Add a raw or where clause to the query.
- *
- * @param string $sql
- * @param mixed $bindings
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function orWhereRaw($sql, $bindings = [])
- {
- return $this->whereRaw($sql, $bindings, 'or');
- }
-
- /**
- * Add a "where in" clause to the query.
- *
- * @param string $column
- * @param mixed $values
- * @param string $boolean
- * @param bool $not
- * @return $this
- */
- public function whereIn($column, $values, $boolean = 'and', $not = false)
- {
- $type = $not ? 'NotIn' : 'In';
-
- if ($values instanceof EloquentBuilder) {
- $values = $values->getQuery();
- }
-
- // If the value is a query builder instance we will assume the developer wants to
- // look for any values that exists within this given query. So we will add the
- // query accordingly so that this query is properly executed when it is run.
- if ($values instanceof self) {
- return $this->whereInExistingQuery(
- $column, $values, $boolean, $not
- );
- }
-
- // If the value of the where in clause is actually a Closure, we will assume that
- // the developer is using a full sub-select for this "in" statement, and will
- // execute those Closures, then we can re-construct the entire sub-selects.
- if ($values instanceof Closure) {
- return $this->whereInSub($column, $values, $boolean, $not);
- }
-
- // Next, if the value is Arrayable we need to cast it to its raw array form so we
- // have the underlying array value instead of an Arrayable object which is not
- // able to be added as a binding, etc. We will then add to the wheres array.
- if ($values instanceof Arrayable) {
- $values = $values->toArray();
- }
-
- $this->wheres[] = compact('type', 'column', 'values', 'boolean');
-
- // Finally we'll add a binding for each values unless that value is an expression
- // in which case we will just skip over it since it will be the query as a raw
- // string and not as a parameterized place-holder to be replaced by the PDO.
- $this->addBinding($this->cleanBindings($values), 'where');
-
- return $this;
- }
-
- /**
- * Add an "or where in" clause to the query.
- *
- * @param string $column
- * @param mixed $values
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function orWhereIn($column, $values)
- {
- return $this->whereIn($column, $values, 'or');
- }
-
- /**
- * Add a "where not in" clause to the query.
- *
- * @param string $column
- * @param mixed $values
- * @param string $boolean
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function whereNotIn($column, $values, $boolean = 'and')
- {
- return $this->whereIn($column, $values, $boolean, true);
- }
-
- /**
- * Add an "or where not in" clause to the query.
- *
- * @param string $column
- * @param mixed $values
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function orWhereNotIn($column, $values)
- {
- return $this->whereNotIn($column, $values, 'or');
- }
-
- /**
- * Add a where in with a sub-select to the query.
- *
- * @param string $column
- * @param \Closure $callback
- * @param string $boolean
- * @param bool $not
- * @return $this
- */
- protected function whereInSub($column, Closure $callback, $boolean, $not)
- {
- $type = $not ? 'NotInSub' : 'InSub';
-
- // To create the exists sub-select, we will actually create a query and call the
- // provided callback with the query so the developer may set any of the query
- // conditions they want for the in clause, then we'll put it in this array.
- call_user_func($callback, $query = $this->forSubQuery());
-
- $this->wheres[] = compact('type', 'column', 'query', 'boolean');
-
- $this->addBinding($query->getBindings(), 'where');
-
- return $this;
- }
-
- /**
- * Add an external sub-select to the query.
- *
- * @param string $column
- * @param \Illuminate\Database\Query\Builder|static $query
- * @param string $boolean
- * @param bool $not
- * @return $this
- */
- protected function whereInExistingQuery($column, $query, $boolean, $not)
- {
- $type = $not ? 'NotInSub' : 'InSub';
-
- $this->wheres[] = compact('type', 'column', 'query', 'boolean');
-
- $this->addBinding($query->getBindings(), 'where');
-
- return $this;
- }
-
- /**
- * Add a "where in raw" clause for integer values to the query.
- *
- * @param string $column
- * @param \Illuminate\Contracts\Support\Arrayable|array $values
- * @param string $boolean
- * @param bool $not
- * @return $this
- */
- public function whereIntegerInRaw($column, $values, $boolean = 'and', $not = false)
- {
- $type = $not ? 'NotInRaw' : 'InRaw';
-
- if ($values instanceof Arrayable) {
- $values = $values->toArray();
- }
-
- foreach ($values as &$value) {
- $value = (int) $value;
- }
-
- $this->wheres[] = compact('type', 'column', 'values', 'boolean');
-
- return $this;
- }
-
- /**
- * Add a "where not in raw" clause for integer values to the query.
- *
- * @param string $column
- * @param \Illuminate\Contracts\Support\Arrayable|array $values
- * @param string $boolean
- * @return $this
- */
- public function whereIntegerNotInRaw($column, $values, $boolean = 'and')
- {
- return $this->whereIntegerInRaw($column, $values, $boolean, true);
- }
-
- /**
- * Add a "where null" clause to the query.
- *
- * @param string $column
- * @param string $boolean
- * @param bool $not
- * @return $this
- */
- public function whereNull($column, $boolean = 'and', $not = false)
- {
- $type = $not ? 'NotNull' : 'Null';
-
- $this->wheres[] = compact('type', 'column', 'boolean');
-
- return $this;
- }
-
- /**
- * Add an "or where null" clause to the query.
- *
- * @param string $column
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function orWhereNull($column)
- {
- return $this->whereNull($column, 'or');
- }
-
- /**
- * Add a "where not null" clause to the query.
- *
- * @param string $column
- * @param string $boolean
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function whereNotNull($column, $boolean = 'and')
- {
- return $this->whereNull($column, $boolean, true);
- }
-
- /**
- * Add a where between statement to the query.
- *
- * @param string $column
- * @param array $values
- * @param string $boolean
- * @param bool $not
- * @return $this
- */
- public function whereBetween($column, array $values, $boolean = 'and', $not = false)
- {
- $type = 'between';
-
- $this->wheres[] = compact('type', 'column', 'values', 'boolean', 'not');
-
- $this->addBinding($this->cleanBindings($values), 'where');
-
- return $this;
- }
-
- /**
- * Add an or where between statement to the query.
- *
- * @param string $column
- * @param array $values
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function orWhereBetween($column, array $values)
- {
- return $this->whereBetween($column, $values, 'or');
- }
-
- /**
- * Add a where not between statement to the query.
- *
- * @param string $column
- * @param array $values
- * @param string $boolean
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function whereNotBetween($column, array $values, $boolean = 'and')
- {
- return $this->whereBetween($column, $values, $boolean, true);
- }
-
- /**
- * Add an or where not between statement to the query.
- *
- * @param string $column
- * @param array $values
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function orWhereNotBetween($column, array $values)
- {
- return $this->whereNotBetween($column, $values, 'or');
- }
-
- /**
- * Add an "or where not null" clause to the query.
- *
- * @param string $column
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function orWhereNotNull($column)
- {
- return $this->whereNotNull($column, 'or');
- }
-
- /**
- * Add a "where date" statement to the query.
- *
- * @param string $column
- * @param string $operator
- * @param \DateTimeInterface|string $value
- * @param string $boolean
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function whereDate($column, $operator, $value = null, $boolean = 'and')
- {
- [$value, $operator] = $this->prepareValueAndOperator(
- $value, $operator, func_num_args() === 2
- );
-
- if ($value instanceof DateTimeInterface) {
- $value = $value->format('Y-m-d');
- }
-
- return $this->addDateBasedWhere('Date', $column, $operator, $value, $boolean);
- }
-
- /**
- * Add an "or where date" statement to the query.
- *
- * @param string $column
- * @param string $operator
- * @param \DateTimeInterface|string $value
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function orWhereDate($column, $operator, $value = null)
- {
- [$value, $operator] = $this->prepareValueAndOperator(
- $value, $operator, func_num_args() === 2
- );
-
- return $this->whereDate($column, $operator, $value, 'or');
- }
-
- /**
- * Add a "where time" statement to the query.
- *
- * @param string $column
- * @param string $operator
- * @param \DateTimeInterface|string $value
- * @param string $boolean
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function whereTime($column, $operator, $value = null, $boolean = 'and')
- {
- [$value, $operator] = $this->prepareValueAndOperator(
- $value, $operator, func_num_args() === 2
- );
-
- if ($value instanceof DateTimeInterface) {
- $value = $value->format('H:i:s');
- }
-
- return $this->addDateBasedWhere('Time', $column, $operator, $value, $boolean);
- }
-
- /**
- * Add an "or where time" statement to the query.
- *
- * @param string $column
- * @param string $operator
- * @param \DateTimeInterface|string $value
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function orWhereTime($column, $operator, $value = null)
- {
- [$value, $operator] = $this->prepareValueAndOperator(
- $value, $operator, func_num_args() === 2
- );
-
- return $this->whereTime($column, $operator, $value, 'or');
- }
-
- /**
- * Add a "where day" statement to the query.
- *
- * @param string $column
- * @param string $operator
- * @param \DateTimeInterface|string $value
- * @param string $boolean
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function whereDay($column, $operator, $value = null, $boolean = 'and')
- {
- [$value, $operator] = $this->prepareValueAndOperator(
- $value, $operator, func_num_args() === 2
- );
-
- if ($value instanceof DateTimeInterface) {
- $value = $value->format('d');
- }
-
- return $this->addDateBasedWhere('Day', $column, $operator, $value, $boolean);
- }
-
- /**
- * Add an "or where day" statement to the query.
- *
- * @param string $column
- * @param string $operator
- * @param \DateTimeInterface|string $value
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function orWhereDay($column, $operator, $value = null)
- {
- [$value, $operator] = $this->prepareValueAndOperator(
- $value, $operator, func_num_args() === 2
- );
-
- return $this->addDateBasedWhere('Day', $column, $operator, $value, 'or');
- }
-
- /**
- * Add a "where month" statement to the query.
- *
- * @param string $column
- * @param string $operator
- * @param \DateTimeInterface|string $value
- * @param string $boolean
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function whereMonth($column, $operator, $value = null, $boolean = 'and')
- {
- [$value, $operator] = $this->prepareValueAndOperator(
- $value, $operator, func_num_args() === 2
- );
-
- if ($value instanceof DateTimeInterface) {
- $value = $value->format('m');
- }
-
- return $this->addDateBasedWhere('Month', $column, $operator, $value, $boolean);
- }
-
- /**
- * Add an "or where month" statement to the query.
- *
- * @param string $column
- * @param string $operator
- * @param \DateTimeInterface|string $value
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function orWhereMonth($column, $operator, $value = null)
- {
- [$value, $operator] = $this->prepareValueAndOperator(
- $value, $operator, func_num_args() === 2
- );
-
- return $this->addDateBasedWhere('Month', $column, $operator, $value, 'or');
- }
-
- /**
- * Add a "where year" statement to the query.
- *
- * @param string $column
- * @param string $operator
- * @param \DateTimeInterface|string|int $value
- * @param string $boolean
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function whereYear($column, $operator, $value = null, $boolean = 'and')
- {
- [$value, $operator] = $this->prepareValueAndOperator(
- $value, $operator, func_num_args() === 2
- );
-
- if ($value instanceof DateTimeInterface) {
- $value = $value->format('Y');
- }
-
- return $this->addDateBasedWhere('Year', $column, $operator, $value, $boolean);
- }
-
- /**
- * Add an "or where year" statement to the query.
- *
- * @param string $column
- * @param string $operator
- * @param \DateTimeInterface|string|int $value
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function orWhereYear($column, $operator, $value = null)
- {
- [$value, $operator] = $this->prepareValueAndOperator(
- $value, $operator, func_num_args() === 2
- );
-
- return $this->addDateBasedWhere('Year', $column, $operator, $value, 'or');
- }
-
- /**
- * Add a date based (year, month, day, time) statement to the query.
- *
- * @param string $type
- * @param string $column
- * @param string $operator
- * @param mixed $value
- * @param string $boolean
- * @return $this
- */
- protected function addDateBasedWhere($type, $column, $operator, $value, $boolean = 'and')
- {
- $this->wheres[] = compact('column', 'type', 'boolean', 'operator', 'value');
-
- if (! $value instanceof Expression) {
- $this->addBinding($value, 'where');
- }
-
- return $this;
- }
-
- /**
- * Add a nested where statement to the query.
- *
- * @param \Closure $callback
- * @param string $boolean
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function whereNested(Closure $callback, $boolean = 'and')
- {
- call_user_func($callback, $query = $this->forNestedWhere());
-
- return $this->addNestedWhereQuery($query, $boolean);
- }
-
- /**
- * Create a new query instance for nested where condition.
- *
- * @return \Illuminate\Database\Query\Builder
- */
- public function forNestedWhere()
- {
- return $this->newQuery()->from($this->from);
- }
-
- /**
- * Add another query builder as a nested where to the query builder.
- *
- * @param \Illuminate\Database\Query\Builder|static $query
- * @param string $boolean
- * @return $this
- */
- public function addNestedWhereQuery($query, $boolean = 'and')
- {
- if (count($query->wheres)) {
- $type = 'Nested';
-
- $this->wheres[] = compact('type', 'query', 'boolean');
-
- $this->addBinding($query->getRawBindings()['where'], 'where');
- }
-
- return $this;
- }
-
- /**
- * Add a full sub-select to the query.
- *
- * @param string $column
- * @param string $operator
- * @param \Closure $callback
- * @param string $boolean
- * @return $this
- */
- protected function whereSub($column, $operator, Closure $callback, $boolean)
- {
- $type = 'Sub';
-
- // Once we have the query instance we can simply execute it so it can add all
- // of the sub-select's conditions to itself, and then we can cache it off
- // in the array of where clauses for the "main" parent query instance.
- call_user_func($callback, $query = $this->forSubQuery());
-
- $this->wheres[] = compact(
- 'type', 'column', 'operator', 'query', 'boolean'
- );
-
- $this->addBinding($query->getBindings(), 'where');
-
- return $this;
- }
-
- /**
- * Add an exists clause to the query.
- *
- * @param \Closure $callback
- * @param string $boolean
- * @param bool $not
- * @return $this
- */
- public function whereExists(Closure $callback, $boolean = 'and', $not = false)
- {
- $query = $this->forSubQuery();
-
- // Similar to the sub-select clause, we will create a new query instance so
- // the developer may cleanly specify the entire exists query and we will
- // compile the whole thing in the grammar and insert it into the SQL.
- call_user_func($callback, $query);
-
- return $this->addWhereExistsQuery($query, $boolean, $not);
- }
-
- /**
- * Add an or exists clause to the query.
- *
- * @param \Closure $callback
- * @param bool $not
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function orWhereExists(Closure $callback, $not = false)
- {
- return $this->whereExists($callback, 'or', $not);
- }
-
- /**
- * Add a where not exists clause to the query.
- *
- * @param \Closure $callback
- * @param string $boolean
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function whereNotExists(Closure $callback, $boolean = 'and')
- {
- return $this->whereExists($callback, $boolean, true);
- }
-
- /**
- * Add a where not exists clause to the query.
- *
- * @param \Closure $callback
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function orWhereNotExists(Closure $callback)
- {
- return $this->orWhereExists($callback, true);
- }
-
- /**
- * Add an exists clause to the query.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param string $boolean
- * @param bool $not
- * @return $this
- */
- public function addWhereExistsQuery(self $query, $boolean = 'and', $not = false)
- {
- $type = $not ? 'NotExists' : 'Exists';
-
- $this->wheres[] = compact('type', 'query', 'boolean');
-
- $this->addBinding($query->getBindings(), 'where');
-
- return $this;
- }
-
- /**
- * Adds a where condition using row values.
- *
- * @param array $columns
- * @param string $operator
- * @param array $values
- * @param string $boolean
- * @return $this
- */
- public function whereRowValues($columns, $operator, $values, $boolean = 'and')
- {
- if (count($columns) !== count($values)) {
- throw new InvalidArgumentException('The number of columns must match the number of values');
- }
-
- $type = 'RowValues';
-
- $this->wheres[] = compact('type', 'columns', 'operator', 'values', 'boolean');
-
- $this->addBinding($this->cleanBindings($values));
-
- return $this;
- }
-
- /**
- * Adds a or where condition using row values.
- *
- * @param array $columns
- * @param string $operator
- * @param array $values
- * @return $this
- */
- public function orWhereRowValues($columns, $operator, $values)
- {
- return $this->whereRowValues($columns, $operator, $values, 'or');
- }
-
- /**
- * Add a "where JSON contains" clause to the query.
- *
- * @param string $column
- * @param mixed $value
- * @param string $boolean
- * @param bool $not
- * @return $this
- */
- public function whereJsonContains($column, $value, $boolean = 'and', $not = false)
- {
- $type = 'JsonContains';
-
- $this->wheres[] = compact('type', 'column', 'value', 'boolean', 'not');
-
- if (! $value instanceof Expression) {
- $this->addBinding($this->grammar->prepareBindingForJsonContains($value));
- }
-
- return $this;
- }
-
- /**
- * Add a "or where JSON contains" clause to the query.
- *
- * @param string $column
- * @param mixed $value
- * @return $this
- */
- public function orWhereJsonContains($column, $value)
- {
- return $this->whereJsonContains($column, $value, 'or');
- }
-
- /**
- * Add a "where JSON not contains" clause to the query.
- *
- * @param string $column
- * @param mixed $value
- * @param string $boolean
- * @return $this
- */
- public function whereJsonDoesntContain($column, $value, $boolean = 'and')
- {
- return $this->whereJsonContains($column, $value, $boolean, true);
- }
-
- /**
- * Add a "or where JSON not contains" clause to the query.
- *
- * @param string $column
- * @param mixed $value
- * @return $this
- */
- public function orWhereJsonDoesntContain($column, $value)
- {
- return $this->whereJsonDoesntContain($column, $value, 'or');
- }
-
- /**
- * Add a "where JSON length" clause to the query.
- *
- * @param string $column
- * @param mixed $operator
- * @param mixed $value
- * @param string $boolean
- * @return $this
- */
- public function whereJsonLength($column, $operator, $value = null, $boolean = 'and')
- {
- $type = 'JsonLength';
-
- [$value, $operator] = $this->prepareValueAndOperator(
- $value, $operator, func_num_args() === 2
- );
-
- $this->wheres[] = compact('type', 'column', 'operator', 'value', 'boolean');
-
- if (! $value instanceof Expression) {
- $this->addBinding($value);
- }
-
- return $this;
- }
-
- /**
- * Add a "or where JSON length" clause to the query.
- *
- * @param string $column
- * @param mixed $operator
- * @param mixed $value
- * @return $this
- */
- public function orWhereJsonLength($column, $operator, $value = null)
- {
- [$value, $operator] = $this->prepareValueAndOperator(
- $value, $operator, func_num_args() === 2
- );
-
- return $this->whereJsonLength($column, $operator, $value, 'or');
- }
-
- /**
- * Handles dynamic "where" clauses to the query.
- *
- * @param string $method
- * @param string $parameters
- * @return $this
- */
- public function dynamicWhere($method, $parameters)
- {
- $finder = substr($method, 5);
-
- $segments = preg_split(
- '/(And|Or)(?=[A-Z])/', $finder, -1, PREG_SPLIT_DELIM_CAPTURE
- );
-
- // The connector variable will determine which connector will be used for the
- // query condition. We will change it as we come across new boolean values
- // in the dynamic method strings, which could contain a number of these.
- $connector = 'and';
-
- $index = 0;
-
- foreach ($segments as $segment) {
- // If the segment is not a boolean connector, we can assume it is a column's name
- // and we will add it to the query as a new constraint as a where clause, then
- // we can keep iterating through the dynamic method string's segments again.
- if ($segment !== 'And' && $segment !== 'Or') {
- $this->addDynamic($segment, $connector, $parameters, $index);
-
- $index++;
- }
-
- // Otherwise, we will store the connector so we know how the next where clause we
- // find in the query should be connected to the previous ones, meaning we will
- // have the proper boolean connector to connect the next where clause found.
- else {
- $connector = $segment;
- }
- }
-
- return $this;
- }
-
- /**
- * Add a single dynamic where clause statement to the query.
- *
- * @param string $segment
- * @param string $connector
- * @param array $parameters
- * @param int $index
- * @return void
- */
- protected function addDynamic($segment, $connector, $parameters, $index)
- {
- // Once we have parsed out the columns and formatted the boolean operators we
- // are ready to add it to this query as a where clause just like any other
- // clause on the query. Then we'll increment the parameter index values.
- $bool = strtolower($connector);
-
- $this->where(Str::snake($segment), '=', $parameters[$index], $bool);
- }
-
- /**
- * Add a "group by" clause to the query.
- *
- * @param array ...$groups
- * @return $this
- */
- public function groupBy(...$groups)
- {
- foreach ($groups as $group) {
- $this->groups = array_merge(
- (array) $this->groups,
- Arr::wrap($group)
- );
- }
-
- return $this;
- }
-
- /**
- * Add a "having" clause to the query.
- *
- * @param string $column
- * @param string|null $operator
- * @param string|null $value
- * @param string $boolean
- * @return $this
- */
- public function having($column, $operator = null, $value = null, $boolean = 'and')
- {
- $type = 'Basic';
-
- // Here we will make some assumptions about the operator. If only 2 values are
- // passed to the method, we will assume that the operator is an equals sign
- // and keep going. Otherwise, we'll require the operator to be passed in.
- [$value, $operator] = $this->prepareValueAndOperator(
- $value, $operator, func_num_args() === 2
- );
-
- // If the given operator is not found in the list of valid operators we will
- // assume that the developer is just short-cutting the '=' operators and
- // we will set the operators to '=' and set the values appropriately.
- if ($this->invalidOperator($operator)) {
- [$value, $operator] = [$operator, '='];
- }
-
- $this->havings[] = compact('type', 'column', 'operator', 'value', 'boolean');
-
- if (! $value instanceof Expression) {
- $this->addBinding($value, 'having');
- }
-
- return $this;
- }
-
- /**
- * Add a "or having" clause to the query.
- *
- * @param string $column
- * @param string|null $operator
- * @param string|null $value
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function orHaving($column, $operator = null, $value = null)
- {
- [$value, $operator] = $this->prepareValueAndOperator(
- $value, $operator, func_num_args() === 2
- );
-
- return $this->having($column, $operator, $value, 'or');
- }
-
- /**
- * Add a "having between " clause to the query.
- *
- * @param string $column
- * @param array $values
- * @param string $boolean
- * @param bool $not
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function havingBetween($column, array $values, $boolean = 'and', $not = false)
- {
- $type = 'between';
-
- $this->havings[] = compact('type', 'column', 'values', 'boolean', 'not');
-
- $this->addBinding($this->cleanBindings($values), 'having');
-
- return $this;
- }
-
- /**
- * Add a raw having clause to the query.
- *
- * @param string $sql
- * @param array $bindings
- * @param string $boolean
- * @return $this
- */
- public function havingRaw($sql, array $bindings = [], $boolean = 'and')
- {
- $type = 'Raw';
-
- $this->havings[] = compact('type', 'sql', 'boolean');
-
- $this->addBinding($bindings, 'having');
-
- return $this;
- }
-
- /**
- * Add a raw or having clause to the query.
- *
- * @param string $sql
- * @param array $bindings
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function orHavingRaw($sql, array $bindings = [])
- {
- return $this->havingRaw($sql, $bindings, 'or');
- }
-
- /**
- * Add an "order by" clause to the query.
- *
- * @param string $column
- * @param string $direction
- * @return $this
- */
- public function orderBy($column, $direction = 'asc')
- {
- $this->{$this->unions ? 'unionOrders' : 'orders'}[] = [
- 'column' => $column,
- 'direction' => strtolower($direction) === 'asc' ? 'asc' : 'desc',
- ];
-
- return $this;
- }
-
- /**
- * Add a descending "order by" clause to the query.
- *
- * @param string $column
- * @return $this
- */
- public function orderByDesc($column)
- {
- return $this->orderBy($column, 'desc');
- }
-
- /**
- * Add an "order by" clause for a timestamp to the query.
- *
- * @param string $column
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function latest($column = 'created_at')
- {
- return $this->orderBy($column, 'desc');
- }
-
- /**
- * Add an "order by" clause for a timestamp to the query.
- *
- * @param string $column
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function oldest($column = 'created_at')
- {
- return $this->orderBy($column, 'asc');
- }
-
- /**
- * Put the query's results in random order.
- *
- * @param string $seed
- * @return $this
- */
- public function inRandomOrder($seed = '')
- {
- return $this->orderByRaw($this->grammar->compileRandom($seed));
- }
-
- /**
- * Add a raw "order by" clause to the query.
- *
- * @param string $sql
- * @param array $bindings
- * @return $this
- */
- public function orderByRaw($sql, $bindings = [])
- {
- $type = 'Raw';
-
- $this->{$this->unions ? 'unionOrders' : 'orders'}[] = compact('type', 'sql');
-
- $this->addBinding($bindings, 'order');
-
- return $this;
- }
-
- /**
- * Alias to set the "offset" value of the query.
- *
- * @param int $value
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function skip($value)
- {
- return $this->offset($value);
- }
-
- /**
- * Set the "offset" value of the query.
- *
- * @param int $value
- * @return $this
- */
- public function offset($value)
- {
- $property = $this->unions ? 'unionOffset' : 'offset';
-
- $this->$property = max(0, $value);
-
- return $this;
- }
-
- /**
- * Alias to set the "limit" value of the query.
- *
- * @param int $value
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function take($value)
- {
- return $this->limit($value);
- }
-
- /**
- * Set the "limit" value of the query.
- *
- * @param int $value
- * @return $this
- */
- public function limit($value)
- {
- $property = $this->unions ? 'unionLimit' : 'limit';
-
- if ($value >= 0) {
- $this->$property = $value;
- }
-
- return $this;
- }
-
- /**
- * Set the limit and offset for a given page.
- *
- * @param int $page
- * @param int $perPage
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function forPage($page, $perPage = 15)
- {
- return $this->skip(($page - 1) * $perPage)->take($perPage);
- }
-
- /**
- * Constrain the query to the next "page" of results after a given ID.
- *
- * @param int $perPage
- * @param int|null $lastId
- * @param string $column
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function forPageAfterId($perPage = 15, $lastId = 0, $column = 'id')
- {
- $this->orders = $this->removeExistingOrdersFor($column);
-
- if (! is_null($lastId)) {
- $this->where($column, '>', $lastId);
- }
-
- return $this->orderBy($column, 'asc')
- ->take($perPage);
- }
-
- /**
- * Get an array with all orders with a given column removed.
- *
- * @param string $column
- * @return array
- */
- protected function removeExistingOrdersFor($column)
- {
- return Collection::make($this->orders)
- ->reject(function ($order) use ($column) {
- return isset($order['column'])
- ? $order['column'] === $column : false;
- })->values()->all();
- }
-
- /**
- * Add a union statement to the query.
- *
- * @param \Illuminate\Database\Query\Builder|\Closure $query
- * @param bool $all
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function union($query, $all = false)
- {
- if ($query instanceof Closure) {
- call_user_func($query, $query = $this->newQuery());
- }
-
- $this->unions[] = compact('query', 'all');
-
- $this->addBinding($query->getBindings(), 'union');
-
- return $this;
- }
-
- /**
- * Add a union all statement to the query.
- *
- * @param \Illuminate\Database\Query\Builder|\Closure $query
- * @return \Illuminate\Database\Query\Builder|static
- */
- public function unionAll($query)
- {
- return $this->union($query, true);
- }
-
- /**
- * Lock the selected rows in the table.
- *
- * @param string|bool $value
- * @return $this
- */
- public function lock($value = true)
- {
- $this->lock = $value;
-
- if (! is_null($this->lock)) {
- $this->useWritePdo();
- }
-
- return $this;
- }
-
- /**
- * Lock the selected rows in the table for updating.
- *
- * @return \Illuminate\Database\Query\Builder
- */
- public function lockForUpdate()
- {
- return $this->lock(true);
- }
-
- /**
- * Share lock the selected rows in the table.
- *
- * @return \Illuminate\Database\Query\Builder
- */
- public function sharedLock()
- {
- return $this->lock(false);
- }
-
- /**
- * Get the SQL representation of the query.
- *
- * @return string
- */
- public function toSql()
- {
- return $this->grammar->compileSelect($this);
- }
-
- /**
- * Execute a query for a single record by ID.
- *
- * @param int $id
- * @param array $columns
- * @return mixed|static
- */
- public function find($id, $columns = ['*'])
- {
- return $this->where('id', '=', $id)->first($columns);
- }
-
- /**
- * Get a single column's value from the first result of a query.
- *
- * @param string $column
- * @return mixed
- */
- public function value($column)
- {
- $result = (array) $this->first([$column]);
-
- return count($result) > 0 ? reset($result) : null;
- }
-
- /**
- * Execute the query as a "select" statement.
- *
- * @param array $columns
- * @return \Illuminate\Support\Collection
- */
- public function get($columns = ['*'])
- {
- return collect($this->onceWithColumns($columns, function () {
- return $this->processor->processSelect($this, $this->runSelect());
- }));
- }
-
- /**
- * Run the query as a "select" statement against the connection.
- *
- * @return array
- */
- protected function runSelect()
- {
- return $this->connection->select(
- $this->toSql(), $this->getBindings(), ! $this->useWritePdo
- );
- }
-
- /**
- * Paginate the given query into a simple paginator.
- *
- * @param int $perPage
- * @param array $columns
- * @param string $pageName
- * @param int|null $page
- * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator
- */
- public function paginate($perPage = 15, $columns = ['*'], $pageName = 'page', $page = null)
- {
- $page = $page ?: Paginator::resolveCurrentPage($pageName);
-
- $total = $this->getCountForPagination($columns);
-
- $results = $total ? $this->forPage($page, $perPage)->get($columns) : collect();
-
- return $this->paginator($results, $total, $perPage, $page, [
- 'path' => Paginator::resolveCurrentPath(),
- 'pageName' => $pageName,
- ]);
- }
-
- /**
- * Get a paginator only supporting simple next and previous links.
- *
- * This is more efficient on larger data-sets, etc.
- *
- * @param int $perPage
- * @param array $columns
- * @param string $pageName
- * @param int|null $page
- * @return \Illuminate\Contracts\Pagination\Paginator
- */
- public function simplePaginate($perPage = 15, $columns = ['*'], $pageName = 'page', $page = null)
- {
- $page = $page ?: Paginator::resolveCurrentPage($pageName);
-
- $this->skip(($page - 1) * $perPage)->take($perPage + 1);
-
- return $this->simplePaginator($this->get($columns), $perPage, $page, [
- 'path' => Paginator::resolveCurrentPath(),
- 'pageName' => $pageName,
- ]);
- }
-
- /**
- * Get the count of the total records for the paginator.
- *
- * @param array $columns
- * @return int
- */
- public function getCountForPagination($columns = ['*'])
- {
- $results = $this->runPaginationCountQuery($columns);
-
- // Once we have run the pagination count query, we will get the resulting count and
- // take into account what type of query it was. When there is a group by we will
- // just return the count of the entire results set since that will be correct.
- if (isset($this->groups)) {
- return count($results);
- } elseif (! isset($results[0])) {
- return 0;
- } elseif (is_object($results[0])) {
- return (int) $results[0]->aggregate;
- }
-
- return (int) array_change_key_case((array) $results[0])['aggregate'];
- }
-
- /**
- * Run a pagination count query.
- *
- * @param array $columns
- * @return array
- */
- protected function runPaginationCountQuery($columns = ['*'])
- {
- $without = $this->unions ? ['orders', 'limit', 'offset'] : ['columns', 'orders', 'limit', 'offset'];
-
- return $this->cloneWithout($without)
- ->cloneWithoutBindings($this->unions ? ['order'] : ['select', 'order'])
- ->setAggregate('count', $this->withoutSelectAliases($columns))
- ->get()->all();
- }
-
- /**
- * Remove the column aliases since they will break count queries.
- *
- * @param array $columns
- * @return array
- */
- protected function withoutSelectAliases(array $columns)
- {
- return array_map(function ($column) {
- return is_string($column) && ($aliasPosition = stripos($column, ' as ')) !== false
- ? substr($column, 0, $aliasPosition) : $column;
- }, $columns);
- }
-
- /**
- * Get a generator for the given query.
- *
- * @return \Generator
- */
- public function cursor()
- {
- if (is_null($this->columns)) {
- $this->columns = ['*'];
- }
-
- return $this->connection->cursor(
- $this->toSql(), $this->getBindings(), ! $this->useWritePdo
- );
- }
-
- /**
- * Chunk the results of a query by comparing numeric IDs.
- *
- * @param int $count
- * @param callable $callback
- * @param string $column
- * @param string|null $alias
- * @return bool
- */
- public function chunkById($count, callable $callback, $column = 'id', $alias = null)
- {
- $alias = $alias ?: $column;
-
- $lastId = null;
-
- do {
- $clone = clone $this;
-
- // We'll execute the query for the given page and get the results. If there are
- // no results we can just break and return from here. When there are results
- // we will call the callback with the current chunk of these results here.
- $results = $clone->forPageAfterId($count, $lastId, $column)->get();
-
- $countResults = $results->count();
-
- if ($countResults == 0) {
- break;
- }
-
- // On each chunk result set, we will pass them to the callback and then let the
- // developer take care of everything within the callback, which allows us to
- // keep the memory low for spinning through large result sets for working.
- if ($callback($results) === false) {
- return false;
- }
-
- $lastId = $results->last()->{$alias};
-
- unset($results);
- } while ($countResults == $count);
-
- return true;
- }
-
- /**
- * Throw an exception if the query doesn't have an orderBy clause.
- *
- * @return void
- *
- * @throws \RuntimeException
- */
- protected function enforceOrderBy()
- {
- if (empty($this->orders) && empty($this->unionOrders)) {
- throw new RuntimeException('You must specify an orderBy clause when using this function.');
- }
- }
-
- /**
- * Get an array with the values of a given column.
- *
- * @param string $column
- * @param string|null $key
- * @return \Illuminate\Support\Collection
- */
- public function pluck($column, $key = null)
- {
- // First, we will need to select the results of the query accounting for the
- // given columns / key. Once we have the results, we will be able to take
- // the results and get the exact data that was requested for the query.
- $queryResult = $this->onceWithColumns(
- is_null($key) ? [$column] : [$column, $key],
- function () {
- return $this->processor->processSelect(
- $this, $this->runSelect()
- );
- }
- );
-
- if (empty($queryResult)) {
- return collect();
- }
-
- // If the columns are qualified with a table or have an alias, we cannot use
- // those directly in the "pluck" operations since the results from the DB
- // are only keyed by the column itself. We'll strip the table out here.
- $column = $this->stripTableForPluck($column);
-
- $key = $this->stripTableForPluck($key);
-
- return is_array($queryResult[0])
- ? $this->pluckFromArrayColumn($queryResult, $column, $key)
- : $this->pluckFromObjectColumn($queryResult, $column, $key);
- }
-
- /**
- * Strip off the table name or alias from a column identifier.
- *
- * @param string $column
- * @return string|null
- */
- protected function stripTableForPluck($column)
- {
- return is_null($column) ? $column : last(preg_split('~\.| ~', $column));
- }
-
- /**
- * Retrieve column values from rows represented as objects.
- *
- * @param array $queryResult
- * @param string $column
- * @param string $key
- * @return \Illuminate\Support\Collection
- */
- protected function pluckFromObjectColumn($queryResult, $column, $key)
- {
- $results = [];
-
- if (is_null($key)) {
- foreach ($queryResult as $row) {
- $results[] = $row->$column;
- }
- } else {
- foreach ($queryResult as $row) {
- $results[$row->$key] = $row->$column;
- }
- }
-
- return collect($results);
- }
-
- /**
- * Retrieve column values from rows represented as arrays.
- *
- * @param array $queryResult
- * @param string $column
- * @param string $key
- * @return \Illuminate\Support\Collection
- */
- protected function pluckFromArrayColumn($queryResult, $column, $key)
- {
- $results = [];
-
- if (is_null($key)) {
- foreach ($queryResult as $row) {
- $results[] = $row[$column];
- }
- } else {
- foreach ($queryResult as $row) {
- $results[$row[$key]] = $row[$column];
- }
- }
-
- return collect($results);
- }
-
- /**
- * Concatenate values of a given column as a string.
- *
- * @param string $column
- * @param string $glue
- * @return string
- */
- public function implode($column, $glue = '')
- {
- return $this->pluck($column)->implode($glue);
- }
-
- /**
- * Determine if any rows exist for the current query.
- *
- * @return bool
- */
- public function exists()
- {
- $results = $this->connection->select(
- $this->grammar->compileExists($this), $this->getBindings(), ! $this->useWritePdo
- );
-
- // If the results has rows, we will get the row and see if the exists column is a
- // boolean true. If there is no results for this query we will return false as
- // there are no rows for this query at all and we can return that info here.
- if (isset($results[0])) {
- $results = (array) $results[0];
-
- return (bool) $results['exists'];
- }
-
- return false;
- }
-
- /**
- * Determine if no rows exist for the current query.
- *
- * @return bool
- */
- public function doesntExist()
- {
- return ! $this->exists();
- }
-
- /**
- * Retrieve the "count" result of the query.
- *
- * @param string $columns
- * @return int
- */
- public function count($columns = '*')
- {
- return (int) $this->aggregate(__FUNCTION__, Arr::wrap($columns));
- }
-
- /**
- * Retrieve the minimum value of a given column.
- *
- * @param string $column
- * @return mixed
- */
- public function min($column)
- {
- return $this->aggregate(__FUNCTION__, [$column]);
- }
-
- /**
- * Retrieve the maximum value of a given column.
- *
- * @param string $column
- * @return mixed
- */
- public function max($column)
- {
- return $this->aggregate(__FUNCTION__, [$column]);
- }
-
- /**
- * Retrieve the sum of the values of a given column.
- *
- * @param string $column
- * @return mixed
- */
- public function sum($column)
- {
- $result = $this->aggregate(__FUNCTION__, [$column]);
-
- return $result ?: 0;
- }
-
- /**
- * Retrieve the average of the values of a given column.
- *
- * @param string $column
- * @return mixed
- */
- public function avg($column)
- {
- return $this->aggregate(__FUNCTION__, [$column]);
- }
-
- /**
- * Alias for the "avg" method.
- *
- * @param string $column
- * @return mixed
- */
- public function average($column)
- {
- return $this->avg($column);
- }
-
- /**
- * Execute an aggregate function on the database.
- *
- * @param string $function
- * @param array $columns
- * @return mixed
- */
- public function aggregate($function, $columns = ['*'])
- {
- $results = $this->cloneWithout($this->unions ? [] : ['columns'])
- ->cloneWithoutBindings($this->unions ? [] : ['select'])
- ->setAggregate($function, $columns)
- ->get($columns);
-
- if (! $results->isEmpty()) {
- return array_change_key_case((array) $results[0])['aggregate'];
- }
- }
-
- /**
- * Execute a numeric aggregate function on the database.
- *
- * @param string $function
- * @param array $columns
- * @return float|int
- */
- public function numericAggregate($function, $columns = ['*'])
- {
- $result = $this->aggregate($function, $columns);
-
- // If there is no result, we can obviously just return 0 here. Next, we will check
- // if the result is an integer or float. If it is already one of these two data
- // types we can just return the result as-is, otherwise we will convert this.
- if (! $result) {
- return 0;
- }
-
- if (is_int($result) || is_float($result)) {
- return $result;
- }
-
- // If the result doesn't contain a decimal place, we will assume it is an int then
- // cast it to one. When it does we will cast it to a float since it needs to be
- // cast to the expected data type for the developers out of pure convenience.
- return strpos((string) $result, '.') === false
- ? (int) $result : (float) $result;
- }
-
- /**
- * Set the aggregate property without running the query.
- *
- * @param string $function
- * @param array $columns
- * @return $this
- */
- protected function setAggregate($function, $columns)
- {
- $this->aggregate = compact('function', 'columns');
-
- if (empty($this->groups)) {
- $this->orders = null;
-
- $this->bindings['order'] = [];
- }
-
- return $this;
- }
-
- /**
- * Execute the given callback while selecting the given columns.
- *
- * After running the callback, the columns are reset to the original value.
- *
- * @param array $columns
- * @param callable $callback
- * @return mixed
- */
- protected function onceWithColumns($columns, $callback)
- {
- $original = $this->columns;
-
- if (is_null($original)) {
- $this->columns = $columns;
- }
-
- $result = $callback();
-
- $this->columns = $original;
-
- return $result;
- }
-
- /**
- * Insert a new record into the database.
- *
- * @param array $values
- * @return bool
- */
- public function insert(array $values)
- {
- // Since every insert gets treated like a batch insert, we will make sure the
- // bindings are structured in a way that is convenient when building these
- // inserts statements by verifying these elements are actually an array.
- if (empty($values)) {
- return true;
- }
-
- if (! is_array(reset($values))) {
- $values = [$values];
- }
-
- // Here, we will sort the insert keys for every record so that each insert is
- // in the same order for the record. We need to make sure this is the case
- // so there are not any errors or problems when inserting these records.
- else {
- foreach ($values as $key => $value) {
- ksort($value);
-
- $values[$key] = $value;
- }
- }
-
- // Finally, we will run this query against the database connection and return
- // the results. We will need to also flatten these bindings before running
- // the query so they are all in one huge, flattened array for execution.
- return $this->connection->insert(
- $this->grammar->compileInsert($this, $values),
- $this->cleanBindings(Arr::flatten($values, 1))
- );
- }
-
- /**
- * Insert a new record and get the value of the primary key.
- *
- * @param array $values
- * @param string|null $sequence
- * @return int
- */
- public function insertGetId(array $values, $sequence = null)
- {
- $sql = $this->grammar->compileInsertGetId($this, $values, $sequence);
-
- $values = $this->cleanBindings($values);
-
- return $this->processor->processInsertGetId($this, $sql, $values, $sequence);
- }
-
- /**
- * Insert new records into the table using a subquery.
- *
- * @param array $columns
- * @param \Closure|\Illuminate\Database\Query\Builder|string $query
- * @return bool
- */
- public function insertUsing(array $columns, $query)
- {
- [$sql, $bindings] = $this->createSub($query);
-
- return $this->connection->insert(
- $this->grammar->compileInsertUsing($this, $columns, $sql),
- $this->cleanBindings($bindings)
- );
- }
-
- /**
- * Update a record in the database.
- *
- * @param array $values
- * @return int
- */
- public function update(array $values)
- {
- $sql = $this->grammar->compileUpdate($this, $values);
-
- return $this->connection->update($sql, $this->cleanBindings(
- $this->grammar->prepareBindingsForUpdate($this->bindings, $values)
- ));
- }
-
- /**
- * Insert or update a record matching the attributes, and fill it with values.
- *
- * @param array $attributes
- * @param array $values
- * @return bool
- */
- public function updateOrInsert(array $attributes, array $values = [])
- {
- if (! $this->where($attributes)->exists()) {
- return $this->insert(array_merge($attributes, $values));
- }
-
- return (bool) $this->take(1)->update($values);
- }
-
- /**
- * Increment a column's value by a given amount.
- *
- * @param string $column
- * @param float|int $amount
- * @param array $extra
- * @return int
- */
- public function increment($column, $amount = 1, array $extra = [])
- {
- if (! is_numeric($amount)) {
- throw new InvalidArgumentException('Non-numeric value passed to increment method.');
- }
-
- $wrapped = $this->grammar->wrap($column);
-
- $columns = array_merge([$column => $this->raw("$wrapped + $amount")], $extra);
-
- return $this->update($columns);
- }
-
- /**
- * Decrement a column's value by a given amount.
- *
- * @param string $column
- * @param float|int $amount
- * @param array $extra
- * @return int
- */
- public function decrement($column, $amount = 1, array $extra = [])
- {
- if (! is_numeric($amount)) {
- throw new InvalidArgumentException('Non-numeric value passed to decrement method.');
- }
-
- $wrapped = $this->grammar->wrap($column);
-
- $columns = array_merge([$column => $this->raw("$wrapped - $amount")], $extra);
-
- return $this->update($columns);
- }
-
- /**
- * Delete a record from the database.
- *
- * @param mixed $id
- * @return int
- */
- public function delete($id = null)
- {
- // If an ID is passed to the method, we will set the where clause to check the
- // ID to let developers to simply and quickly remove a single row from this
- // database without manually specifying the "where" clauses on the query.
- if (! is_null($id)) {
- $this->where($this->from.'.id', '=', $id);
- }
-
- return $this->connection->delete(
- $this->grammar->compileDelete($this), $this->cleanBindings(
- $this->grammar->prepareBindingsForDelete($this->bindings)
- )
- );
- }
-
- /**
- * Run a truncate statement on the table.
- *
- * @return void
- */
- public function truncate()
- {
- foreach ($this->grammar->compileTruncate($this) as $sql => $bindings) {
- $this->connection->statement($sql, $bindings);
- }
- }
-
- /**
- * Get a new instance of the query builder.
- *
- * @return \Illuminate\Database\Query\Builder
- */
- public function newQuery()
- {
- return new static($this->connection, $this->grammar, $this->processor);
- }
-
- /**
- * Create a new query instance for a sub-query.
- *
- * @return \Illuminate\Database\Query\Builder
- */
- protected function forSubQuery()
- {
- return $this->newQuery();
- }
-
- /**
- * Create a raw database expression.
- *
- * @param mixed $value
- * @return \Illuminate\Database\Query\Expression
- */
- public function raw($value)
- {
- return $this->connection->raw($value);
- }
-
- /**
- * Get the current query value bindings in a flattened array.
- *
- * @return array
- */
- public function getBindings()
- {
- return Arr::flatten($this->bindings);
- }
-
- /**
- * Get the raw array of bindings.
- *
- * @return array
- */
- public function getRawBindings()
- {
- return $this->bindings;
- }
-
- /**
- * Set the bindings on the query builder.
- *
- * @param array $bindings
- * @param string $type
- * @return $this
- *
- * @throws \InvalidArgumentException
- */
- public function setBindings(array $bindings, $type = 'where')
- {
- if (! array_key_exists($type, $this->bindings)) {
- throw new InvalidArgumentException("Invalid binding type: {$type}.");
- }
-
- $this->bindings[$type] = $bindings;
-
- return $this;
- }
-
- /**
- * Add a binding to the query.
- *
- * @param mixed $value
- * @param string $type
- * @return $this
- *
- * @throws \InvalidArgumentException
- */
- public function addBinding($value, $type = 'where')
- {
- if (! array_key_exists($type, $this->bindings)) {
- throw new InvalidArgumentException("Invalid binding type: {$type}.");
- }
-
- if (is_array($value)) {
- $this->bindings[$type] = array_values(array_merge($this->bindings[$type], $value));
- } else {
- $this->bindings[$type][] = $value;
- }
-
- return $this;
- }
-
- /**
- * Merge an array of bindings into our bindings.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @return $this
- */
- public function mergeBindings(self $query)
- {
- $this->bindings = array_merge_recursive($this->bindings, $query->bindings);
-
- return $this;
- }
-
- /**
- * Remove all of the expressions from a list of bindings.
- *
- * @param array $bindings
- * @return array
- */
- protected function cleanBindings(array $bindings)
- {
- return array_values(array_filter($bindings, function ($binding) {
- return ! $binding instanceof Expression;
- }));
- }
-
- /**
- * Get the database connection instance.
- *
- * @return \Illuminate\Database\ConnectionInterface
- */
- public function getConnection()
- {
- return $this->connection;
- }
-
- /**
- * Get the database query processor instance.
- *
- * @return \Illuminate\Database\Query\Processors\Processor
- */
- public function getProcessor()
- {
- return $this->processor;
- }
-
- /**
- * Get the query grammar instance.
- *
- * @return \Illuminate\Database\Query\Grammars\Grammar
- */
- public function getGrammar()
- {
- return $this->grammar;
- }
-
- /**
- * Use the write pdo for query.
- *
- * @return $this
- */
- public function useWritePdo()
- {
- $this->useWritePdo = true;
-
- return $this;
- }
-
- /**
- * Clone the query without the given properties.
- *
- * @param array $properties
- * @return static
- */
- public function cloneWithout(array $properties)
- {
- return tap(clone $this, function ($clone) use ($properties) {
- foreach ($properties as $property) {
- $clone->{$property} = null;
- }
- });
- }
-
- /**
- * Clone the query without the given bindings.
- *
- * @param array $except
- * @return static
- */
- public function cloneWithoutBindings(array $except)
- {
- return tap(clone $this, function ($clone) use ($except) {
- foreach ($except as $type) {
- $clone->bindings[$type] = [];
- }
- });
- }
-
- /**
- * Handle dynamic method calls into the method.
- *
- * @param string $method
- * @param array $parameters
- * @return mixed
- *
- * @throws \BadMethodCallException
- */
- public function __call($method, $parameters)
- {
- if (static::hasMacro($method)) {
- return $this->macroCall($method, $parameters);
- }
-
- if (Str::startsWith($method, 'where')) {
- return $this->dynamicWhere($method, $parameters);
- }
-
- static::throwBadMethodCallException($method);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Expression.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Expression.php
deleted file mode 100755
index de69029..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Query/Expression.php
+++ /dev/null
@@ -1,44 +0,0 @@
-value = $value;
- }
-
- /**
- * Get the value of the expression.
- *
- * @return mixed
- */
- public function getValue()
- {
- return $this->value;
- }
-
- /**
- * Get the value of the expression.
- *
- * @return string
- */
- public function __toString()
- {
- return (string) $this->getValue();
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/Grammar.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/Grammar.php
deleted file mode 100755
index 679ae3b..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/Grammar.php
+++ /dev/null
@@ -1,1128 +0,0 @@
-unions && $query->aggregate) {
- return $this->compileUnionAggregate($query);
- }
-
- // If the query does not have any columns set, we'll set the columns to the
- // * character to just get all of the columns from the database. Then we
- // can build the query and concatenate all the pieces together as one.
- $original = $query->columns;
-
- if (is_null($query->columns)) {
- $query->columns = ['*'];
- }
-
- // To compile the query, we'll spin through each component of the query and
- // see if that component exists. If it does we'll just call the compiler
- // function for the component which is responsible for making the SQL.
- $sql = trim($this->concatenate(
- $this->compileComponents($query))
- );
-
- $query->columns = $original;
-
- return $sql;
- }
-
- /**
- * Compile the components necessary for a select clause.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @return array
- */
- protected function compileComponents(Builder $query)
- {
- $sql = [];
-
- foreach ($this->selectComponents as $component) {
- // To compile the query, we'll spin through each component of the query and
- // see if that component exists. If it does we'll just call the compiler
- // function for the component which is responsible for making the SQL.
- if (isset($query->$component) && ! is_null($query->$component)) {
- $method = 'compile'.ucfirst($component);
-
- $sql[$component] = $this->$method($query, $query->$component);
- }
- }
-
- return $sql;
- }
-
- /**
- * Compile an aggregated select clause.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $aggregate
- * @return string
- */
- protected function compileAggregate(Builder $query, $aggregate)
- {
- $column = $this->columnize($aggregate['columns']);
-
- // If the query has a "distinct" constraint and we're not asking for all columns
- // we need to prepend "distinct" onto the column name so that the query takes
- // it into account when it performs the aggregating operations on the data.
- if ($query->distinct && $column !== '*') {
- $column = 'distinct '.$column;
- }
-
- return 'select '.$aggregate['function'].'('.$column.') as aggregate';
- }
-
- /**
- * Compile the "select *" portion of the query.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $columns
- * @return string|null
- */
- protected function compileColumns(Builder $query, $columns)
- {
- // If the query is actually performing an aggregating select, we will let that
- // compiler handle the building of the select clauses, as it will need some
- // more syntax that is best handled by that function to keep things neat.
- if (! is_null($query->aggregate)) {
- return;
- }
-
- $select = $query->distinct ? 'select distinct ' : 'select ';
-
- return $select.$this->columnize($columns);
- }
-
- /**
- * Compile the "from" portion of the query.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param string $table
- * @return string
- */
- protected function compileFrom(Builder $query, $table)
- {
- return 'from '.$this->wrapTable($table);
- }
-
- /**
- * Compile the "join" portions of the query.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $joins
- * @return string
- */
- protected function compileJoins(Builder $query, $joins)
- {
- return collect($joins)->map(function ($join) use ($query) {
- $table = $this->wrapTable($join->table);
-
- $nestedJoins = is_null($join->joins) ? '' : ' '.$this->compileJoins($query, $join->joins);
-
- $tableAndNestedJoins = is_null($join->joins) ? $table : '('.$table.$nestedJoins.')';
-
- return trim("{$join->type} join {$tableAndNestedJoins} {$this->compileWheres($join)}");
- })->implode(' ');
- }
-
- /**
- * Compile the "where" portions of the query.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @return string
- */
- protected function compileWheres(Builder $query)
- {
- // Each type of where clauses has its own compiler function which is responsible
- // for actually creating the where clauses SQL. This helps keep the code nice
- // and maintainable since each clause has a very small method that it uses.
- if (is_null($query->wheres)) {
- return '';
- }
-
- // If we actually have some where clauses, we will strip off the first boolean
- // operator, which is added by the query builders for convenience so we can
- // avoid checking for the first clauses in each of the compilers methods.
- if (count($sql = $this->compileWheresToArray($query)) > 0) {
- return $this->concatenateWhereClauses($query, $sql);
- }
-
- return '';
- }
-
- /**
- * Get an array of all the where clauses for the query.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @return array
- */
- protected function compileWheresToArray($query)
- {
- return collect($query->wheres)->map(function ($where) use ($query) {
- return $where['boolean'].' '.$this->{"where{$where['type']}"}($query, $where);
- })->all();
- }
-
- /**
- * Format the where clause statements into one string.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $sql
- * @return string
- */
- protected function concatenateWhereClauses($query, $sql)
- {
- $conjunction = $query instanceof JoinClause ? 'on' : 'where';
-
- return $conjunction.' '.$this->removeLeadingBoolean(implode(' ', $sql));
- }
-
- /**
- * Compile a raw where clause.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function whereRaw(Builder $query, $where)
- {
- return $where['sql'];
- }
-
- /**
- * Compile a basic where clause.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function whereBasic(Builder $query, $where)
- {
- $value = $this->parameter($where['value']);
-
- return $this->wrap($where['column']).' '.$where['operator'].' '.$value;
- }
-
- /**
- * Compile a "where in" clause.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function whereIn(Builder $query, $where)
- {
- if (! empty($where['values'])) {
- return $this->wrap($where['column']).' in ('.$this->parameterize($where['values']).')';
- }
-
- return '0 = 1';
- }
-
- /**
- * Compile a "where not in" clause.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function whereNotIn(Builder $query, $where)
- {
- if (! empty($where['values'])) {
- return $this->wrap($where['column']).' not in ('.$this->parameterize($where['values']).')';
- }
-
- return '1 = 1';
- }
-
- /**
- * Compile a "where not in raw" clause.
- *
- * For safety, whereIntegerInRaw ensures this method is only used with integer values.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function whereNotInRaw(Builder $query, $where)
- {
- if (! empty($where['values'])) {
- return $this->wrap($where['column']).' not in ('.implode(', ', $where['values']).')';
- }
-
- return '1 = 1';
- }
-
- /**
- * Compile a where in sub-select clause.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function whereInSub(Builder $query, $where)
- {
- return $this->wrap($where['column']).' in ('.$this->compileSelect($where['query']).')';
- }
-
- /**
- * Compile a where not in sub-select clause.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function whereNotInSub(Builder $query, $where)
- {
- return $this->wrap($where['column']).' not in ('.$this->compileSelect($where['query']).')';
- }
-
- /**
- * Compile a "where in raw" clause.
- *
- * For safety, whereIntegerInRaw ensures this method is only used with integer values.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function whereInRaw(Builder $query, $where)
- {
- if (! empty($where['values'])) {
- return $this->wrap($where['column']).' in ('.implode(', ', $where['values']).')';
- }
-
- return '0 = 1';
- }
-
- /**
- * Compile a "where null" clause.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function whereNull(Builder $query, $where)
- {
- return $this->wrap($where['column']).' is null';
- }
-
- /**
- * Compile a "where not null" clause.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function whereNotNull(Builder $query, $where)
- {
- return $this->wrap($where['column']).' is not null';
- }
-
- /**
- * Compile a "between" where clause.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function whereBetween(Builder $query, $where)
- {
- $between = $where['not'] ? 'not between' : 'between';
-
- $min = $this->parameter(reset($where['values']));
-
- $max = $this->parameter(end($where['values']));
-
- return $this->wrap($where['column']).' '.$between.' '.$min.' and '.$max;
- }
-
- /**
- * Compile a "where date" clause.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function whereDate(Builder $query, $where)
- {
- return $this->dateBasedWhere('date', $query, $where);
- }
-
- /**
- * Compile a "where time" clause.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function whereTime(Builder $query, $where)
- {
- return $this->dateBasedWhere('time', $query, $where);
- }
-
- /**
- * Compile a "where day" clause.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function whereDay(Builder $query, $where)
- {
- return $this->dateBasedWhere('day', $query, $where);
- }
-
- /**
- * Compile a "where month" clause.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function whereMonth(Builder $query, $where)
- {
- return $this->dateBasedWhere('month', $query, $where);
- }
-
- /**
- * Compile a "where year" clause.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function whereYear(Builder $query, $where)
- {
- return $this->dateBasedWhere('year', $query, $where);
- }
-
- /**
- * Compile a date based where clause.
- *
- * @param string $type
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function dateBasedWhere($type, Builder $query, $where)
- {
- $value = $this->parameter($where['value']);
-
- return $type.'('.$this->wrap($where['column']).') '.$where['operator'].' '.$value;
- }
-
- /**
- * Compile a where clause comparing two columns..
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function whereColumn(Builder $query, $where)
- {
- return $this->wrap($where['first']).' '.$where['operator'].' '.$this->wrap($where['second']);
- }
-
- /**
- * Compile a nested where clause.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function whereNested(Builder $query, $where)
- {
- // Here we will calculate what portion of the string we need to remove. If this
- // is a join clause query, we need to remove the "on" portion of the SQL and
- // if it is a normal query we need to take the leading "where" of queries.
- $offset = $query instanceof JoinClause ? 3 : 6;
-
- return '('.substr($this->compileWheres($where['query']), $offset).')';
- }
-
- /**
- * Compile a where condition with a sub-select.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function whereSub(Builder $query, $where)
- {
- $select = $this->compileSelect($where['query']);
-
- return $this->wrap($where['column']).' '.$where['operator']." ($select)";
- }
-
- /**
- * Compile a where exists clause.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function whereExists(Builder $query, $where)
- {
- return 'exists ('.$this->compileSelect($where['query']).')';
- }
-
- /**
- * Compile a where exists clause.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function whereNotExists(Builder $query, $where)
- {
- return 'not exists ('.$this->compileSelect($where['query']).')';
- }
-
- /**
- * Compile a where row values condition.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function whereRowValues(Builder $query, $where)
- {
- $columns = $this->columnize($where['columns']);
-
- $values = $this->parameterize($where['values']);
-
- return '('.$columns.') '.$where['operator'].' ('.$values.')';
- }
-
- /**
- * Compile a "where JSON contains" clause.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function whereJsonContains(Builder $query, $where)
- {
- $not = $where['not'] ? 'not ' : '';
-
- return $not.$this->compileJsonContains(
- $where['column'], $this->parameter($where['value'])
- );
- }
-
- /**
- * Compile a "JSON contains" statement into SQL.
- *
- * @param string $column
- * @param string $value
- * @return string
- *
- * @throws \RuntimeException
- */
- protected function compileJsonContains($column, $value)
- {
- throw new RuntimeException('This database engine does not support JSON contains operations.');
- }
-
- /**
- * Prepare the binding for a "JSON contains" statement.
- *
- * @param mixed $binding
- * @return string
- */
- public function prepareBindingForJsonContains($binding)
- {
- return json_encode($binding);
- }
-
- /**
- * Compile a "where JSON length" clause.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function whereJsonLength(Builder $query, $where)
- {
- return $this->compileJsonLength(
- $where['column'], $where['operator'], $this->parameter($where['value'])
- );
- }
-
- /**
- * Compile a "JSON length" statement into SQL.
- *
- * @param string $column
- * @param string $operator
- * @param string $value
- * @return string
- *
- * @throws \RuntimeException
- */
- protected function compileJsonLength($column, $operator, $value)
- {
- throw new RuntimeException('This database engine does not support JSON length operations.');
- }
-
- /**
- * Compile the "group by" portions of the query.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $groups
- * @return string
- */
- protected function compileGroups(Builder $query, $groups)
- {
- return 'group by '.$this->columnize($groups);
- }
-
- /**
- * Compile the "having" portions of the query.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $havings
- * @return string
- */
- protected function compileHavings(Builder $query, $havings)
- {
- $sql = implode(' ', array_map([$this, 'compileHaving'], $havings));
-
- return 'having '.$this->removeLeadingBoolean($sql);
- }
-
- /**
- * Compile a single having clause.
- *
- * @param array $having
- * @return string
- */
- protected function compileHaving(array $having)
- {
- // If the having clause is "raw", we can just return the clause straight away
- // without doing any more processing on it. Otherwise, we will compile the
- // clause into SQL based on the components that make it up from builder.
- if ($having['type'] === 'Raw') {
- return $having['boolean'].' '.$having['sql'];
- } elseif ($having['type'] === 'between') {
- return $this->compileHavingBetween($having);
- }
-
- return $this->compileBasicHaving($having);
- }
-
- /**
- * Compile a basic having clause.
- *
- * @param array $having
- * @return string
- */
- protected function compileBasicHaving($having)
- {
- $column = $this->wrap($having['column']);
-
- $parameter = $this->parameter($having['value']);
-
- return $having['boolean'].' '.$column.' '.$having['operator'].' '.$parameter;
- }
-
- /**
- * Compile a "between" having clause.
- *
- * @param array $having
- * @return string
- */
- protected function compileHavingBetween($having)
- {
- $between = $having['not'] ? 'not between' : 'between';
-
- $column = $this->wrap($having['column']);
-
- $min = $this->parameter(head($having['values']));
-
- $max = $this->parameter(last($having['values']));
-
- return $having['boolean'].' '.$column.' '.$between.' '.$min.' and '.$max;
- }
-
- /**
- * Compile the "order by" portions of the query.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $orders
- * @return string
- */
- protected function compileOrders(Builder $query, $orders)
- {
- if (! empty($orders)) {
- return 'order by '.implode(', ', $this->compileOrdersToArray($query, $orders));
- }
-
- return '';
- }
-
- /**
- * Compile the query orders to an array.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $orders
- * @return array
- */
- protected function compileOrdersToArray(Builder $query, $orders)
- {
- return array_map(function ($order) {
- return ! isset($order['sql'])
- ? $this->wrap($order['column']).' '.$order['direction']
- : $order['sql'];
- }, $orders);
- }
-
- /**
- * Compile the random statement into SQL.
- *
- * @param string $seed
- * @return string
- */
- public function compileRandom($seed)
- {
- return 'RANDOM()';
- }
-
- /**
- * Compile the "limit" portions of the query.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param int $limit
- * @return string
- */
- protected function compileLimit(Builder $query, $limit)
- {
- return 'limit '.(int) $limit;
- }
-
- /**
- * Compile the "offset" portions of the query.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param int $offset
- * @return string
- */
- protected function compileOffset(Builder $query, $offset)
- {
- return 'offset '.(int) $offset;
- }
-
- /**
- * Compile the "union" queries attached to the main query.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @return string
- */
- protected function compileUnions(Builder $query)
- {
- $sql = '';
-
- foreach ($query->unions as $union) {
- $sql .= $this->compileUnion($union);
- }
-
- if (! empty($query->unionOrders)) {
- $sql .= ' '.$this->compileOrders($query, $query->unionOrders);
- }
-
- if (isset($query->unionLimit)) {
- $sql .= ' '.$this->compileLimit($query, $query->unionLimit);
- }
-
- if (isset($query->unionOffset)) {
- $sql .= ' '.$this->compileOffset($query, $query->unionOffset);
- }
-
- return ltrim($sql);
- }
-
- /**
- * Compile a single union statement.
- *
- * @param array $union
- * @return string
- */
- protected function compileUnion(array $union)
- {
- $conjunction = $union['all'] ? ' union all ' : ' union ';
-
- return $conjunction.$union['query']->toSql();
- }
-
- /**
- * Compile a union aggregate query into SQL.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @return string
- */
- protected function compileUnionAggregate(Builder $query)
- {
- $sql = $this->compileAggregate($query, $query->aggregate);
-
- $query->aggregate = null;
-
- return $sql.' from ('.$this->compileSelect($query).') as '.$this->wrapTable('temp_table');
- }
-
- /**
- * Compile an exists statement into SQL.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @return string
- */
- public function compileExists(Builder $query)
- {
- $select = $this->compileSelect($query);
-
- return "select exists({$select}) as {$this->wrap('exists')}";
- }
-
- /**
- * Compile an insert statement into SQL.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $values
- * @return string
- */
- public function compileInsert(Builder $query, array $values)
- {
- // Essentially we will force every insert to be treated as a batch insert which
- // simply makes creating the SQL easier for us since we can utilize the same
- // basic routine regardless of an amount of records given to us to insert.
- $table = $this->wrapTable($query->from);
-
- if (! is_array(reset($values))) {
- $values = [$values];
- }
-
- $columns = $this->columnize(array_keys(reset($values)));
-
- // We need to build a list of parameter place-holders of values that are bound
- // to the query. Each insert should have the exact same amount of parameter
- // bindings so we will loop through the record and parameterize them all.
- $parameters = collect($values)->map(function ($record) {
- return '('.$this->parameterize($record).')';
- })->implode(', ');
-
- return "insert into $table ($columns) values $parameters";
- }
-
- /**
- * Compile an insert and get ID statement into SQL.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $values
- * @param string $sequence
- * @return string
- */
- public function compileInsertGetId(Builder $query, $values, $sequence)
- {
- return $this->compileInsert($query, $values);
- }
-
- /**
- * Compile an insert statement using a subquery into SQL.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $columns
- * @param string $sql
- * @return string
- */
- public function compileInsertUsing(Builder $query, array $columns, string $sql)
- {
- return "insert into {$this->wrapTable($query->from)} ({$this->columnize($columns)}) $sql";
- }
-
- /**
- * Compile an update statement into SQL.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $values
- * @return string
- */
- public function compileUpdate(Builder $query, $values)
- {
- $table = $this->wrapTable($query->from);
-
- // Each one of the columns in the update statements needs to be wrapped in the
- // keyword identifiers, also a place-holder needs to be created for each of
- // the values in the list of bindings so we can make the sets statements.
- $columns = collect($values)->map(function ($value, $key) {
- return $this->wrap($key).' = '.$this->parameter($value);
- })->implode(', ');
-
- // If the query has any "join" clauses, we will setup the joins on the builder
- // and compile them so we can attach them to this update, as update queries
- // can get join statements to attach to other tables when they're needed.
- $joins = '';
-
- if (isset($query->joins)) {
- $joins = ' '.$this->compileJoins($query, $query->joins);
- }
-
- // Of course, update queries may also be constrained by where clauses so we'll
- // need to compile the where clauses and attach it to the query so only the
- // intended records are updated by the SQL statements we generate to run.
- $wheres = $this->compileWheres($query);
-
- return trim("update {$table}{$joins} set $columns $wheres");
- }
-
- /**
- * Prepare the bindings for an update statement.
- *
- * @param array $bindings
- * @param array $values
- * @return array
- */
- public function prepareBindingsForUpdate(array $bindings, array $values)
- {
- $cleanBindings = Arr::except($bindings, ['join', 'select']);
-
- return array_values(
- array_merge($bindings['join'], $values, Arr::flatten($cleanBindings))
- );
- }
-
- /**
- * Compile a delete statement into SQL.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @return string
- */
- public function compileDelete(Builder $query)
- {
- $wheres = is_array($query->wheres) ? $this->compileWheres($query) : '';
-
- return trim("delete from {$this->wrapTable($query->from)} $wheres");
- }
-
- /**
- * Prepare the bindings for a delete statement.
- *
- * @param array $bindings
- * @return array
- */
- public function prepareBindingsForDelete(array $bindings)
- {
- return Arr::flatten($bindings);
- }
-
- /**
- * Compile a truncate table statement into SQL.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @return array
- */
- public function compileTruncate(Builder $query)
- {
- return ['truncate '.$this->wrapTable($query->from) => []];
- }
-
- /**
- * Compile the lock into SQL.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param bool|string $value
- * @return string
- */
- protected function compileLock(Builder $query, $value)
- {
- return is_string($value) ? $value : '';
- }
-
- /**
- * Determine if the grammar supports savepoints.
- *
- * @return bool
- */
- public function supportsSavepoints()
- {
- return true;
- }
-
- /**
- * Compile the SQL statement to define a savepoint.
- *
- * @param string $name
- * @return string
- */
- public function compileSavepoint($name)
- {
- return 'SAVEPOINT '.$name;
- }
-
- /**
- * Compile the SQL statement to execute a savepoint rollback.
- *
- * @param string $name
- * @return string
- */
- public function compileSavepointRollBack($name)
- {
- return 'ROLLBACK TO SAVEPOINT '.$name;
- }
-
- /**
- * Wrap a value in keyword identifiers.
- *
- * @param \Illuminate\Database\Query\Expression|string $value
- * @param bool $prefixAlias
- * @return string
- */
- public function wrap($value, $prefixAlias = false)
- {
- if ($this->isExpression($value)) {
- return $this->getValue($value);
- }
-
- // If the value being wrapped has a column alias we will need to separate out
- // the pieces so we can wrap each of the segments of the expression on its
- // own, and then join these both back together using the "as" connector.
- if (stripos($value, ' as ') !== false) {
- return $this->wrapAliasedValue($value, $prefixAlias);
- }
-
- // If the given value is a JSON selector we will wrap it differently than a
- // traditional value. We will need to split this path and wrap each part
- // wrapped, etc. Otherwise, we will simply wrap the value as a string.
- if ($this->isJsonSelector($value)) {
- return $this->wrapJsonSelector($value);
- }
-
- return $this->wrapSegments(explode('.', $value));
- }
-
- /**
- * Wrap the given JSON selector.
- *
- * @param string $value
- * @return string
- */
- protected function wrapJsonSelector($value)
- {
- throw new RuntimeException('This database engine does not support JSON operations.');
- }
-
- /**
- * Split the given JSON selector into the field and the optional path and wrap them separately.
- *
- * @param string $column
- * @return array
- */
- protected function wrapJsonFieldAndPath($column)
- {
- $parts = explode('->', $column, 2);
-
- $field = $this->wrap($parts[0]);
-
- $path = count($parts) > 1 ? ', '.$this->wrapJsonPath($parts[1]) : '';
-
- return [$field, $path];
- }
-
- /**
- * Wrap the given JSON path.
- *
- * @param string $value
- * @return string
- */
- protected function wrapJsonPath($value)
- {
- return '\'$."'.str_replace('->', '"."', $value).'"\'';
- }
-
- /**
- * Determine if the given string is a JSON selector.
- *
- * @param string $value
- * @return bool
- */
- protected function isJsonSelector($value)
- {
- return Str::contains($value, '->');
- }
-
- /**
- * Concatenate an array of segments, removing empties.
- *
- * @param array $segments
- * @return string
- */
- protected function concatenate($segments)
- {
- return implode(' ', array_filter($segments, function ($value) {
- return (string) $value !== '';
- }));
- }
-
- /**
- * Remove the leading boolean from a statement.
- *
- * @param string $value
- * @return string
- */
- protected function removeLeadingBoolean($value)
- {
- return preg_replace('/and |or /i', '', $value, 1);
- }
-
- /**
- * Get the grammar specific operators.
- *
- * @return array
- */
- public function getOperators()
- {
- return $this->operators;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/MySqlGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/MySqlGrammar.php
deleted file mode 100755
index 50af227..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/MySqlGrammar.php
+++ /dev/null
@@ -1,331 +0,0 @@
-unions && $query->aggregate) {
- return $this->compileUnionAggregate($query);
- }
-
- $sql = parent::compileSelect($query);
-
- if ($query->unions) {
- $sql = '('.$sql.') '.$this->compileUnions($query);
- }
-
- return $sql;
- }
-
- /**
- * Compile a "JSON contains" statement into SQL.
- *
- * @param string $column
- * @param string $value
- * @return string
- */
- protected function compileJsonContains($column, $value)
- {
- return 'json_contains('.$this->wrap($column).', '.$value.')';
- }
-
- /**
- * Compile a "JSON length" statement into SQL.
- *
- * @param string $column
- * @param string $operator
- * @param string $value
- * @return string
- */
- protected function compileJsonLength($column, $operator, $value)
- {
- [$field, $path] = $this->wrapJsonFieldAndPath($column);
-
- return 'json_length('.$field.$path.') '.$operator.' '.$value;
- }
-
- /**
- * Compile a single union statement.
- *
- * @param array $union
- * @return string
- */
- protected function compileUnion(array $union)
- {
- $conjunction = $union['all'] ? ' union all ' : ' union ';
-
- return $conjunction.'('.$union['query']->toSql().')';
- }
-
- /**
- * Compile the random statement into SQL.
- *
- * @param string $seed
- * @return string
- */
- public function compileRandom($seed)
- {
- return 'RAND('.$seed.')';
- }
-
- /**
- * Compile the lock into SQL.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param bool|string $value
- * @return string
- */
- protected function compileLock(Builder $query, $value)
- {
- if (! is_string($value)) {
- return $value ? 'for update' : 'lock in share mode';
- }
-
- return $value;
- }
-
- /**
- * Compile an update statement into SQL.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $values
- * @return string
- */
- public function compileUpdate(Builder $query, $values)
- {
- $table = $this->wrapTable($query->from);
-
- // Each one of the columns in the update statements needs to be wrapped in the
- // keyword identifiers, also a place-holder needs to be created for each of
- // the values in the list of bindings so we can make the sets statements.
- $columns = $this->compileUpdateColumns($values);
-
- // If the query has any "join" clauses, we will setup the joins on the builder
- // and compile them so we can attach them to this update, as update queries
- // can get join statements to attach to other tables when they're needed.
- $joins = '';
-
- if (isset($query->joins)) {
- $joins = ' '.$this->compileJoins($query, $query->joins);
- }
-
- // Of course, update queries may also be constrained by where clauses so we'll
- // need to compile the where clauses and attach it to the query so only the
- // intended records are updated by the SQL statements we generate to run.
- $where = $this->compileWheres($query);
-
- $sql = rtrim("update {$table}{$joins} set $columns $where");
-
- // If the query has an order by clause we will compile it since MySQL supports
- // order bys on update statements. We'll compile them using the typical way
- // of compiling order bys. Then they will be appended to the SQL queries.
- if (! empty($query->orders)) {
- $sql .= ' '.$this->compileOrders($query, $query->orders);
- }
-
- // Updates on MySQL also supports "limits", which allow you to easily update a
- // single record very easily. This is not supported by all database engines
- // so we have customized this update compiler here in order to add it in.
- if (isset($query->limit)) {
- $sql .= ' '.$this->compileLimit($query, $query->limit);
- }
-
- return rtrim($sql);
- }
-
- /**
- * Compile all of the columns for an update statement.
- *
- * @param array $values
- * @return string
- */
- protected function compileUpdateColumns($values)
- {
- return collect($values)->map(function ($value, $key) {
- if ($this->isJsonSelector($key)) {
- return $this->compileJsonUpdateColumn($key, new JsonExpression($value));
- }
-
- return $this->wrap($key).' = '.$this->parameter($value);
- })->implode(', ');
- }
-
- /**
- * Prepares a JSON column being updated using the JSON_SET function.
- *
- * @param string $key
- * @param \Illuminate\Database\Query\JsonExpression $value
- * @return string
- */
- protected function compileJsonUpdateColumn($key, JsonExpression $value)
- {
- [$field, $path] = $this->wrapJsonFieldAndPath($key);
-
- return "{$field} = json_set({$field}{$path}, {$value->getValue()})";
- }
-
- /**
- * Prepare the bindings for an update statement.
- *
- * Booleans, integers, and doubles are inserted into JSON updates as raw values.
- *
- * @param array $bindings
- * @param array $values
- * @return array
- */
- public function prepareBindingsForUpdate(array $bindings, array $values)
- {
- $values = collect($values)->reject(function ($value, $column) {
- return $this->isJsonSelector($column) && is_bool($value);
- })->all();
-
- return parent::prepareBindingsForUpdate($bindings, $values);
- }
-
- /**
- * Compile a delete statement into SQL.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @return string
- */
- public function compileDelete(Builder $query)
- {
- $table = $this->wrapTable($query->from);
-
- $where = is_array($query->wheres) ? $this->compileWheres($query) : '';
-
- return isset($query->joins)
- ? $this->compileDeleteWithJoins($query, $table, $where)
- : $this->compileDeleteWithoutJoins($query, $table, $where);
- }
-
- /**
- * Prepare the bindings for a delete statement.
- *
- * @param array $bindings
- * @return array
- */
- public function prepareBindingsForDelete(array $bindings)
- {
- $cleanBindings = Arr::except($bindings, ['join', 'select']);
-
- return array_values(
- array_merge($bindings['join'], Arr::flatten($cleanBindings))
- );
- }
-
- /**
- * Compile a delete query that does not use joins.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param string $table
- * @param array $where
- * @return string
- */
- protected function compileDeleteWithoutJoins($query, $table, $where)
- {
- $sql = trim("delete from {$table} {$where}");
-
- // When using MySQL, delete statements may contain order by statements and limits
- // so we will compile both of those here. Once we have finished compiling this
- // we will return the completed SQL statement so it will be executed for us.
- if (! empty($query->orders)) {
- $sql .= ' '.$this->compileOrders($query, $query->orders);
- }
-
- if (isset($query->limit)) {
- $sql .= ' '.$this->compileLimit($query, $query->limit);
- }
-
- return $sql;
- }
-
- /**
- * Compile a delete query that uses joins.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param string $table
- * @param array $where
- * @return string
- */
- protected function compileDeleteWithJoins($query, $table, $where)
- {
- $joins = ' '.$this->compileJoins($query, $query->joins);
-
- $alias = stripos($table, ' as ') !== false
- ? explode(' as ', $table)[1] : $table;
-
- return trim("delete {$alias} from {$table}{$joins} {$where}");
- }
-
- /**
- * Wrap a single string in keyword identifiers.
- *
- * @param string $value
- * @return string
- */
- protected function wrapValue($value)
- {
- return $value === '*' ? $value : '`'.str_replace('`', '``', $value).'`';
- }
-
- /**
- * Wrap the given JSON selector.
- *
- * @param string $value
- * @return string
- */
- protected function wrapJsonSelector($value)
- {
- $delimiter = Str::contains($value, '->>')
- ? '->>'
- : '->';
-
- $path = explode($delimiter, $value);
-
- $field = $this->wrapSegments(explode('.', array_shift($path)));
-
- return sprintf('%s'.$delimiter.'\'$.%s\'', $field, collect($path)->map(function ($part) {
- return '"'.$part.'"';
- })->implode('.'));
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/PostgresGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/PostgresGrammar.php
deleted file mode 100755
index be5b882..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/PostgresGrammar.php
+++ /dev/null
@@ -1,401 +0,0 @@
-', '<=', '>=', '<>', '!=',
- 'like', 'not like', 'between', 'ilike', 'not ilike',
- '~', '&', '|', '#', '<<', '>>', '<<=', '>>=',
- '&&', '@>', '<@', '?', '?|', '?&', '||', '-', '-', '#-',
- 'is distinct from', 'is not distinct from',
- ];
-
- /**
- * {@inheritdoc}
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function whereBasic(Builder $query, $where)
- {
- if (Str::contains(strtolower($where['operator']), 'like')) {
- return sprintf(
- '%s::text %s %s',
- $this->wrap($where['column']),
- $where['operator'],
- $this->parameter($where['value'])
- );
- }
-
- return parent::whereBasic($query, $where);
- }
-
- /**
- * Compile a "where date" clause.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function whereDate(Builder $query, $where)
- {
- $value = $this->parameter($where['value']);
-
- return $this->wrap($where['column']).'::date '.$where['operator'].' '.$value;
- }
-
- /**
- * Compile a "where time" clause.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function whereTime(Builder $query, $where)
- {
- $value = $this->parameter($where['value']);
-
- return $this->wrap($where['column']).'::time '.$where['operator'].' '.$value;
- }
-
- /**
- * Compile a date based where clause.
- *
- * @param string $type
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function dateBasedWhere($type, Builder $query, $where)
- {
- $value = $this->parameter($where['value']);
-
- return 'extract('.$type.' from '.$this->wrap($where['column']).') '.$where['operator'].' '.$value;
- }
-
- /**
- * Compile a "JSON contains" statement into SQL.
- *
- * @param string $column
- * @param string $value
- * @return string
- */
- protected function compileJsonContains($column, $value)
- {
- $column = str_replace('->>', '->', $this->wrap($column));
-
- return '('.$column.')::jsonb @> '.$value;
- }
-
- /**
- * Compile a "JSON length" statement into SQL.
- *
- * @param string $column
- * @param string $operator
- * @param string $value
- * @return string
- */
- protected function compileJsonLength($column, $operator, $value)
- {
- $column = str_replace('->>', '->', $this->wrap($column));
-
- return 'json_array_length(('.$column.')::json) '.$operator.' '.$value;
- }
-
- /**
- * Compile the lock into SQL.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param bool|string $value
- * @return string
- */
- protected function compileLock(Builder $query, $value)
- {
- if (! is_string($value)) {
- return $value ? 'for update' : 'for share';
- }
-
- return $value;
- }
-
- /**
- * {@inheritdoc}
- */
- public function compileInsert(Builder $query, array $values)
- {
- $table = $this->wrapTable($query->from);
-
- return empty($values)
- ? "insert into {$table} DEFAULT VALUES"
- : parent::compileInsert($query, $values);
- }
-
- /**
- * Compile an insert and get ID statement into SQL.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $values
- * @param string $sequence
- * @return string
- */
- public function compileInsertGetId(Builder $query, $values, $sequence)
- {
- if (is_null($sequence)) {
- $sequence = 'id';
- }
-
- return $this->compileInsert($query, $values).' returning '.$this->wrap($sequence);
- }
-
- /**
- * Compile an update statement into SQL.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $values
- * @return string
- */
- public function compileUpdate(Builder $query, $values)
- {
- $table = $this->wrapTable($query->from);
-
- // Each one of the columns in the update statements needs to be wrapped in the
- // keyword identifiers, also a place-holder needs to be created for each of
- // the values in the list of bindings so we can make the sets statements.
- $columns = $this->compileUpdateColumns($values);
-
- $from = $this->compileUpdateFrom($query);
-
- $where = $this->compileUpdateWheres($query);
-
- return trim("update {$table} set {$columns}{$from} {$where}");
- }
-
- /**
- * Compile the columns for the update statement.
- *
- * @param array $values
- * @return string
- */
- protected function compileUpdateColumns($values)
- {
- // When gathering the columns for an update statement, we'll wrap each of the
- // columns and convert it to a parameter value. Then we will concatenate a
- // list of the columns that can be added into this update query clauses.
- return collect($values)->map(function ($value, $key) {
- if ($this->isJsonSelector($key)) {
- return $this->compileJsonUpdateColumn($key, $value);
- }
-
- return $this->wrap($key).' = '.$this->parameter($value);
- })->implode(', ');
- }
-
- /**
- * Prepares a JSON column being updated using the JSONB_SET function.
- *
- * @param string $key
- * @param mixed $value
- * @return string
- */
- protected function compileJsonUpdateColumn($key, $value)
- {
- $parts = explode('->', $key);
-
- $field = $this->wrap(array_shift($parts));
-
- $path = '\'{"'.implode('","', $parts).'"}\'';
-
- return "{$field} = jsonb_set({$field}::jsonb, {$path}, {$this->parameter($value)})";
- }
-
- /**
- * Compile the "from" clause for an update with a join.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @return string|null
- */
- protected function compileUpdateFrom(Builder $query)
- {
- if (! isset($query->joins)) {
- return '';
- }
-
- // When using Postgres, updates with joins list the joined tables in the from
- // clause, which is different than other systems like MySQL. Here, we will
- // compile out the tables that are joined and add them to a from clause.
- $froms = collect($query->joins)->map(function ($join) {
- return $this->wrapTable($join->table);
- })->all();
-
- if (count($froms) > 0) {
- return ' from '.implode(', ', $froms);
- }
- }
-
- /**
- * Compile the additional where clauses for updates with joins.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @return string
- */
- protected function compileUpdateWheres(Builder $query)
- {
- $baseWheres = $this->compileWheres($query);
-
- if (! isset($query->joins)) {
- return $baseWheres;
- }
-
- // Once we compile the join constraints, we will either use them as the where
- // clause or append them to the existing base where clauses. If we need to
- // strip the leading boolean we will do so when using as the only where.
- $joinWheres = $this->compileUpdateJoinWheres($query);
-
- if (trim($baseWheres) == '') {
- return 'where '.$this->removeLeadingBoolean($joinWheres);
- }
-
- return $baseWheres.' '.$joinWheres;
- }
-
- /**
- * Compile the "join" clause where clauses for an update.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @return string
- */
- protected function compileUpdateJoinWheres(Builder $query)
- {
- $joinWheres = [];
-
- // Here we will just loop through all of the join constraints and compile them
- // all out then implode them. This should give us "where" like syntax after
- // everything has been built and then we will join it to the real wheres.
- foreach ($query->joins as $join) {
- foreach ($join->wheres as $where) {
- $method = "where{$where['type']}";
-
- $joinWheres[] = $where['boolean'].' '.$this->$method($query, $where);
- }
- }
-
- return implode(' ', $joinWheres);
- }
-
- /**
- * Prepare the bindings for an update statement.
- *
- * @param array $bindings
- * @param array $values
- * @return array
- */
- public function prepareBindingsForUpdate(array $bindings, array $values)
- {
- $values = collect($values)->map(function ($value, $column) {
- return $this->isJsonSelector($column) && ! $this->isExpression($value)
- ? json_encode($value)
- : $value;
- })->all();
-
- // Update statements with "joins" in Postgres use an interesting syntax. We need to
- // take all of the bindings and put them on the end of this array since they are
- // added to the end of the "where" clause statements as typical where clauses.
- $bindingsWithoutJoin = Arr::except($bindings, 'join');
-
- return array_values(
- array_merge($values, $bindings['join'], Arr::flatten($bindingsWithoutJoin))
- );
- }
-
- /**
- * Compile a delete statement into SQL.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @return string
- */
- public function compileDelete(Builder $query)
- {
- $table = $this->wrapTable($query->from);
-
- return isset($query->joins)
- ? $this->compileDeleteWithJoins($query, $table)
- : parent::compileDelete($query);
- }
-
- /**
- * Compile a delete query that uses joins.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param string $table
- * @return string
- */
- protected function compileDeleteWithJoins($query, $table)
- {
- $using = ' USING '.collect($query->joins)->map(function ($join) {
- return $this->wrapTable($join->table);
- })->implode(', ');
-
- $where = count($query->wheres) > 0 ? ' '.$this->compileUpdateWheres($query) : '';
-
- return trim("delete from {$table}{$using}{$where}");
- }
-
- /**
- * Compile a truncate table statement into SQL.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @return array
- */
- public function compileTruncate(Builder $query)
- {
- return ['truncate '.$this->wrapTable($query->from).' restart identity cascade' => []];
- }
-
- /**
- * Wrap the given JSON selector.
- *
- * @param string $value
- * @return string
- */
- protected function wrapJsonSelector($value)
- {
- $path = explode('->', $value);
-
- $field = $this->wrapSegments(explode('.', array_shift($path)));
-
- $wrappedPath = $this->wrapJsonPathAttributes($path);
-
- $attribute = array_pop($wrappedPath);
-
- if (! empty($wrappedPath)) {
- return $field.'->'.implode('->', $wrappedPath).'->>'.$attribute;
- }
-
- return $field.'->>'.$attribute;
- }
-
- /**
- * Wrap the attributes of the give JSON path.
- *
- * @param array $path
- * @return array
- */
- protected function wrapJsonPathAttributes($path)
- {
- return array_map(function ($attribute) {
- return "'$attribute'";
- }, $path);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php
deleted file mode 100755
index 43ddec9..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php
+++ /dev/null
@@ -1,312 +0,0 @@
-', '<=', '>=', '<>', '!=',
- 'like', 'not like', 'ilike',
- '&', '|', '<<', '>>',
- ];
-
- /**
- * Compile a select query into SQL.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @return string
- */
- public function compileSelect(Builder $query)
- {
- if ($query->unions && $query->aggregate) {
- return $this->compileUnionAggregate($query);
- }
-
- $sql = parent::compileSelect($query);
-
- if ($query->unions) {
- $sql = 'select * from ('.$sql.') '.$this->compileUnions($query);
- }
-
- return $sql;
- }
-
- /**
- * Compile a single union statement.
- *
- * @param array $union
- * @return string
- */
- protected function compileUnion(array $union)
- {
- $conjunction = $union['all'] ? ' union all ' : ' union ';
-
- return $conjunction.'select * from ('.$union['query']->toSql().')';
- }
-
- /**
- * Compile a "where date" clause.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function whereDate(Builder $query, $where)
- {
- return $this->dateBasedWhere('%Y-%m-%d', $query, $where);
- }
-
- /**
- * Compile a "where day" clause.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function whereDay(Builder $query, $where)
- {
- return $this->dateBasedWhere('%d', $query, $where);
- }
-
- /**
- * Compile a "where month" clause.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function whereMonth(Builder $query, $where)
- {
- return $this->dateBasedWhere('%m', $query, $where);
- }
-
- /**
- * Compile a "where year" clause.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function whereYear(Builder $query, $where)
- {
- return $this->dateBasedWhere('%Y', $query, $where);
- }
-
- /**
- * Compile a "where time" clause.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function whereTime(Builder $query, $where)
- {
- return $this->dateBasedWhere('%H:%M:%S', $query, $where);
- }
-
- /**
- * Compile a date based where clause.
- *
- * @param string $type
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function dateBasedWhere($type, Builder $query, $where)
- {
- $value = $this->parameter($where['value']);
-
- return "strftime('{$type}', {$this->wrap($where['column'])}) {$where['operator']} cast({$value} as text)";
- }
-
- /**
- * Compile a "JSON length" statement into SQL.
- *
- * @param string $column
- * @param string $operator
- * @param string $value
- * @return string
- */
- protected function compileJsonLength($column, $operator, $value)
- {
- [$field, $path] = $this->wrapJsonFieldAndPath($column);
-
- return 'json_array_length('.$field.$path.') '.$operator.' '.$value;
- }
-
- /**
- * Compile an insert statement into SQL.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $values
- * @return string
- */
- public function compileInsert(Builder $query, array $values)
- {
- // Essentially we will force every insert to be treated as a batch insert which
- // simply makes creating the SQL easier for us since we can utilize the same
- // basic routine regardless of an amount of records given to us to insert.
- $table = $this->wrapTable($query->from);
-
- if (! is_array(reset($values))) {
- $values = [$values];
- }
-
- // If there is only one record being inserted, we will just use the usual query
- // grammar insert builder because no special syntax is needed for the single
- // row inserts in SQLite. However, if there are multiples, we'll continue.
- if (count($values) === 1) {
- return empty(reset($values))
- ? "insert into $table default values"
- : parent::compileInsert($query, reset($values));
- }
-
- $names = $this->columnize(array_keys(reset($values)));
-
- $columns = [];
-
- // SQLite requires us to build the multi-row insert as a listing of select with
- // unions joining them together. So we'll build out this list of columns and
- // then join them all together with select unions to complete the queries.
- foreach (array_keys(reset($values)) as $column) {
- $columns[] = '? as '.$this->wrap($column);
- }
-
- $columns = array_fill(0, count($values), implode(', ', $columns));
-
- return "insert into $table ($names) select ".implode(' union all select ', $columns);
- }
-
- /**
- * Compile an update statement into SQL.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $values
- * @return string
- */
- public function compileUpdate(Builder $query, $values)
- {
- $table = $this->wrapTable($query->from);
-
- $columns = collect($values)->map(function ($value, $key) use ($query) {
- return $this->wrap(Str::after($key, $query->from.'.')).' = '.$this->parameter($value);
- })->implode(', ');
-
- if (isset($query->joins) || isset($query->limit)) {
- $selectSql = parent::compileSelect($query->select("{$query->from}.rowid"));
-
- return "update {$table} set $columns where {$this->wrap('rowid')} in ({$selectSql})";
- }
-
- return trim("update {$table} set {$columns} {$this->compileWheres($query)}");
- }
-
- /**
- * Prepare the bindings for an update statement.
- *
- * @param array $bindings
- * @param array $values
- * @return array
- */
- public function prepareBindingsForUpdate(array $bindings, array $values)
- {
- $cleanBindings = Arr::except($bindings, ['select', 'join']);
-
- return array_values(
- array_merge($values, $bindings['join'], Arr::flatten($cleanBindings))
- );
- }
-
- /**
- * Compile a delete statement into SQL.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @return string
- */
- public function compileDelete(Builder $query)
- {
- if (isset($query->joins) || isset($query->limit)) {
- $selectSql = parent::compileSelect($query->select("{$query->from}.rowid"));
-
- return "delete from {$this->wrapTable($query->from)} where {$this->wrap('rowid')} in ({$selectSql})";
- }
-
- $wheres = is_array($query->wheres) ? $this->compileWheres($query) : '';
-
- return trim("delete from {$this->wrapTable($query->from)} $wheres");
- }
-
- /**
- * Prepare the bindings for a delete statement.
- *
- * @param array $bindings
- * @return array
- */
- public function prepareBindingsForDelete(array $bindings)
- {
- $cleanBindings = Arr::except($bindings, ['select', 'join']);
-
- return array_values(
- array_merge($bindings['join'], Arr::flatten($cleanBindings))
- );
- }
-
- /**
- * Compile a truncate table statement into SQL.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @return array
- */
- public function compileTruncate(Builder $query)
- {
- return [
- 'delete from sqlite_sequence where name = ?' => [$query->from],
- 'delete from '.$this->wrapTable($query->from) => [],
- ];
- }
-
- /**
- * Wrap the given JSON selector.
- *
- * @param string $value
- * @return string
- */
- protected function wrapJsonSelector($value)
- {
- $parts = explode('->', $value, 2);
-
- $field = $this->wrap($parts[0]);
-
- $path = count($parts) > 1 ? ', '.$this->wrapJsonPath($parts[1]) : '';
-
- return 'json_extract('.$field.$path.')';
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php
deleted file mode 100755
index b2aff7b..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php
+++ /dev/null
@@ -1,515 +0,0 @@
-', '<=', '>=', '!<', '!>', '<>', '!=',
- 'like', 'not like', 'ilike',
- '&', '&=', '|', '|=', '^', '^=',
- ];
-
- /**
- * Compile a select query into SQL.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @return string
- */
- public function compileSelect(Builder $query)
- {
- if (! $query->offset) {
- return parent::compileSelect($query);
- }
-
- // If an offset is present on the query, we will need to wrap the query in
- // a big "ANSI" offset syntax block. This is very nasty compared to the
- // other database systems but is necessary for implementing features.
- if (is_null($query->columns)) {
- $query->columns = ['*'];
- }
-
- return $this->compileAnsiOffset(
- $query, $this->compileComponents($query)
- );
- }
-
- /**
- * Compile the "select *" portion of the query.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $columns
- * @return string|null
- */
- protected function compileColumns(Builder $query, $columns)
- {
- if (! is_null($query->aggregate)) {
- return;
- }
-
- $select = $query->distinct ? 'select distinct ' : 'select ';
-
- // If there is a limit on the query, but not an offset, we will add the top
- // clause to the query, which serves as a "limit" type clause within the
- // SQL Server system similar to the limit keywords available in MySQL.
- if ($query->limit > 0 && $query->offset <= 0) {
- $select .= 'top '.$query->limit.' ';
- }
-
- return $select.$this->columnize($columns);
- }
-
- /**
- * Compile the "from" portion of the query.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param string $table
- * @return string
- */
- protected function compileFrom(Builder $query, $table)
- {
- $from = parent::compileFrom($query, $table);
-
- if (is_string($query->lock)) {
- return $from.' '.$query->lock;
- }
-
- if (! is_null($query->lock)) {
- return $from.' with(rowlock,'.($query->lock ? 'updlock,' : '').'holdlock)';
- }
-
- return $from;
- }
-
- /**
- * Compile a "where date" clause.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function whereDate(Builder $query, $where)
- {
- $value = $this->parameter($where['value']);
-
- return 'cast('.$this->wrap($where['column']).' as date) '.$where['operator'].' '.$value;
- }
-
- /**
- * Compile a "where time" clause.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $where
- * @return string
- */
- protected function whereTime(Builder $query, $where)
- {
- $value = $this->parameter($where['value']);
-
- return 'cast('.$this->wrap($where['column']).' as time) '.$where['operator'].' '.$value;
- }
-
- /**
- * Compile a "JSON contains" statement into SQL.
- *
- * @param string $column
- * @param string $value
- * @return string
- */
- protected function compileJsonContains($column, $value)
- {
- [$field, $path] = $this->wrapJsonFieldAndPath($column);
-
- return $value.' in (select [value] from openjson('.$field.$path.'))';
- }
-
- /**
- * Prepare the binding for a "JSON contains" statement.
- *
- * @param mixed $binding
- * @return string
- */
- public function prepareBindingForJsonContains($binding)
- {
- return is_bool($binding) ? json_encode($binding) : $binding;
- }
-
- /**
- * Compile a "JSON length" statement into SQL.
- *
- * @param string $column
- * @param string $operator
- * @param string $value
- * @return string
- */
- protected function compileJsonLength($column, $operator, $value)
- {
- [$field, $path] = $this->wrapJsonFieldAndPath($column);
-
- return '(select count(*) from openjson('.$field.$path.')) '.$operator.' '.$value;
- }
-
- /**
- * Create a full ANSI offset clause for the query.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $components
- * @return string
- */
- protected function compileAnsiOffset(Builder $query, $components)
- {
- // An ORDER BY clause is required to make this offset query work, so if one does
- // not exist we'll just create a dummy clause to trick the database and so it
- // does not complain about the queries for not having an "order by" clause.
- if (empty($components['orders'])) {
- $components['orders'] = 'order by (select 0)';
- }
-
- // We need to add the row number to the query so we can compare it to the offset
- // and limit values given for the statements. So we will add an expression to
- // the "select" that will give back the row numbers on each of the records.
- $components['columns'] .= $this->compileOver($components['orders']);
-
- unset($components['orders']);
-
- // Next we need to calculate the constraints that should be placed on the query
- // to get the right offset and limit from our query but if there is no limit
- // set we will just handle the offset only since that is all that matters.
- $sql = $this->concatenate($components);
-
- return $this->compileTableExpression($sql, $query);
- }
-
- /**
- * Compile the over statement for a table expression.
- *
- * @param string $orderings
- * @return string
- */
- protected function compileOver($orderings)
- {
- return ", row_number() over ({$orderings}) as row_num";
- }
-
- /**
- * Compile a common table expression for a query.
- *
- * @param string $sql
- * @param \Illuminate\Database\Query\Builder $query
- * @return string
- */
- protected function compileTableExpression($sql, $query)
- {
- $constraint = $this->compileRowConstraint($query);
-
- return "select * from ({$sql}) as temp_table where row_num {$constraint} order by row_num";
- }
-
- /**
- * Compile the limit / offset row constraint for a query.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @return string
- */
- protected function compileRowConstraint($query)
- {
- $start = $query->offset + 1;
-
- if ($query->limit > 0) {
- $finish = $query->offset + $query->limit;
-
- return "between {$start} and {$finish}";
- }
-
- return ">= {$start}";
- }
-
- /**
- * Compile the random statement into SQL.
- *
- * @param string $seed
- * @return string
- */
- public function compileRandom($seed)
- {
- return 'NEWID()';
- }
-
- /**
- * Compile the "limit" portions of the query.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param int $limit
- * @return string
- */
- protected function compileLimit(Builder $query, $limit)
- {
- return '';
- }
-
- /**
- * Compile the "offset" portions of the query.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param int $offset
- * @return string
- */
- protected function compileOffset(Builder $query, $offset)
- {
- return '';
- }
-
- /**
- * Compile the lock into SQL.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param bool|string $value
- * @return string
- */
- protected function compileLock(Builder $query, $value)
- {
- return '';
- }
-
- /**
- * Compile an exists statement into SQL.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @return string
- */
- public function compileExists(Builder $query)
- {
- $existsQuery = clone $query;
-
- $existsQuery->columns = [];
-
- return $this->compileSelect($existsQuery->selectRaw('1 [exists]')->limit(1));
- }
-
- /**
- * Compile a delete statement into SQL.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @return string
- */
- public function compileDelete(Builder $query)
- {
- $table = $this->wrapTable($query->from);
-
- $where = is_array($query->wheres) ? $this->compileWheres($query) : '';
-
- return isset($query->joins)
- ? $this->compileDeleteWithJoins($query, $table, $where)
- : trim("delete from {$table} {$where}");
- }
-
- /**
- * Compile a delete statement with joins into SQL.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param string $table
- * @param string $where
- * @return string
- */
- protected function compileDeleteWithJoins(Builder $query, $table, $where)
- {
- $joins = ' '.$this->compileJoins($query, $query->joins);
-
- $alias = stripos($table, ' as ') !== false
- ? explode(' as ', $table)[1] : $table;
-
- return trim("delete {$alias} from {$table}{$joins} {$where}");
- }
-
- /**
- * Compile a truncate table statement into SQL.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @return array
- */
- public function compileTruncate(Builder $query)
- {
- return ['truncate table '.$this->wrapTable($query->from) => []];
- }
-
- /**
- * Compile an update statement into SQL.
- *
- * @param \Illuminate\Database\Query\Builder $query
- * @param array $values
- * @return string
- */
- public function compileUpdate(Builder $query, $values)
- {
- [$table, $alias] = $this->parseUpdateTable($query->from);
-
- // Each one of the columns in the update statements needs to be wrapped in the
- // keyword identifiers, also a place-holder needs to be created for each of
- // the values in the list of bindings so we can make the sets statements.
- $columns = collect($values)->map(function ($value, $key) {
- return $this->wrap($key).' = '.$this->parameter($value);
- })->implode(', ');
-
- // If the query has any "join" clauses, we will setup the joins on the builder
- // and compile them so we can attach them to this update, as update queries
- // can get join statements to attach to other tables when they're needed.
- $joins = '';
-
- if (isset($query->joins)) {
- $joins = ' '.$this->compileJoins($query, $query->joins);
- }
-
- // Of course, update queries may also be constrained by where clauses so we'll
- // need to compile the where clauses and attach it to the query so only the
- // intended records are updated by the SQL statements we generate to run.
- $where = $this->compileWheres($query);
-
- if (! empty($joins)) {
- return trim("update {$alias} set {$columns} from {$table}{$joins} {$where}");
- }
-
- return trim("update {$table}{$joins} set $columns $where");
- }
-
- /**
- * Get the table and alias for the given table.
- *
- * @param string $table
- * @return array
- */
- protected function parseUpdateTable($table)
- {
- $table = $alias = $this->wrapTable($table);
-
- if (stripos($table, '] as [') !== false) {
- $alias = '['.explode('] as [', $table)[1];
- }
-
- return [$table, $alias];
- }
-
- /**
- * Prepare the bindings for an update statement.
- *
- * @param array $bindings
- * @param array $values
- * @return array
- */
- public function prepareBindingsForUpdate(array $bindings, array $values)
- {
- // Update statements with joins in SQL Servers utilize an unique syntax. We need to
- // take all of the bindings and put them on the end of this array since they are
- // added to the end of the "where" clause statements as typical where clauses.
- $bindingsWithoutJoin = Arr::except($bindings, 'join');
-
- return array_values(
- array_merge($values, $bindings['join'], Arr::flatten($bindingsWithoutJoin))
- );
- }
-
- /**
- * Determine if the grammar supports savepoints.
- *
- * @return bool
- */
- public function supportsSavepoints()
- {
- return true;
- }
-
- /**
- * Compile the SQL statement to define a savepoint.
- *
- * @param string $name
- * @return string
- */
- public function compileSavepoint($name)
- {
- return 'SAVE TRANSACTION '.$name;
- }
-
- /**
- * Compile the SQL statement to execute a savepoint rollback.
- *
- * @param string $name
- * @return string
- */
- public function compileSavepointRollBack($name)
- {
- return 'ROLLBACK TRANSACTION '.$name;
- }
-
- /**
- * Get the format for database stored dates.
- *
- * @return string
- */
- public function getDateFormat()
- {
- return 'Y-m-d H:i:s.v';
- }
-
- /**
- * Wrap a single string in keyword identifiers.
- *
- * @param string $value
- * @return string
- */
- protected function wrapValue($value)
- {
- return $value === '*' ? $value : '['.str_replace(']', ']]', $value).']';
- }
-
- /**
- * Wrap the given JSON selector.
- *
- * @param string $value
- * @return string
- */
- protected function wrapJsonSelector($value)
- {
- $parts = explode('->', $value, 2);
-
- $field = $this->wrapSegments(explode('.', array_shift($parts)));
-
- return 'json_value('.$field.', '.$this->wrapJsonPath($parts[0]).')';
- }
-
- /**
- * Wrap a table in keyword identifiers.
- *
- * @param \Illuminate\Database\Query\Expression|string $table
- * @return string
- */
- public function wrapTable($table)
- {
- if (! $this->isExpression($table)) {
- return $this->wrapTableValuedFunction(parent::wrapTable($table));
- }
-
- return $this->getValue($table);
- }
-
- /**
- * Wrap a table in keyword identifiers.
- *
- * @param string $table
- * @return string
- */
- protected function wrapTableValuedFunction($table)
- {
- if (preg_match('/^(.+?)(\(.*?\))]$/', $table, $matches) === 1) {
- $table = $matches[1].']'.$matches[2];
- }
-
- return $table;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/JoinClause.php b/vendor/laravel/framework/src/Illuminate/Database/Query/JoinClause.php
deleted file mode 100755
index 4b32df2..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Query/JoinClause.php
+++ /dev/null
@@ -1,110 +0,0 @@
-type = $type;
- $this->table = $table;
- $this->parentQuery = $parentQuery;
-
- parent::__construct(
- $parentQuery->getConnection(), $parentQuery->getGrammar(), $parentQuery->getProcessor()
- );
- }
-
- /**
- * Add an "on" clause to the join.
- *
- * On clauses can be chained, e.g.
- *
- * $join->on('contacts.user_id', '=', 'users.id')
- * ->on('contacts.info_id', '=', 'info.id')
- *
- * will produce the following SQL:
- *
- * on `contacts`.`user_id` = `users`.`id` and `contacts`.`info_id` = `info`.`id`
- *
- * @param \Closure|string $first
- * @param string|null $operator
- * @param string|null $second
- * @param string $boolean
- * @return $this
- *
- * @throws \InvalidArgumentException
- */
- public function on($first, $operator = null, $second = null, $boolean = 'and')
- {
- if ($first instanceof Closure) {
- return $this->whereNested($first, $boolean);
- }
-
- return $this->whereColumn($first, $operator, $second, $boolean);
- }
-
- /**
- * Add an "or on" clause to the join.
- *
- * @param \Closure|string $first
- * @param string|null $operator
- * @param string|null $second
- * @return \Illuminate\Database\Query\JoinClause
- */
- public function orOn($first, $operator = null, $second = null)
- {
- return $this->on($first, $operator, $second, 'or');
- }
-
- /**
- * Get a new instance of the join clause builder.
- *
- * @return \Illuminate\Database\Query\JoinClause
- */
- public function newQuery()
- {
- return new static($this->parentQuery, $this->type, $this->table);
- }
-
- /**
- * Create a new query instance for sub-query.
- *
- * @return \Illuminate\Database\Query\Builder
- */
- protected function forSubQuery()
- {
- return $this->parentQuery->newQuery();
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/JsonExpression.php b/vendor/laravel/framework/src/Illuminate/Database/Query/JsonExpression.php
deleted file mode 100644
index 3d68ee6..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Query/JsonExpression.php
+++ /dev/null
@@ -1,51 +0,0 @@
-getJsonBindingParameter($value)
- );
- }
-
- /**
- * Translate the given value into the appropriate JSON binding parameter.
- *
- * @param mixed $value
- * @return string
- *
- * @throws \InvalidArgumentException
- */
- protected function getJsonBindingParameter($value)
- {
- if ($value instanceof Expression) {
- return $value->getValue();
- }
-
- switch ($type = gettype($value)) {
- case 'boolean':
- return $value ? 'true' : 'false';
- case 'NULL':
- case 'integer':
- case 'double':
- case 'string':
- return '?';
- case 'object':
- case 'array':
- return '?';
- }
-
- throw new InvalidArgumentException("JSON value is of illegal type: {$type}");
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/MySqlProcessor.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/MySqlProcessor.php
deleted file mode 100644
index ce91838..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/MySqlProcessor.php
+++ /dev/null
@@ -1,19 +0,0 @@
-column_name;
- }, $results);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/PostgresProcessor.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/PostgresProcessor.php
deleted file mode 100755
index 90abf24..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/PostgresProcessor.php
+++ /dev/null
@@ -1,41 +0,0 @@
-getConnection()->selectFromWriteConnection($sql, $values)[0];
-
- $sequence = $sequence ?: 'id';
-
- $id = is_object($result) ? $result->{$sequence} : $result[$sequence];
-
- return is_numeric($id) ? (int) $id : $id;
- }
-
- /**
- * Process the results of a column listing query.
- *
- * @param array $results
- * @return array
- */
- public function processColumnListing($results)
- {
- return array_map(function ($result) {
- return ((object) $result)->column_name;
- }, $results);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php
deleted file mode 100755
index f78429f..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php
+++ /dev/null
@@ -1,49 +0,0 @@
-getConnection()->insert($sql, $values);
-
- $id = $query->getConnection()->getPdo()->lastInsertId($sequence);
-
- return is_numeric($id) ? (int) $id : $id;
- }
-
- /**
- * Process the results of a column listing query.
- *
- * @param array $results
- * @return array
- */
- public function processColumnListing($results)
- {
- return $results;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/SQLiteProcessor.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/SQLiteProcessor.php
deleted file mode 100644
index 65da1df..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/SQLiteProcessor.php
+++ /dev/null
@@ -1,19 +0,0 @@
-name;
- }, $results);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/SqlServerProcessor.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/SqlServerProcessor.php
deleted file mode 100755
index 4912d9d..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/SqlServerProcessor.php
+++ /dev/null
@@ -1,70 +0,0 @@
-getConnection();
-
- $connection->insert($sql, $values);
-
- if ($connection->getConfig('odbc') === true) {
- $id = $this->processInsertGetIdForOdbc($connection);
- } else {
- $id = $connection->getPdo()->lastInsertId();
- }
-
- return is_numeric($id) ? (int) $id : $id;
- }
-
- /**
- * Process an "insert get ID" query for ODBC.
- *
- * @param \Illuminate\Database\Connection $connection
- * @return int
- *
- * @throws \Exception
- */
- protected function processInsertGetIdForOdbc(Connection $connection)
- {
- $result = $connection->selectFromWriteConnection(
- 'SELECT CAST(COALESCE(SCOPE_IDENTITY(), @@IDENTITY) AS int) AS insertid'
- );
-
- if (! $result) {
- throw new Exception('Unable to retrieve lastInsertID for ODBC.');
- }
-
- $row = $result[0];
-
- return is_object($row) ? $row->insertid : $row['insertid'];
- }
-
- /**
- * Process the results of a column listing query.
- *
- * @param array $results
- * @return array
- */
- public function processColumnListing($results)
- {
- return array_map(function ($result) {
- return ((object) $result)->name;
- }, $results);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/QueryException.php b/vendor/laravel/framework/src/Illuminate/Database/QueryException.php
deleted file mode 100644
index 9a3687d..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/QueryException.php
+++ /dev/null
@@ -1,78 +0,0 @@
-sql = $sql;
- $this->bindings = $bindings;
- $this->code = $previous->getCode();
- $this->message = $this->formatMessage($sql, $bindings, $previous);
-
- if ($previous instanceof PDOException) {
- $this->errorInfo = $previous->errorInfo;
- }
- }
-
- /**
- * Format the SQL error message.
- *
- * @param string $sql
- * @param array $bindings
- * @param \Exception $previous
- * @return string
- */
- protected function formatMessage($sql, $bindings, $previous)
- {
- return $previous->getMessage().' (SQL: '.Str::replaceArray('?', $bindings, $sql).')';
- }
-
- /**
- * Get the SQL for the query.
- *
- * @return string
- */
- public function getSql()
- {
- return $this->sql;
- }
-
- /**
- * Get the bindings for the query.
- *
- * @return array
- */
- public function getBindings()
- {
- return $this->bindings;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/README.md b/vendor/laravel/framework/src/Illuminate/Database/README.md
deleted file mode 100755
index b3014b0..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/README.md
+++ /dev/null
@@ -1,69 +0,0 @@
-## Illuminate Database
-
-The Illuminate Database component is a full database toolkit for PHP, providing an expressive query builder, ActiveRecord style ORM, and schema builder. It currently supports MySQL, Postgres, SQL Server, and SQLite. It also serves as the database layer of the Laravel PHP framework.
-
-### Usage Instructions
-
-First, create a new "Capsule" manager instance. Capsule aims to make configuring the library for usage outside of the Laravel framework as easy as possible.
-
-```PHP
-use Illuminate\Database\Capsule\Manager as Capsule;
-
-$capsule = new Capsule;
-
-$capsule->addConnection([
- 'driver' => 'mysql',
- 'host' => 'localhost',
- 'database' => 'database',
- 'username' => 'root',
- 'password' => 'password',
- 'charset' => 'utf8',
- 'collation' => 'utf8_unicode_ci',
- 'prefix' => '',
-]);
-
-// Set the event dispatcher used by Eloquent models... (optional)
-use Illuminate\Events\Dispatcher;
-use Illuminate\Container\Container;
-$capsule->setEventDispatcher(new Dispatcher(new Container));
-
-// Make this Capsule instance available globally via static methods... (optional)
-$capsule->setAsGlobal();
-
-// Setup the Eloquent ORM... (optional; unless you've used setEventDispatcher())
-$capsule->bootEloquent();
-```
-
-> `composer require "illuminate/events"` required when you need to use observers with Eloquent.
-
-Once the Capsule instance has been registered. You may use it like so:
-
-**Using The Query Builder**
-
-```PHP
-$users = Capsule::table('users')->where('votes', '>', 100)->get();
-```
-Other core methods may be accessed directly from the Capsule in the same manner as from the DB facade:
-```PHP
-$results = Capsule::select('select * from users where id = ?', array(1));
-```
-
-**Using The Schema Builder**
-
-```PHP
-Capsule::schema()->create('users', function ($table) {
- $table->increments('id');
- $table->string('email')->unique();
- $table->timestamps();
-});
-```
-
-**Using The Eloquent ORM**
-
-```PHP
-class User extends Illuminate\Database\Eloquent\Model {}
-
-$users = User::where('votes', '>', 1)->get();
-```
-
-For further documentation on using the various database facilities this library provides, consult the [Laravel framework documentation](https://laravel.com/docs).
diff --git a/vendor/laravel/framework/src/Illuminate/Database/SQLiteConnection.php b/vendor/laravel/framework/src/Illuminate/Database/SQLiteConnection.php
deleted file mode 100755
index 21f890d..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/SQLiteConnection.php
+++ /dev/null
@@ -1,100 +0,0 @@
-getForeignKeyConstraintsConfigurationValue();
-
- if ($enableForeignKeyConstraints === null) {
- return;
- }
-
- $enableForeignKeyConstraints
- ? $this->getSchemaBuilder()->enableForeignKeyConstraints()
- : $this->getSchemaBuilder()->disableForeignKeyConstraints();
- }
-
- /**
- * Get the default query grammar instance.
- *
- * @return \Illuminate\Database\Query\Grammars\SQLiteGrammar
- */
- protected function getDefaultQueryGrammar()
- {
- return $this->withTablePrefix(new QueryGrammar);
- }
-
- /**
- * Get a schema builder instance for the connection.
- *
- * @return \Illuminate\Database\Schema\SQLiteBuilder
- */
- public function getSchemaBuilder()
- {
- if (is_null($this->schemaGrammar)) {
- $this->useDefaultSchemaGrammar();
- }
-
- return new SQLiteBuilder($this);
- }
-
- /**
- * Get the default schema grammar instance.
- *
- * @return \Illuminate\Database\Schema\Grammars\SQLiteGrammar
- */
- protected function getDefaultSchemaGrammar()
- {
- return $this->withTablePrefix(new SchemaGrammar);
- }
-
- /**
- * Get the default post processor instance.
- *
- * @return \Illuminate\Database\Query\Processors\SQLiteProcessor
- */
- protected function getDefaultPostProcessor()
- {
- return new SQLiteProcessor;
- }
-
- /**
- * Get the Doctrine DBAL driver.
- *
- * @return \Doctrine\DBAL\Driver\PDOSqlite\Driver
- */
- protected function getDoctrineDriver()
- {
- return new DoctrineDriver;
- }
-
- /**
- * Get the database connection foreign key constraints configuration option.
- *
- * @return bool|null
- */
- protected function getForeignKeyConstraintsConfigurationValue()
- {
- return $this->getConfig('foreign_key_constraints');
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php
deleted file mode 100755
index ff58904..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php
+++ /dev/null
@@ -1,1372 +0,0 @@
-table = $table;
- $this->prefix = $prefix;
-
- if (! is_null($callback)) {
- $callback($this);
- }
- }
-
- /**
- * Execute the blueprint against the database.
- *
- * @param \Illuminate\Database\Connection $connection
- * @param \Illuminate\Database\Schema\Grammars\Grammar $grammar
- * @return void
- */
- public function build(Connection $connection, Grammar $grammar)
- {
- foreach ($this->toSql($connection, $grammar) as $statement) {
- $connection->statement($statement);
- }
- }
-
- /**
- * Get the raw SQL statements for the blueprint.
- *
- * @param \Illuminate\Database\Connection $connection
- * @param \Illuminate\Database\Schema\Grammars\Grammar $grammar
- * @return array
- */
- public function toSql(Connection $connection, Grammar $grammar)
- {
- $this->addImpliedCommands($grammar);
-
- $statements = [];
-
- // Each type of command has a corresponding compiler function on the schema
- // grammar which is used to build the necessary SQL statements to build
- // the blueprint element, so we'll just call that compilers function.
- $this->ensureCommandsAreValid($connection);
-
- foreach ($this->commands as $command) {
- $method = 'compile'.ucfirst($command->name);
-
- if (method_exists($grammar, $method)) {
- if (! is_null($sql = $grammar->$method($this, $command, $connection))) {
- $statements = array_merge($statements, (array) $sql);
- }
- }
- }
-
- return $statements;
- }
-
- /**
- * Ensure the commands on the blueprint are valid for the connection type.
- *
- * @param \Illuminate\Database\Connection $connection
- * @return void
- *
- * @throws \BadMethodCallException
- */
- protected function ensureCommandsAreValid(Connection $connection)
- {
- if ($connection instanceof SQLiteConnection) {
- if ($this->commandsNamed(['dropColumn', 'renameColumn'])->count() > 1) {
- throw new BadMethodCallException(
- "SQLite doesn't support multiple calls to dropColumn / renameColumn in a single modification."
- );
- }
-
- if ($this->commandsNamed(['dropForeign'])->count() > 0) {
- throw new BadMethodCallException(
- "SQLite doesn't support dropping foreign keys (you would need to re-create the table)."
- );
- }
- }
- }
-
- /**
- * Get all of the commands matching the given names.
- *
- * @param array $names
- * @return \Illuminate\Support\Collection
- */
- protected function commandsNamed(array $names)
- {
- return collect($this->commands)->filter(function ($command) use ($names) {
- return in_array($command->name, $names);
- });
- }
-
- /**
- * Add the commands that are implied by the blueprint's state.
- *
- * @param \Illuminate\Database\Schema\Grammars\Grammar $grammar
- * @return void
- */
- protected function addImpliedCommands(Grammar $grammar)
- {
- if (count($this->getAddedColumns()) > 0 && ! $this->creating()) {
- array_unshift($this->commands, $this->createCommand('add'));
- }
-
- if (count($this->getChangedColumns()) > 0 && ! $this->creating()) {
- array_unshift($this->commands, $this->createCommand('change'));
- }
-
- $this->addFluentIndexes();
-
- $this->addFluentCommands($grammar);
- }
-
- /**
- * Add the index commands fluently specified on columns.
- *
- * @return void
- */
- protected function addFluentIndexes()
- {
- foreach ($this->columns as $column) {
- foreach (['primary', 'unique', 'index', 'spatialIndex'] as $index) {
- // If the index has been specified on the given column, but is simply equal
- // to "true" (boolean), no name has been specified for this index so the
- // index method can be called without a name and it will generate one.
- if ($column->{$index} === true) {
- $this->{$index}($column->name);
-
- continue 2;
- }
-
- // If the index has been specified on the given column, and it has a string
- // value, we'll go ahead and call the index method and pass the name for
- // the index since the developer specified the explicit name for this.
- elseif (isset($column->{$index})) {
- $this->{$index}($column->name, $column->{$index});
-
- continue 2;
- }
- }
- }
- }
-
- /**
- * Add the fluent commands specified on any columns.
- *
- * @param \Illuminate\Database\Schema\Grammars\Grammar $grammar
- * @return void
- */
- public function addFluentCommands(Grammar $grammar)
- {
- foreach ($this->columns as $column) {
- foreach ($grammar->getFluentCommands() as $commandName) {
- $attributeName = lcfirst($commandName);
-
- if (! isset($column->{$attributeName})) {
- continue;
- }
-
- $value = $column->{$attributeName};
-
- $this->addCommand(
- $commandName, compact('value', 'column')
- );
- }
- }
- }
-
- /**
- * Determine if the blueprint has a create command.
- *
- * @return bool
- */
- protected function creating()
- {
- return collect($this->commands)->contains(function ($command) {
- return $command->name === 'create';
- });
- }
-
- /**
- * Indicate that the table needs to be created.
- *
- * @return \Illuminate\Support\Fluent
- */
- public function create()
- {
- return $this->addCommand('create');
- }
-
- /**
- * Indicate that the table needs to be temporary.
- *
- * @return void
- */
- public function temporary()
- {
- $this->temporary = true;
- }
-
- /**
- * Indicate that the table should be dropped.
- *
- * @return \Illuminate\Support\Fluent
- */
- public function drop()
- {
- return $this->addCommand('drop');
- }
-
- /**
- * Indicate that the table should be dropped if it exists.
- *
- * @return \Illuminate\Support\Fluent
- */
- public function dropIfExists()
- {
- return $this->addCommand('dropIfExists');
- }
-
- /**
- * Indicate that the given columns should be dropped.
- *
- * @param array|mixed $columns
- * @return \Illuminate\Support\Fluent
- */
- public function dropColumn($columns)
- {
- $columns = is_array($columns) ? $columns : func_get_args();
-
- return $this->addCommand('dropColumn', compact('columns'));
- }
-
- /**
- * Indicate that the given columns should be renamed.
- *
- * @param string $from
- * @param string $to
- * @return \Illuminate\Support\Fluent
- */
- public function renameColumn($from, $to)
- {
- return $this->addCommand('renameColumn', compact('from', 'to'));
- }
-
- /**
- * Indicate that the given primary key should be dropped.
- *
- * @param string|array $index
- * @return \Illuminate\Support\Fluent
- */
- public function dropPrimary($index = null)
- {
- return $this->dropIndexCommand('dropPrimary', 'primary', $index);
- }
-
- /**
- * Indicate that the given unique key should be dropped.
- *
- * @param string|array $index
- * @return \Illuminate\Support\Fluent
- */
- public function dropUnique($index)
- {
- return $this->dropIndexCommand('dropUnique', 'unique', $index);
- }
-
- /**
- * Indicate that the given index should be dropped.
- *
- * @param string|array $index
- * @return \Illuminate\Support\Fluent
- */
- public function dropIndex($index)
- {
- return $this->dropIndexCommand('dropIndex', 'index', $index);
- }
-
- /**
- * Indicate that the given spatial index should be dropped.
- *
- * @param string|array $index
- * @return \Illuminate\Support\Fluent
- */
- public function dropSpatialIndex($index)
- {
- return $this->dropIndexCommand('dropSpatialIndex', 'spatialIndex', $index);
- }
-
- /**
- * Indicate that the given foreign key should be dropped.
- *
- * @param string|array $index
- * @return \Illuminate\Support\Fluent
- */
- public function dropForeign($index)
- {
- return $this->dropIndexCommand('dropForeign', 'foreign', $index);
- }
-
- /**
- * Indicate that the given indexes should be renamed.
- *
- * @param string $from
- * @param string $to
- * @return \Illuminate\Support\Fluent
- */
- public function renameIndex($from, $to)
- {
- return $this->addCommand('renameIndex', compact('from', 'to'));
- }
-
- /**
- * Indicate that the timestamp columns should be dropped.
- *
- * @return void
- */
- public function dropTimestamps()
- {
- $this->dropColumn('created_at', 'updated_at');
- }
-
- /**
- * Indicate that the timestamp columns should be dropped.
- *
- * @return void
- */
- public function dropTimestampsTz()
- {
- $this->dropTimestamps();
- }
-
- /**
- * Indicate that the soft delete column should be dropped.
- *
- * @param string $column
- * @return void
- */
- public function dropSoftDeletes($column = 'deleted_at')
- {
- $this->dropColumn($column);
- }
-
- /**
- * Indicate that the soft delete column should be dropped.
- *
- * @param string $column
- * @return void
- */
- public function dropSoftDeletesTz($column = 'deleted_at')
- {
- $this->dropSoftDeletes($column);
- }
-
- /**
- * Indicate that the remember token column should be dropped.
- *
- * @return void
- */
- public function dropRememberToken()
- {
- $this->dropColumn('remember_token');
- }
-
- /**
- * Indicate that the polymorphic columns should be dropped.
- *
- * @param string $name
- * @param string|null $indexName
- * @return void
- */
- public function dropMorphs($name, $indexName = null)
- {
- $this->dropIndex($indexName ?: $this->createIndexName('index', ["{$name}_type", "{$name}_id"]));
-
- $this->dropColumn("{$name}_type", "{$name}_id");
- }
-
- /**
- * Rename the table to a given name.
- *
- * @param string $to
- * @return \Illuminate\Support\Fluent
- */
- public function rename($to)
- {
- return $this->addCommand('rename', compact('to'));
- }
-
- /**
- * Specify the primary key(s) for the table.
- *
- * @param string|array $columns
- * @param string $name
- * @param string|null $algorithm
- * @return \Illuminate\Support\Fluent
- */
- public function primary($columns, $name = null, $algorithm = null)
- {
- return $this->indexCommand('primary', $columns, $name, $algorithm);
- }
-
- /**
- * Specify a unique index for the table.
- *
- * @param string|array $columns
- * @param string $name
- * @param string|null $algorithm
- * @return \Illuminate\Support\Fluent
- */
- public function unique($columns, $name = null, $algorithm = null)
- {
- return $this->indexCommand('unique', $columns, $name, $algorithm);
- }
-
- /**
- * Specify an index for the table.
- *
- * @param string|array $columns
- * @param string $name
- * @param string|null $algorithm
- * @return \Illuminate\Support\Fluent
- */
- public function index($columns, $name = null, $algorithm = null)
- {
- return $this->indexCommand('index', $columns, $name, $algorithm);
- }
-
- /**
- * Specify a spatial index for the table.
- *
- * @param string|array $columns
- * @param string $name
- * @return \Illuminate\Support\Fluent
- */
- public function spatialIndex($columns, $name = null)
- {
- return $this->indexCommand('spatialIndex', $columns, $name);
- }
-
- /**
- * Specify a foreign key for the table.
- *
- * @param string|array $columns
- * @param string $name
- * @return \Illuminate\Support\Fluent
- */
- public function foreign($columns, $name = null)
- {
- return $this->indexCommand('foreign', $columns, $name);
- }
-
- /**
- * Create a new auto-incrementing integer (4-byte) column on the table.
- *
- * @param string $column
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function increments($column)
- {
- return $this->unsignedInteger($column, true);
- }
-
- /**
- * Create a new auto-incrementing tiny integer (1-byte) column on the table.
- *
- * @param string $column
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function tinyIncrements($column)
- {
- return $this->unsignedTinyInteger($column, true);
- }
-
- /**
- * Create a new auto-incrementing small integer (2-byte) column on the table.
- *
- * @param string $column
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function smallIncrements($column)
- {
- return $this->unsignedSmallInteger($column, true);
- }
-
- /**
- * Create a new auto-incrementing medium integer (3-byte) column on the table.
- *
- * @param string $column
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function mediumIncrements($column)
- {
- return $this->unsignedMediumInteger($column, true);
- }
-
- /**
- * Create a new auto-incrementing big integer (8-byte) column on the table.
- *
- * @param string $column
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function bigIncrements($column)
- {
- return $this->unsignedBigInteger($column, true);
- }
-
- /**
- * Create a new char column on the table.
- *
- * @param string $column
- * @param int $length
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function char($column, $length = null)
- {
- $length = $length ?: Builder::$defaultStringLength;
-
- return $this->addColumn('char', $column, compact('length'));
- }
-
- /**
- * Create a new string column on the table.
- *
- * @param string $column
- * @param int $length
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function string($column, $length = null)
- {
- $length = $length ?: Builder::$defaultStringLength;
-
- return $this->addColumn('string', $column, compact('length'));
- }
-
- /**
- * Create a new text column on the table.
- *
- * @param string $column
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function text($column)
- {
- return $this->addColumn('text', $column);
- }
-
- /**
- * Create a new medium text column on the table.
- *
- * @param string $column
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function mediumText($column)
- {
- return $this->addColumn('mediumText', $column);
- }
-
- /**
- * Create a new long text column on the table.
- *
- * @param string $column
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function longText($column)
- {
- return $this->addColumn('longText', $column);
- }
-
- /**
- * Create a new integer (4-byte) column on the table.
- *
- * @param string $column
- * @param bool $autoIncrement
- * @param bool $unsigned
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function integer($column, $autoIncrement = false, $unsigned = false)
- {
- return $this->addColumn('integer', $column, compact('autoIncrement', 'unsigned'));
- }
-
- /**
- * Create a new tiny integer (1-byte) column on the table.
- *
- * @param string $column
- * @param bool $autoIncrement
- * @param bool $unsigned
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function tinyInteger($column, $autoIncrement = false, $unsigned = false)
- {
- return $this->addColumn('tinyInteger', $column, compact('autoIncrement', 'unsigned'));
- }
-
- /**
- * Create a new small integer (2-byte) column on the table.
- *
- * @param string $column
- * @param bool $autoIncrement
- * @param bool $unsigned
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function smallInteger($column, $autoIncrement = false, $unsigned = false)
- {
- return $this->addColumn('smallInteger', $column, compact('autoIncrement', 'unsigned'));
- }
-
- /**
- * Create a new medium integer (3-byte) column on the table.
- *
- * @param string $column
- * @param bool $autoIncrement
- * @param bool $unsigned
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function mediumInteger($column, $autoIncrement = false, $unsigned = false)
- {
- return $this->addColumn('mediumInteger', $column, compact('autoIncrement', 'unsigned'));
- }
-
- /**
- * Create a new big integer (8-byte) column on the table.
- *
- * @param string $column
- * @param bool $autoIncrement
- * @param bool $unsigned
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function bigInteger($column, $autoIncrement = false, $unsigned = false)
- {
- return $this->addColumn('bigInteger', $column, compact('autoIncrement', 'unsigned'));
- }
-
- /**
- * Create a new unsigned integer (4-byte) column on the table.
- *
- * @param string $column
- * @param bool $autoIncrement
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function unsignedInteger($column, $autoIncrement = false)
- {
- return $this->integer($column, $autoIncrement, true);
- }
-
- /**
- * Create a new unsigned tiny integer (1-byte) column on the table.
- *
- * @param string $column
- * @param bool $autoIncrement
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function unsignedTinyInteger($column, $autoIncrement = false)
- {
- return $this->tinyInteger($column, $autoIncrement, true);
- }
-
- /**
- * Create a new unsigned small integer (2-byte) column on the table.
- *
- * @param string $column
- * @param bool $autoIncrement
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function unsignedSmallInteger($column, $autoIncrement = false)
- {
- return $this->smallInteger($column, $autoIncrement, true);
- }
-
- /**
- * Create a new unsigned medium integer (3-byte) column on the table.
- *
- * @param string $column
- * @param bool $autoIncrement
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function unsignedMediumInteger($column, $autoIncrement = false)
- {
- return $this->mediumInteger($column, $autoIncrement, true);
- }
-
- /**
- * Create a new unsigned big integer (8-byte) column on the table.
- *
- * @param string $column
- * @param bool $autoIncrement
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function unsignedBigInteger($column, $autoIncrement = false)
- {
- return $this->bigInteger($column, $autoIncrement, true);
- }
-
- /**
- * Create a new float column on the table.
- *
- * @param string $column
- * @param int $total
- * @param int $places
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function float($column, $total = 8, $places = 2)
- {
- return $this->addColumn('float', $column, compact('total', 'places'));
- }
-
- /**
- * Create a new double column on the table.
- *
- * @param string $column
- * @param int|null $total
- * @param int|null $places
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function double($column, $total = null, $places = null)
- {
- return $this->addColumn('double', $column, compact('total', 'places'));
- }
-
- /**
- * Create a new decimal column on the table.
- *
- * @param string $column
- * @param int $total
- * @param int $places
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function decimal($column, $total = 8, $places = 2)
- {
- return $this->addColumn('decimal', $column, compact('total', 'places'));
- }
-
- /**
- * Create a new unsigned decimal column on the table.
- *
- * @param string $column
- * @param int $total
- * @param int $places
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function unsignedDecimal($column, $total = 8, $places = 2)
- {
- return $this->addColumn('decimal', $column, [
- 'total' => $total, 'places' => $places, 'unsigned' => true,
- ]);
- }
-
- /**
- * Create a new boolean column on the table.
- *
- * @param string $column
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function boolean($column)
- {
- return $this->addColumn('boolean', $column);
- }
-
- /**
- * Create a new enum column on the table.
- *
- * @param string $column
- * @param array $allowed
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function enum($column, array $allowed)
- {
- return $this->addColumn('enum', $column, compact('allowed'));
- }
-
- /**
- * Create a new json column on the table.
- *
- * @param string $column
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function json($column)
- {
- return $this->addColumn('json', $column);
- }
-
- /**
- * Create a new jsonb column on the table.
- *
- * @param string $column
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function jsonb($column)
- {
- return $this->addColumn('jsonb', $column);
- }
-
- /**
- * Create a new date column on the table.
- *
- * @param string $column
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function date($column)
- {
- return $this->addColumn('date', $column);
- }
-
- /**
- * Create a new date-time column on the table.
- *
- * @param string $column
- * @param int $precision
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function dateTime($column, $precision = 0)
- {
- return $this->addColumn('dateTime', $column, compact('precision'));
- }
-
- /**
- * Create a new date-time column (with time zone) on the table.
- *
- * @param string $column
- * @param int $precision
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function dateTimeTz($column, $precision = 0)
- {
- return $this->addColumn('dateTimeTz', $column, compact('precision'));
- }
-
- /**
- * Create a new time column on the table.
- *
- * @param string $column
- * @param int $precision
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function time($column, $precision = 0)
- {
- return $this->addColumn('time', $column, compact('precision'));
- }
-
- /**
- * Create a new time column (with time zone) on the table.
- *
- * @param string $column
- * @param int $precision
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function timeTz($column, $precision = 0)
- {
- return $this->addColumn('timeTz', $column, compact('precision'));
- }
-
- /**
- * Create a new timestamp column on the table.
- *
- * @param string $column
- * @param int $precision
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function timestamp($column, $precision = 0)
- {
- return $this->addColumn('timestamp', $column, compact('precision'));
- }
-
- /**
- * Create a new timestamp (with time zone) column on the table.
- *
- * @param string $column
- * @param int $precision
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function timestampTz($column, $precision = 0)
- {
- return $this->addColumn('timestampTz', $column, compact('precision'));
- }
-
- /**
- * Add nullable creation and update timestamps to the table.
- *
- * @param int $precision
- * @return void
- */
- public function timestamps($precision = 0)
- {
- $this->timestamp('created_at', $precision)->nullable();
-
- $this->timestamp('updated_at', $precision)->nullable();
- }
-
- /**
- * Add nullable creation and update timestamps to the table.
- *
- * Alias for self::timestamps().
- *
- * @param int $precision
- * @return void
- */
- public function nullableTimestamps($precision = 0)
- {
- $this->timestamps($precision);
- }
-
- /**
- * Add creation and update timestampTz columns to the table.
- *
- * @param int $precision
- * @return void
- */
- public function timestampsTz($precision = 0)
- {
- $this->timestampTz('created_at', $precision)->nullable();
-
- $this->timestampTz('updated_at', $precision)->nullable();
- }
-
- /**
- * Add a "deleted at" timestamp for the table.
- *
- * @param string $column
- * @param int $precision
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function softDeletes($column = 'deleted_at', $precision = 0)
- {
- return $this->timestamp($column, $precision)->nullable();
- }
-
- /**
- * Add a "deleted at" timestampTz for the table.
- *
- * @param string $column
- * @param int $precision
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function softDeletesTz($column = 'deleted_at', $precision = 0)
- {
- return $this->timestampTz($column, $precision)->nullable();
- }
-
- /**
- * Create a new year column on the table.
- *
- * @param string $column
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function year($column)
- {
- return $this->addColumn('year', $column);
- }
-
- /**
- * Create a new binary column on the table.
- *
- * @param string $column
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function binary($column)
- {
- return $this->addColumn('binary', $column);
- }
-
- /**
- * Create a new uuid column on the table.
- *
- * @param string $column
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function uuid($column)
- {
- return $this->addColumn('uuid', $column);
- }
-
- /**
- * Create a new IP address column on the table.
- *
- * @param string $column
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function ipAddress($column)
- {
- return $this->addColumn('ipAddress', $column);
- }
-
- /**
- * Create a new MAC address column on the table.
- *
- * @param string $column
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function macAddress($column)
- {
- return $this->addColumn('macAddress', $column);
- }
-
- /**
- * Create a new geometry column on the table.
- *
- * @param string $column
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function geometry($column)
- {
- return $this->addColumn('geometry', $column);
- }
-
- /**
- * Create a new point column on the table.
- *
- * @param string $column
- * @param int|null $srid
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function point($column, $srid = null)
- {
- return $this->addColumn('point', $column, compact('srid'));
- }
-
- /**
- * Create a new linestring column on the table.
- *
- * @param string $column
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function lineString($column)
- {
- return $this->addColumn('linestring', $column);
- }
-
- /**
- * Create a new polygon column on the table.
- *
- * @param string $column
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function polygon($column)
- {
- return $this->addColumn('polygon', $column);
- }
-
- /**
- * Create a new geometrycollection column on the table.
- *
- * @param string $column
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function geometryCollection($column)
- {
- return $this->addColumn('geometrycollection', $column);
- }
-
- /**
- * Create a new multipoint column on the table.
- *
- * @param string $column
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function multiPoint($column)
- {
- return $this->addColumn('multipoint', $column);
- }
-
- /**
- * Create a new multilinestring column on the table.
- *
- * @param string $column
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function multiLineString($column)
- {
- return $this->addColumn('multilinestring', $column);
- }
-
- /**
- * Create a new multipolygon column on the table.
- *
- * @param string $column
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function multiPolygon($column)
- {
- return $this->addColumn('multipolygon', $column);
- }
-
- /**
- * Add the proper columns for a polymorphic table.
- *
- * @param string $name
- * @param string|null $indexName
- * @return void
- */
- public function morphs($name, $indexName = null)
- {
- $this->string("{$name}_type");
-
- $this->unsignedBigInteger("{$name}_id");
-
- $this->index(["{$name}_type", "{$name}_id"], $indexName);
- }
-
- /**
- * Add nullable columns for a polymorphic table.
- *
- * @param string $name
- * @param string|null $indexName
- * @return void
- */
- public function nullableMorphs($name, $indexName = null)
- {
- $this->string("{$name}_type")->nullable();
-
- $this->unsignedBigInteger("{$name}_id")->nullable();
-
- $this->index(["{$name}_type", "{$name}_id"], $indexName);
- }
-
- /**
- * Adds the `remember_token` column to the table.
- *
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function rememberToken()
- {
- return $this->string('remember_token', 100)->nullable();
- }
-
- /**
- * Add a new index command to the blueprint.
- *
- * @param string $type
- * @param string|array $columns
- * @param string $index
- * @param string|null $algorithm
- * @return \Illuminate\Support\Fluent
- */
- protected function indexCommand($type, $columns, $index, $algorithm = null)
- {
- $columns = (array) $columns;
-
- // If no name was specified for this index, we will create one using a basic
- // convention of the table name, followed by the columns, followed by an
- // index type, such as primary or index, which makes the index unique.
- $index = $index ?: $this->createIndexName($type, $columns);
-
- return $this->addCommand(
- $type, compact('index', 'columns', 'algorithm')
- );
- }
-
- /**
- * Create a new drop index command on the blueprint.
- *
- * @param string $command
- * @param string $type
- * @param string|array $index
- * @return \Illuminate\Support\Fluent
- */
- protected function dropIndexCommand($command, $type, $index)
- {
- $columns = [];
-
- // If the given "index" is actually an array of columns, the developer means
- // to drop an index merely by specifying the columns involved without the
- // conventional name, so we will build the index name from the columns.
- if (is_array($index)) {
- $index = $this->createIndexName($type, $columns = $index);
- }
-
- return $this->indexCommand($command, $columns, $index);
- }
-
- /**
- * Create a default index name for the table.
- *
- * @param string $type
- * @param array $columns
- * @return string
- */
- protected function createIndexName($type, array $columns)
- {
- $index = strtolower($this->prefix.$this->table.'_'.implode('_', $columns).'_'.$type);
-
- return str_replace(['-', '.'], '_', $index);
- }
-
- /**
- * Add a new column to the blueprint.
- *
- * @param string $type
- * @param string $name
- * @param array $parameters
- * @return \Illuminate\Database\Schema\ColumnDefinition
- */
- public function addColumn($type, $name, array $parameters = [])
- {
- $this->columns[] = $column = new ColumnDefinition(
- array_merge(compact('type', 'name'), $parameters)
- );
-
- return $column;
- }
-
- /**
- * Remove a column from the schema blueprint.
- *
- * @param string $name
- * @return $this
- */
- public function removeColumn($name)
- {
- $this->columns = array_values(array_filter($this->columns, function ($c) use ($name) {
- return $c['name'] != $name;
- }));
-
- return $this;
- }
-
- /**
- * Add a new command to the blueprint.
- *
- * @param string $name
- * @param array $parameters
- * @return \Illuminate\Support\Fluent
- */
- protected function addCommand($name, array $parameters = [])
- {
- $this->commands[] = $command = $this->createCommand($name, $parameters);
-
- return $command;
- }
-
- /**
- * Create a new Fluent command.
- *
- * @param string $name
- * @param array $parameters
- * @return \Illuminate\Support\Fluent
- */
- protected function createCommand($name, array $parameters = [])
- {
- return new Fluent(array_merge(compact('name'), $parameters));
- }
-
- /**
- * Get the table the blueprint describes.
- *
- * @return string
- */
- public function getTable()
- {
- return $this->table;
- }
-
- /**
- * Get the columns on the blueprint.
- *
- * @return \Illuminate\Database\Schema\ColumnDefinition[]
- */
- public function getColumns()
- {
- return $this->columns;
- }
-
- /**
- * Get the commands on the blueprint.
- *
- * @return \Illuminate\Support\Fluent[]
- */
- public function getCommands()
- {
- return $this->commands;
- }
-
- /**
- * Get the columns on the blueprint that should be added.
- *
- * @return \Illuminate\Database\Schema\ColumnDefinition[]
- */
- public function getAddedColumns()
- {
- return array_filter($this->columns, function ($column) {
- return ! $column->change;
- });
- }
-
- /**
- * Get the columns on the blueprint that should be changed.
- *
- * @return \Illuminate\Database\Schema\ColumnDefinition[]
- */
- public function getChangedColumns()
- {
- return array_filter($this->columns, function ($column) {
- return (bool) $column->change;
- });
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php
deleted file mode 100755
index 2e25cf0..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php
+++ /dev/null
@@ -1,320 +0,0 @@
-connection = $connection;
- $this->grammar = $connection->getSchemaGrammar();
- }
-
- /**
- * Set the default string length for migrations.
- *
- * @param int $length
- * @return void
- */
- public static function defaultStringLength($length)
- {
- static::$defaultStringLength = $length;
- }
-
- /**
- * Determine if the given table exists.
- *
- * @param string $table
- * @return bool
- */
- public function hasTable($table)
- {
- $table = $this->connection->getTablePrefix().$table;
-
- return count($this->connection->selectFromWriteConnection(
- $this->grammar->compileTableExists(), [$table]
- )) > 0;
- }
-
- /**
- * Determine if the given table has a given column.
- *
- * @param string $table
- * @param string $column
- * @return bool
- */
- public function hasColumn($table, $column)
- {
- return in_array(
- strtolower($column), array_map('strtolower', $this->getColumnListing($table))
- );
- }
-
- /**
- * Determine if the given table has given columns.
- *
- * @param string $table
- * @param array $columns
- * @return bool
- */
- public function hasColumns($table, array $columns)
- {
- $tableColumns = array_map('strtolower', $this->getColumnListing($table));
-
- foreach ($columns as $column) {
- if (! in_array(strtolower($column), $tableColumns)) {
- return false;
- }
- }
-
- return true;
- }
-
- /**
- * Get the data type for the given column name.
- *
- * @param string $table
- * @param string $column
- * @return string
- */
- public function getColumnType($table, $column)
- {
- $table = $this->connection->getTablePrefix().$table;
-
- return $this->connection->getDoctrineColumn($table, $column)->getType()->getName();
- }
-
- /**
- * Get the column listing for a given table.
- *
- * @param string $table
- * @return array
- */
- public function getColumnListing($table)
- {
- $results = $this->connection->selectFromWriteConnection($this->grammar->compileColumnListing(
- $this->connection->getTablePrefix().$table
- ));
-
- return $this->connection->getPostProcessor()->processColumnListing($results);
- }
-
- /**
- * Modify a table on the schema.
- *
- * @param string $table
- * @param \Closure $callback
- * @return void
- */
- public function table($table, Closure $callback)
- {
- $this->build($this->createBlueprint($table, $callback));
- }
-
- /**
- * Create a new table on the schema.
- *
- * @param string $table
- * @param \Closure $callback
- * @return void
- */
- public function create($table, Closure $callback)
- {
- $this->build(tap($this->createBlueprint($table), function ($blueprint) use ($callback) {
- $blueprint->create();
-
- $callback($blueprint);
- }));
- }
-
- /**
- * Drop a table from the schema.
- *
- * @param string $table
- * @return void
- */
- public function drop($table)
- {
- $this->build(tap($this->createBlueprint($table), function ($blueprint) {
- $blueprint->drop();
- }));
- }
-
- /**
- * Drop a table from the schema if it exists.
- *
- * @param string $table
- * @return void
- */
- public function dropIfExists($table)
- {
- $this->build(tap($this->createBlueprint($table), function ($blueprint) {
- $blueprint->dropIfExists();
- }));
- }
-
- /**
- * Drop all tables from the database.
- *
- * @return void
- *
- * @throws \LogicException
- */
- public function dropAllTables()
- {
- throw new LogicException('This database driver does not support dropping all tables.');
- }
-
- /**
- * Drop all views from the database.
- *
- * @return void
- *
- * @throws \LogicException
- */
- public function dropAllViews()
- {
- throw new LogicException('This database driver does not support dropping all views.');
- }
-
- /**
- * Rename a table on the schema.
- *
- * @param string $from
- * @param string $to
- * @return void
- */
- public function rename($from, $to)
- {
- $this->build(tap($this->createBlueprint($from), function ($blueprint) use ($to) {
- $blueprint->rename($to);
- }));
- }
-
- /**
- * Enable foreign key constraints.
- *
- * @return bool
- */
- public function enableForeignKeyConstraints()
- {
- return $this->connection->statement(
- $this->grammar->compileEnableForeignKeyConstraints()
- );
- }
-
- /**
- * Disable foreign key constraints.
- *
- * @return bool
- */
- public function disableForeignKeyConstraints()
- {
- return $this->connection->statement(
- $this->grammar->compileDisableForeignKeyConstraints()
- );
- }
-
- /**
- * Execute the blueprint to build / modify the table.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @return void
- */
- protected function build(Blueprint $blueprint)
- {
- $blueprint->build($this->connection, $this->grammar);
- }
-
- /**
- * Create a new command set with a Closure.
- *
- * @param string $table
- * @param \Closure|null $callback
- * @return \Illuminate\Database\Schema\Blueprint
- */
- protected function createBlueprint($table, Closure $callback = null)
- {
- $prefix = $this->connection->getConfig('prefix_indexes')
- ? $this->connection->getConfig('prefix')
- : '';
-
- if (isset($this->resolver)) {
- return call_user_func($this->resolver, $table, $callback, $prefix);
- }
-
- return new Blueprint($table, $callback, $prefix);
- }
-
- /**
- * Get the database connection instance.
- *
- * @return \Illuminate\Database\Connection
- */
- public function getConnection()
- {
- return $this->connection;
- }
-
- /**
- * Set the database connection instance.
- *
- * @param \Illuminate\Database\Connection $connection
- * @return $this
- */
- public function setConnection(Connection $connection)
- {
- $this->connection = $connection;
-
- return $this;
- }
-
- /**
- * Set the Schema Blueprint resolver callback.
- *
- * @param \Closure $resolver
- * @return void
- */
- public function blueprintResolver(Closure $resolver)
- {
- $this->resolver = $resolver;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/ColumnDefinition.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/ColumnDefinition.php
deleted file mode 100644
index 1752099..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Schema/ColumnDefinition.php
+++ /dev/null
@@ -1,31 +0,0 @@
-isDoctrineAvailable()) {
- throw new RuntimeException(sprintf(
- 'Changing columns for table "%s" requires Doctrine DBAL; install "doctrine/dbal".',
- $blueprint->getTable()
- ));
- }
-
- $tableDiff = static::getChangedDiff(
- $grammar, $blueprint, $schema = $connection->getDoctrineSchemaManager()
- );
-
- if ($tableDiff !== false) {
- return (array) $schema->getDatabasePlatform()->getAlterTableSQL($tableDiff);
- }
-
- return [];
- }
-
- /**
- * Get the Doctrine table difference for the given changes.
- *
- * @param \Illuminate\Database\Schema\Grammars\Grammar $grammar
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Doctrine\DBAL\Schema\AbstractSchemaManager $schema
- * @return \Doctrine\DBAL\Schema\TableDiff|bool
- */
- protected static function getChangedDiff($grammar, Blueprint $blueprint, SchemaManager $schema)
- {
- $current = $schema->listTableDetails($grammar->getTablePrefix().$blueprint->getTable());
-
- return (new Comparator)->diffTable(
- $current, static::getTableWithColumnChanges($blueprint, $current)
- );
- }
-
- /**
- * Get a copy of the given Doctrine table after making the column changes.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Doctrine\DBAL\Schema\Table $table
- * @return \Doctrine\DBAL\Schema\Table
- */
- protected static function getTableWithColumnChanges(Blueprint $blueprint, Table $table)
- {
- $table = clone $table;
-
- foreach ($blueprint->getChangedColumns() as $fluent) {
- $column = static::getDoctrineColumn($table, $fluent);
-
- // Here we will spin through each fluent column definition and map it to the proper
- // Doctrine column definitions - which is necessary because Laravel and Doctrine
- // use some different terminology for various column attributes on the tables.
- foreach ($fluent->getAttributes() as $key => $value) {
- if (! is_null($option = static::mapFluentOptionToDoctrine($key))) {
- if (method_exists($column, $method = 'set'.ucfirst($option))) {
- $column->{$method}(static::mapFluentValueToDoctrine($option, $value));
- }
- }
- }
- }
-
- return $table;
- }
-
- /**
- * Get the Doctrine column instance for a column change.
- *
- * @param \Doctrine\DBAL\Schema\Table $table
- * @param \Illuminate\Support\Fluent $fluent
- * @return \Doctrine\DBAL\Schema\Column
- */
- protected static function getDoctrineColumn(Table $table, Fluent $fluent)
- {
- return $table->changeColumn(
- $fluent['name'], static::getDoctrineColumnChangeOptions($fluent)
- )->getColumn($fluent['name']);
- }
-
- /**
- * Get the Doctrine column change options.
- *
- * @param \Illuminate\Support\Fluent $fluent
- * @return array
- */
- protected static function getDoctrineColumnChangeOptions(Fluent $fluent)
- {
- $options = ['type' => static::getDoctrineColumnType($fluent['type'])];
-
- if (in_array($fluent['type'], ['text', 'mediumText', 'longText'])) {
- $options['length'] = static::calculateDoctrineTextLength($fluent['type']);
- }
-
- if ($fluent['type'] === 'json') {
- $options['customSchemaOptions'] = [
- 'collation' => '',
- ];
- }
-
- return $options;
- }
-
- /**
- * Get the doctrine column type.
- *
- * @param string $type
- * @return \Doctrine\DBAL\Types\Type
- */
- protected static function getDoctrineColumnType($type)
- {
- $type = strtolower($type);
-
- switch ($type) {
- case 'biginteger':
- $type = 'bigint';
- break;
- case 'smallinteger':
- $type = 'smallint';
- break;
- case 'mediumtext':
- case 'longtext':
- $type = 'text';
- break;
- case 'binary':
- $type = 'blob';
- break;
- }
-
- return Type::getType($type);
- }
-
- /**
- * Calculate the proper column length to force the Doctrine text type.
- *
- * @param string $type
- * @return int
- */
- protected static function calculateDoctrineTextLength($type)
- {
- switch ($type) {
- case 'mediumText':
- return 65535 + 1;
- case 'longText':
- return 16777215 + 1;
- default:
- return 255 + 1;
- }
- }
-
- /**
- * Get the matching Doctrine option for a given Fluent attribute name.
- *
- * @param string $attribute
- * @return string|null
- */
- protected static function mapFluentOptionToDoctrine($attribute)
- {
- switch ($attribute) {
- case 'type':
- case 'name':
- return;
- case 'nullable':
- return 'notnull';
- case 'total':
- return 'precision';
- case 'places':
- return 'scale';
- default:
- return $attribute;
- }
- }
-
- /**
- * Get the matching Doctrine value for a given Fluent attribute.
- *
- * @param string $option
- * @param mixed $value
- * @return mixed
- */
- protected static function mapFluentValueToDoctrine($option, $value)
- {
- return $option === 'notnull' ? ! $value : $value;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/Grammar.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/Grammar.php
deleted file mode 100755
index 1ea4dab..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/Grammar.php
+++ /dev/null
@@ -1,272 +0,0 @@
-wrapTable($blueprint),
- $this->wrap($command->index)
- );
-
- // Once we have the initial portion of the SQL statement we will add on the
- // key name, table name, and referenced columns. These will complete the
- // main portion of the SQL statement and this SQL will almost be done.
- $sql .= sprintf('foreign key (%s) references %s (%s)',
- $this->columnize($command->columns),
- $this->wrapTable($command->on),
- $this->columnize((array) $command->references)
- );
-
- // Once we have the basic foreign key creation statement constructed we can
- // build out the syntax for what should happen on an update or delete of
- // the affected columns, which will get something like "cascade", etc.
- if (! is_null($command->onDelete)) {
- $sql .= " on delete {$command->onDelete}";
- }
-
- if (! is_null($command->onUpdate)) {
- $sql .= " on update {$command->onUpdate}";
- }
-
- return $sql;
- }
-
- /**
- * Compile the blueprint's column definitions.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @return array
- */
- protected function getColumns(Blueprint $blueprint)
- {
- $columns = [];
-
- foreach ($blueprint->getAddedColumns() as $column) {
- // Each of the column types have their own compiler functions which are tasked
- // with turning the column definition into its SQL format for this platform
- // used by the connection. The column's modifiers are compiled and added.
- $sql = $this->wrap($column).' '.$this->getType($column);
-
- $columns[] = $this->addModifiers($sql, $blueprint, $column);
- }
-
- return $columns;
- }
-
- /**
- * Get the SQL for the column data type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function getType(Fluent $column)
- {
- return $this->{'type'.ucfirst($column->type)}($column);
- }
-
- /**
- * Add the column modifiers to the definition.
- *
- * @param string $sql
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function addModifiers($sql, Blueprint $blueprint, Fluent $column)
- {
- foreach ($this->modifiers as $modifier) {
- if (method_exists($this, $method = "modify{$modifier}")) {
- $sql .= $this->{$method}($blueprint, $column);
- }
- }
-
- return $sql;
- }
-
- /**
- * Get the primary key command if it exists on the blueprint.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param string $name
- * @return \Illuminate\Support\Fluent|null
- */
- protected function getCommandByName(Blueprint $blueprint, $name)
- {
- $commands = $this->getCommandsByName($blueprint, $name);
-
- if (count($commands) > 0) {
- return reset($commands);
- }
- }
-
- /**
- * Get all of the commands with a given name.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param string $name
- * @return array
- */
- protected function getCommandsByName(Blueprint $blueprint, $name)
- {
- return array_filter($blueprint->getCommands(), function ($value) use ($name) {
- return $value->name == $name;
- });
- }
-
- /**
- * Add a prefix to an array of values.
- *
- * @param string $prefix
- * @param array $values
- * @return array
- */
- public function prefixArray($prefix, array $values)
- {
- return array_map(function ($value) use ($prefix) {
- return $prefix.' '.$value;
- }, $values);
- }
-
- /**
- * Wrap a table in keyword identifiers.
- *
- * @param mixed $table
- * @return string
- */
- public function wrapTable($table)
- {
- return parent::wrapTable(
- $table instanceof Blueprint ? $table->getTable() : $table
- );
- }
-
- /**
- * Wrap a value in keyword identifiers.
- *
- * @param \Illuminate\Database\Query\Expression|string $value
- * @param bool $prefixAlias
- * @return string
- */
- public function wrap($value, $prefixAlias = false)
- {
- return parent::wrap(
- $value instanceof Fluent ? $value->name : $value, $prefixAlias
- );
- }
-
- /**
- * Format a value so that it can be used in "default" clauses.
- *
- * @param mixed $value
- * @return string
- */
- protected function getDefaultValue($value)
- {
- if ($value instanceof Expression) {
- return $value;
- }
-
- return is_bool($value)
- ? "'".(int) $value."'"
- : "'".(string) $value."'";
- }
-
- /**
- * Create an empty Doctrine DBAL TableDiff from the Blueprint.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Doctrine\DBAL\Schema\AbstractSchemaManager $schema
- * @return \Doctrine\DBAL\Schema\TableDiff
- */
- public function getDoctrineTableDiff(Blueprint $blueprint, SchemaManager $schema)
- {
- $table = $this->getTablePrefix().$blueprint->getTable();
-
- return tap(new TableDiff($table), function ($tableDiff) use ($schema, $table) {
- $tableDiff->fromTable = $schema->listTableDetails($table);
- });
- }
-
- /**
- * Get the fluent commands for the grammar.
- *
- * @return array
- */
- public function getFluentCommands()
- {
- return $this->fluentCommands;
- }
-
- /**
- * Check if this Grammar supports schema changes wrapped in a transaction.
- *
- * @return bool
- */
- public function supportsSchemaTransactions()
- {
- return $this->transactions;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php
deleted file mode 100755
index 2e5ec24..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php
+++ /dev/null
@@ -1,1018 +0,0 @@
-compileCreateTable(
- $blueprint, $command, $connection
- );
-
- // Once we have the primary SQL, we can add the encoding option to the SQL for
- // the table. Then, we can check if a storage engine has been supplied for
- // the table. If so, we will add the engine declaration to the SQL query.
- $sql = $this->compileCreateEncoding(
- $sql, $connection, $blueprint
- );
-
- // Finally, we will append the engine configuration onto this SQL statement as
- // the final thing we do before returning this finished SQL. Once this gets
- // added the query will be ready to execute against the real connections.
- return $this->compileCreateEngine(
- $sql, $connection, $blueprint
- );
- }
-
- /**
- * Create the main create table clause.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @param \Illuminate\Database\Connection $connection
- * @return string
- */
- protected function compileCreateTable($blueprint, $command, $connection)
- {
- return sprintf('%s table %s (%s)',
- $blueprint->temporary ? 'create temporary' : 'create',
- $this->wrapTable($blueprint),
- implode(', ', $this->getColumns($blueprint))
- );
- }
-
- /**
- * Append the character set specifications to a command.
- *
- * @param string $sql
- * @param \Illuminate\Database\Connection $connection
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @return string
- */
- protected function compileCreateEncoding($sql, Connection $connection, Blueprint $blueprint)
- {
- // First we will set the character set if one has been set on either the create
- // blueprint itself or on the root configuration for the connection that the
- // table is being created on. We will add these to the create table query.
- if (isset($blueprint->charset)) {
- $sql .= ' default character set '.$blueprint->charset;
- } elseif (! is_null($charset = $connection->getConfig('charset'))) {
- $sql .= ' default character set '.$charset;
- }
-
- // Next we will add the collation to the create table statement if one has been
- // added to either this create table blueprint or the configuration for this
- // connection that the query is targeting. We'll add it to this SQL query.
- if (isset($blueprint->collation)) {
- $sql .= " collate '{$blueprint->collation}'";
- } elseif (! is_null($collation = $connection->getConfig('collation'))) {
- $sql .= " collate '{$collation}'";
- }
-
- return $sql;
- }
-
- /**
- * Append the engine specifications to a command.
- *
- * @param string $sql
- * @param \Illuminate\Database\Connection $connection
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @return string
- */
- protected function compileCreateEngine($sql, Connection $connection, Blueprint $blueprint)
- {
- if (isset($blueprint->engine)) {
- return $sql.' engine = '.$blueprint->engine;
- } elseif (! is_null($engine = $connection->getConfig('engine'))) {
- return $sql.' engine = '.$engine;
- }
-
- return $sql;
- }
-
- /**
- * Compile an add column command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileAdd(Blueprint $blueprint, Fluent $command)
- {
- $columns = $this->prefixArray('add', $this->getColumns($blueprint));
-
- return 'alter table '.$this->wrapTable($blueprint).' '.implode(', ', $columns);
- }
-
- /**
- * Compile a primary key command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compilePrimary(Blueprint $blueprint, Fluent $command)
- {
- $command->name(null);
-
- return $this->compileKey($blueprint, $command, 'primary key');
- }
-
- /**
- * Compile a unique key command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileUnique(Blueprint $blueprint, Fluent $command)
- {
- return $this->compileKey($blueprint, $command, 'unique');
- }
-
- /**
- * Compile a plain index key command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileIndex(Blueprint $blueprint, Fluent $command)
- {
- return $this->compileKey($blueprint, $command, 'index');
- }
-
- /**
- * Compile a spatial index key command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileSpatialIndex(Blueprint $blueprint, Fluent $command)
- {
- return $this->compileKey($blueprint, $command, 'spatial index');
- }
-
- /**
- * Compile an index creation command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @param string $type
- * @return string
- */
- protected function compileKey(Blueprint $blueprint, Fluent $command, $type)
- {
- return sprintf('alter table %s add %s %s%s(%s)',
- $this->wrapTable($blueprint),
- $type,
- $this->wrap($command->index),
- $command->algorithm ? ' using '.$command->algorithm : '',
- $this->columnize($command->columns)
- );
- }
-
- /**
- * Compile a drop table command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileDrop(Blueprint $blueprint, Fluent $command)
- {
- return 'drop table '.$this->wrapTable($blueprint);
- }
-
- /**
- * Compile a drop table (if exists) command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileDropIfExists(Blueprint $blueprint, Fluent $command)
- {
- return 'drop table if exists '.$this->wrapTable($blueprint);
- }
-
- /**
- * Compile a drop column command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileDropColumn(Blueprint $blueprint, Fluent $command)
- {
- $columns = $this->prefixArray('drop', $this->wrapArray($command->columns));
-
- return 'alter table '.$this->wrapTable($blueprint).' '.implode(', ', $columns);
- }
-
- /**
- * Compile a drop primary key command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileDropPrimary(Blueprint $blueprint, Fluent $command)
- {
- return 'alter table '.$this->wrapTable($blueprint).' drop primary key';
- }
-
- /**
- * Compile a drop unique key command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileDropUnique(Blueprint $blueprint, Fluent $command)
- {
- $index = $this->wrap($command->index);
-
- return "alter table {$this->wrapTable($blueprint)} drop index {$index}";
- }
-
- /**
- * Compile a drop index command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileDropIndex(Blueprint $blueprint, Fluent $command)
- {
- $index = $this->wrap($command->index);
-
- return "alter table {$this->wrapTable($blueprint)} drop index {$index}";
- }
-
- /**
- * Compile a drop spatial index command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileDropSpatialIndex(Blueprint $blueprint, Fluent $command)
- {
- return $this->compileDropIndex($blueprint, $command);
- }
-
- /**
- * Compile a drop foreign key command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileDropForeign(Blueprint $blueprint, Fluent $command)
- {
- $index = $this->wrap($command->index);
-
- return "alter table {$this->wrapTable($blueprint)} drop foreign key {$index}";
- }
-
- /**
- * Compile a rename table command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileRename(Blueprint $blueprint, Fluent $command)
- {
- $from = $this->wrapTable($blueprint);
-
- return "rename table {$from} to ".$this->wrapTable($command->to);
- }
-
- /**
- * Compile a rename index command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileRenameIndex(Blueprint $blueprint, Fluent $command)
- {
- return sprintf('alter table %s rename index %s to %s',
- $this->wrapTable($blueprint),
- $this->wrap($command->from),
- $this->wrap($command->to)
- );
- }
-
- /**
- * Compile the SQL needed to drop all tables.
- *
- * @param array $tables
- * @return string
- */
- public function compileDropAllTables($tables)
- {
- return 'drop table '.implode(',', $this->wrapArray($tables));
- }
-
- /**
- * Compile the SQL needed to drop all views.
- *
- * @param array $views
- * @return string
- */
- public function compileDropAllViews($views)
- {
- return 'drop view '.implode(',', $this->wrapArray($views));
- }
-
- /**
- * Compile the SQL needed to retrieve all table names.
- *
- * @return string
- */
- public function compileGetAllTables()
- {
- return 'SHOW FULL TABLES WHERE table_type = \'BASE TABLE\'';
- }
-
- /**
- * Compile the SQL needed to retrieve all view names.
- *
- * @return string
- */
- public function compileGetAllViews()
- {
- return 'SHOW FULL TABLES WHERE table_type = \'VIEW\'';
- }
-
- /**
- * Compile the command to enable foreign key constraints.
- *
- * @return string
- */
- public function compileEnableForeignKeyConstraints()
- {
- return 'SET FOREIGN_KEY_CHECKS=1;';
- }
-
- /**
- * Compile the command to disable foreign key constraints.
- *
- * @return string
- */
- public function compileDisableForeignKeyConstraints()
- {
- return 'SET FOREIGN_KEY_CHECKS=0;';
- }
-
- /**
- * Create the column definition for a char type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeChar(Fluent $column)
- {
- return "char({$column->length})";
- }
-
- /**
- * Create the column definition for a string type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeString(Fluent $column)
- {
- return "varchar({$column->length})";
- }
-
- /**
- * Create the column definition for a text type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeText(Fluent $column)
- {
- return 'text';
- }
-
- /**
- * Create the column definition for a medium text type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeMediumText(Fluent $column)
- {
- return 'mediumtext';
- }
-
- /**
- * Create the column definition for a long text type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeLongText(Fluent $column)
- {
- return 'longtext';
- }
-
- /**
- * Create the column definition for a big integer type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeBigInteger(Fluent $column)
- {
- return 'bigint';
- }
-
- /**
- * Create the column definition for an integer type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeInteger(Fluent $column)
- {
- return 'int';
- }
-
- /**
- * Create the column definition for a medium integer type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeMediumInteger(Fluent $column)
- {
- return 'mediumint';
- }
-
- /**
- * Create the column definition for a tiny integer type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeTinyInteger(Fluent $column)
- {
- return 'tinyint';
- }
-
- /**
- * Create the column definition for a small integer type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeSmallInteger(Fluent $column)
- {
- return 'smallint';
- }
-
- /**
- * Create the column definition for a float type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeFloat(Fluent $column)
- {
- return $this->typeDouble($column);
- }
-
- /**
- * Create the column definition for a double type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeDouble(Fluent $column)
- {
- if ($column->total && $column->places) {
- return "double({$column->total}, {$column->places})";
- }
-
- return 'double';
- }
-
- /**
- * Create the column definition for a decimal type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeDecimal(Fluent $column)
- {
- return "decimal({$column->total}, {$column->places})";
- }
-
- /**
- * Create the column definition for a boolean type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeBoolean(Fluent $column)
- {
- return 'tinyint(1)';
- }
-
- /**
- * Create the column definition for an enumeration type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeEnum(Fluent $column)
- {
- return sprintf('enum(%s)', $this->quoteString($column->allowed));
- }
-
- /**
- * Create the column definition for a json type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeJson(Fluent $column)
- {
- return 'json';
- }
-
- /**
- * Create the column definition for a jsonb type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeJsonb(Fluent $column)
- {
- return 'json';
- }
-
- /**
- * Create the column definition for a date type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeDate(Fluent $column)
- {
- return 'date';
- }
-
- /**
- * Create the column definition for a date-time type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeDateTime(Fluent $column)
- {
- return $column->precision ? "datetime($column->precision)" : 'datetime';
- }
-
- /**
- * Create the column definition for a date-time (with time zone) type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeDateTimeTz(Fluent $column)
- {
- return $this->typeDateTime($column);
- }
-
- /**
- * Create the column definition for a time type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeTime(Fluent $column)
- {
- return $column->precision ? "time($column->precision)" : 'time';
- }
-
- /**
- * Create the column definition for a time (with time zone) type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeTimeTz(Fluent $column)
- {
- return $this->typeTime($column);
- }
-
- /**
- * Create the column definition for a timestamp type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeTimestamp(Fluent $column)
- {
- $columnType = $column->precision ? "timestamp($column->precision)" : 'timestamp';
-
- return $column->useCurrent ? "$columnType default CURRENT_TIMESTAMP" : $columnType;
- }
-
- /**
- * Create the column definition for a timestamp (with time zone) type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeTimestampTz(Fluent $column)
- {
- return $this->typeTimestamp($column);
- }
-
- /**
- * Create the column definition for a year type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeYear(Fluent $column)
- {
- return 'year';
- }
-
- /**
- * Create the column definition for a binary type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeBinary(Fluent $column)
- {
- return 'blob';
- }
-
- /**
- * Create the column definition for a uuid type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeUuid(Fluent $column)
- {
- return 'char(36)';
- }
-
- /**
- * Create the column definition for an IP address type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeIpAddress(Fluent $column)
- {
- return 'varchar(45)';
- }
-
- /**
- * Create the column definition for a MAC address type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeMacAddress(Fluent $column)
- {
- return 'varchar(17)';
- }
-
- /**
- * Create the column definition for a spatial Geometry type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- public function typeGeometry(Fluent $column)
- {
- return 'geometry';
- }
-
- /**
- * Create the column definition for a spatial Point type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- public function typePoint(Fluent $column)
- {
- return 'point';
- }
-
- /**
- * Create the column definition for a spatial LineString type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- public function typeLineString(Fluent $column)
- {
- return 'linestring';
- }
-
- /**
- * Create the column definition for a spatial Polygon type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- public function typePolygon(Fluent $column)
- {
- return 'polygon';
- }
-
- /**
- * Create the column definition for a spatial GeometryCollection type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- public function typeGeometryCollection(Fluent $column)
- {
- return 'geometrycollection';
- }
-
- /**
- * Create the column definition for a spatial MultiPoint type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- public function typeMultiPoint(Fluent $column)
- {
- return 'multipoint';
- }
-
- /**
- * Create the column definition for a spatial MultiLineString type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- public function typeMultiLineString(Fluent $column)
- {
- return 'multilinestring';
- }
-
- /**
- * Create the column definition for a spatial MultiPolygon type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- public function typeMultiPolygon(Fluent $column)
- {
- return 'multipolygon';
- }
-
- /**
- * Get the SQL for a generated virtual column modifier.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $column
- * @return string|null
- */
- protected function modifyVirtualAs(Blueprint $blueprint, Fluent $column)
- {
- if (! is_null($column->virtualAs)) {
- return " as ({$column->virtualAs})";
- }
- }
-
- /**
- * Get the SQL for a generated stored column modifier.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $column
- * @return string|null
- */
- protected function modifyStoredAs(Blueprint $blueprint, Fluent $column)
- {
- if (! is_null($column->storedAs)) {
- return " as ({$column->storedAs}) stored";
- }
- }
-
- /**
- * Get the SQL for an unsigned column modifier.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $column
- * @return string|null
- */
- protected function modifyUnsigned(Blueprint $blueprint, Fluent $column)
- {
- if ($column->unsigned) {
- return ' unsigned';
- }
- }
-
- /**
- * Get the SQL for a character set column modifier.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $column
- * @return string|null
- */
- protected function modifyCharset(Blueprint $blueprint, Fluent $column)
- {
- if (! is_null($column->charset)) {
- return ' character set '.$column->charset;
- }
- }
-
- /**
- * Get the SQL for a collation column modifier.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $column
- * @return string|null
- */
- protected function modifyCollate(Blueprint $blueprint, Fluent $column)
- {
- if (! is_null($column->collation)) {
- return " collate '{$column->collation}'";
- }
- }
-
- /**
- * Get the SQL for a nullable column modifier.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $column
- * @return string|null
- */
- protected function modifyNullable(Blueprint $blueprint, Fluent $column)
- {
- if (is_null($column->virtualAs) && is_null($column->storedAs)) {
- return $column->nullable ? ' null' : ' not null';
- }
- }
-
- /**
- * Get the SQL for a default column modifier.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $column
- * @return string|null
- */
- protected function modifyDefault(Blueprint $blueprint, Fluent $column)
- {
- if (! is_null($column->default)) {
- return ' default '.$this->getDefaultValue($column->default);
- }
- }
-
- /**
- * Get the SQL for an auto-increment column modifier.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $column
- * @return string|null
- */
- protected function modifyIncrement(Blueprint $blueprint, Fluent $column)
- {
- if (in_array($column->type, $this->serials) && $column->autoIncrement) {
- return ' auto_increment primary key';
- }
- }
-
- /**
- * Get the SQL for a "first" column modifier.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $column
- * @return string|null
- */
- protected function modifyFirst(Blueprint $blueprint, Fluent $column)
- {
- if (! is_null($column->first)) {
- return ' first';
- }
- }
-
- /**
- * Get the SQL for an "after" column modifier.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $column
- * @return string|null
- */
- protected function modifyAfter(Blueprint $blueprint, Fluent $column)
- {
- if (! is_null($column->after)) {
- return ' after '.$this->wrap($column->after);
- }
- }
-
- /**
- * Get the SQL for a "comment" column modifier.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $column
- * @return string|null
- */
- protected function modifyComment(Blueprint $blueprint, Fluent $column)
- {
- if (! is_null($column->comment)) {
- return " comment '".addslashes($column->comment)."'";
- }
- }
-
- /**
- * Get the SQL for a SRID column modifier.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $column
- * @return string|null
- */
- protected function modifySrid(Blueprint $blueprint, Fluent $column)
- {
- if (! is_null($column->srid) && is_int($column->srid) && $column->srid > 0) {
- return ' srid '.$column->srid;
- }
- }
-
- /**
- * Wrap a single string in keyword identifiers.
- *
- * @param string $value
- * @return string
- */
- protected function wrapValue($value)
- {
- if ($value !== '*') {
- return '`'.str_replace('`', '``', $value).'`';
- }
-
- return $value;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php
deleted file mode 100755
index 4fa3285..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php
+++ /dev/null
@@ -1,900 +0,0 @@
-temporary ? 'create temporary' : 'create',
- $this->wrapTable($blueprint),
- implode(', ', $this->getColumns($blueprint))
- );
- }
-
- /**
- * Compile a column addition command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileAdd(Blueprint $blueprint, Fluent $command)
- {
- return sprintf('alter table %s %s',
- $this->wrapTable($blueprint),
- implode(', ', $this->prefixArray('add column', $this->getColumns($blueprint)))
- );
- }
-
- /**
- * Compile a primary key command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compilePrimary(Blueprint $blueprint, Fluent $command)
- {
- $columns = $this->columnize($command->columns);
-
- return 'alter table '.$this->wrapTable($blueprint)." add primary key ({$columns})";
- }
-
- /**
- * Compile a unique key command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileUnique(Blueprint $blueprint, Fluent $command)
- {
- return sprintf('alter table %s add constraint %s unique (%s)',
- $this->wrapTable($blueprint),
- $this->wrap($command->index),
- $this->columnize($command->columns)
- );
- }
-
- /**
- * Compile a plain index key command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileIndex(Blueprint $blueprint, Fluent $command)
- {
- return sprintf('create index %s on %s%s (%s)',
- $this->wrap($command->index),
- $this->wrapTable($blueprint),
- $command->algorithm ? ' using '.$command->algorithm : '',
- $this->columnize($command->columns)
- );
- }
-
- /**
- * Compile a spatial index key command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileSpatialIndex(Blueprint $blueprint, Fluent $command)
- {
- $command->algorithm = 'gist';
-
- return $this->compileIndex($blueprint, $command);
- }
-
- /**
- * Compile a foreign key command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileForeign(Blueprint $blueprint, Fluent $command)
- {
- $sql = parent::compileForeign($blueprint, $command);
-
- if (! is_null($command->deferrable)) {
- $sql .= $command->deferrable ? ' deferrable' : ' not deferrable';
- }
-
- if ($command->deferrable && ! is_null($command->initiallyImmediate)) {
- $sql .= $command->initiallyImmediate ? ' initially immediate' : ' initially deferred';
- }
-
- if (! is_null($command->notValid)) {
- $sql .= ' not valid';
- }
-
- return $sql;
- }
-
- /**
- * Compile a drop table command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileDrop(Blueprint $blueprint, Fluent $command)
- {
- return 'drop table '.$this->wrapTable($blueprint);
- }
-
- /**
- * Compile a drop table (if exists) command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileDropIfExists(Blueprint $blueprint, Fluent $command)
- {
- return 'drop table if exists '.$this->wrapTable($blueprint);
- }
-
- /**
- * Compile the SQL needed to drop all tables.
- *
- * @param string $tables
- * @return string
- */
- public function compileDropAllTables($tables)
- {
- return 'drop table "'.implode('","', $tables).'" cascade';
- }
-
- /**
- * Compile the SQL needed to drop all views.
- *
- * @param string $views
- * @return string
- */
- public function compileDropAllViews($views)
- {
- return 'drop view "'.implode('","', $views).'" cascade';
- }
-
- /**
- * Compile the SQL needed to retrieve all table names.
- *
- * @param string $schema
- * @return string
- */
- public function compileGetAllTables($schema)
- {
- return "select tablename from pg_catalog.pg_tables where schemaname = '{$schema}'";
- }
-
- /**
- * Compile the SQL needed to retrieve all view names.
- *
- * @param string $schema
- * @return string
- */
- public function compileGetAllViews($schema)
- {
- return "select viewname from pg_catalog.pg_views where schemaname = '{$schema}'";
- }
-
- /**
- * Compile a drop column command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileDropColumn(Blueprint $blueprint, Fluent $command)
- {
- $columns = $this->prefixArray('drop column', $this->wrapArray($command->columns));
-
- return 'alter table '.$this->wrapTable($blueprint).' '.implode(', ', $columns);
- }
-
- /**
- * Compile a drop primary key command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileDropPrimary(Blueprint $blueprint, Fluent $command)
- {
- $index = $this->wrap("{$blueprint->getTable()}_pkey");
-
- return 'alter table '.$this->wrapTable($blueprint)." drop constraint {$index}";
- }
-
- /**
- * Compile a drop unique key command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileDropUnique(Blueprint $blueprint, Fluent $command)
- {
- $index = $this->wrap($command->index);
-
- return "alter table {$this->wrapTable($blueprint)} drop constraint {$index}";
- }
-
- /**
- * Compile a drop index command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileDropIndex(Blueprint $blueprint, Fluent $command)
- {
- return "drop index {$this->wrap($command->index)}";
- }
-
- /**
- * Compile a drop spatial index command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileDropSpatialIndex(Blueprint $blueprint, Fluent $command)
- {
- return $this->compileDropIndex($blueprint, $command);
- }
-
- /**
- * Compile a drop foreign key command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileDropForeign(Blueprint $blueprint, Fluent $command)
- {
- $index = $this->wrap($command->index);
-
- return "alter table {$this->wrapTable($blueprint)} drop constraint {$index}";
- }
-
- /**
- * Compile a rename table command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileRename(Blueprint $blueprint, Fluent $command)
- {
- $from = $this->wrapTable($blueprint);
-
- return "alter table {$from} rename to ".$this->wrapTable($command->to);
- }
-
- /**
- * Compile a rename index command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileRenameIndex(Blueprint $blueprint, Fluent $command)
- {
- return sprintf('alter index %s rename to %s',
- $this->wrap($command->from),
- $this->wrap($command->to)
- );
- }
-
- /**
- * Compile the command to enable foreign key constraints.
- *
- * @return string
- */
- public function compileEnableForeignKeyConstraints()
- {
- return 'SET CONSTRAINTS ALL IMMEDIATE;';
- }
-
- /**
- * Compile the command to disable foreign key constraints.
- *
- * @return string
- */
- public function compileDisableForeignKeyConstraints()
- {
- return 'SET CONSTRAINTS ALL DEFERRED;';
- }
-
- /**
- * Compile a comment command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileComment(Blueprint $blueprint, Fluent $command)
- {
- return sprintf('comment on column %s.%s is %s',
- $this->wrapTable($blueprint),
- $this->wrap($command->column->name),
- "'".str_replace("'", "''", $command->value)."'"
- );
- }
-
- /**
- * Create the column definition for a char type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeChar(Fluent $column)
- {
- return "char({$column->length})";
- }
-
- /**
- * Create the column definition for a string type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeString(Fluent $column)
- {
- return "varchar({$column->length})";
- }
-
- /**
- * Create the column definition for a text type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeText(Fluent $column)
- {
- return 'text';
- }
-
- /**
- * Create the column definition for a medium text type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeMediumText(Fluent $column)
- {
- return 'text';
- }
-
- /**
- * Create the column definition for a long text type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeLongText(Fluent $column)
- {
- return 'text';
- }
-
- /**
- * Create the column definition for an integer type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeInteger(Fluent $column)
- {
- return $this->generatableColumn('integer', $column);
- }
-
- /**
- * Create the column definition for a big integer type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeBigInteger(Fluent $column)
- {
- return $this->generatableColumn('bigint', $column);
- }
-
- /**
- * Create the column definition for a medium integer type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeMediumInteger(Fluent $column)
- {
- return $this->generatableColumn('integer', $column);
- }
-
- /**
- * Create the column definition for a tiny integer type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeTinyInteger(Fluent $column)
- {
- return $this->generatableColumn('smallint', $column);
- }
-
- /**
- * Create the column definition for a small integer type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeSmallInteger(Fluent $column)
- {
- return $this->generatableColumn('smallint', $column);
- }
-
- /**
- * Create the column definition for a generatable column.
- *
- * @param string $type
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function generatableColumn($type, Fluent $column)
- {
- if (! $column->autoIncrement && is_null($column->generatedAs)) {
- return $type;
- }
-
- if ($column->autoIncrement && is_null($column->generatedAs)) {
- return with([
- 'integer' => 'serial',
- 'bigint' => 'bigserial',
- 'smallint' => 'smallserial',
- ])[$type];
- }
-
- $options = '';
-
- if (! is_bool($column->generatedAs) && ! empty($column->generatedAs)) {
- $options = sprintf(' (%s)', $column->generatedAs);
- }
-
- return sprintf(
- '%s generated %s as identity%s',
- $type,
- $column->always ? 'always' : 'by default',
- $options
- );
- }
-
- /**
- * Create the column definition for a float type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeFloat(Fluent $column)
- {
- return $this->typeDouble($column);
- }
-
- /**
- * Create the column definition for a double type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeDouble(Fluent $column)
- {
- return 'double precision';
- }
-
- /**
- * Create the column definition for a real type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeReal(Fluent $column)
- {
- return 'real';
- }
-
- /**
- * Create the column definition for a decimal type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeDecimal(Fluent $column)
- {
- return "decimal({$column->total}, {$column->places})";
- }
-
- /**
- * Create the column definition for a boolean type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeBoolean(Fluent $column)
- {
- return 'boolean';
- }
-
- /**
- * Create the column definition for an enumeration type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeEnum(Fluent $column)
- {
- return sprintf(
- 'varchar(255) check ("%s" in (%s))',
- $column->name,
- $this->quoteString($column->allowed)
- );
- }
-
- /**
- * Create the column definition for a json type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeJson(Fluent $column)
- {
- return 'json';
- }
-
- /**
- * Create the column definition for a jsonb type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeJsonb(Fluent $column)
- {
- return 'jsonb';
- }
-
- /**
- * Create the column definition for a date type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeDate(Fluent $column)
- {
- return 'date';
- }
-
- /**
- * Create the column definition for a date-time type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeDateTime(Fluent $column)
- {
- return "timestamp($column->precision) without time zone";
- }
-
- /**
- * Create the column definition for a date-time (with time zone) type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeDateTimeTz(Fluent $column)
- {
- return "timestamp($column->precision) with time zone";
- }
-
- /**
- * Create the column definition for a time type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeTime(Fluent $column)
- {
- return "time($column->precision) without time zone";
- }
-
- /**
- * Create the column definition for a time (with time zone) type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeTimeTz(Fluent $column)
- {
- return "time($column->precision) with time zone";
- }
-
- /**
- * Create the column definition for a timestamp type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeTimestamp(Fluent $column)
- {
- $columnType = "timestamp($column->precision) without time zone";
-
- return $column->useCurrent ? "$columnType default CURRENT_TIMESTAMP" : $columnType;
- }
-
- /**
- * Create the column definition for a timestamp (with time zone) type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeTimestampTz(Fluent $column)
- {
- $columnType = "timestamp($column->precision) with time zone";
-
- return $column->useCurrent ? "$columnType default CURRENT_TIMESTAMP" : $columnType;
- }
-
- /**
- * Create the column definition for a year type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeYear(Fluent $column)
- {
- return $this->typeInteger($column);
- }
-
- /**
- * Create the column definition for a binary type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeBinary(Fluent $column)
- {
- return 'bytea';
- }
-
- /**
- * Create the column definition for a uuid type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeUuid(Fluent $column)
- {
- return 'uuid';
- }
-
- /**
- * Create the column definition for an IP address type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeIpAddress(Fluent $column)
- {
- return 'inet';
- }
-
- /**
- * Create the column definition for a MAC address type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeMacAddress(Fluent $column)
- {
- return 'macaddr';
- }
-
- /**
- * Create the column definition for a spatial Geometry type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeGeometry(Fluent $column)
- {
- return $this->formatPostGisType('geometry');
- }
-
- /**
- * Create the column definition for a spatial Point type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typePoint(Fluent $column)
- {
- return $this->formatPostGisType('point');
- }
-
- /**
- * Create the column definition for a spatial LineString type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeLineString(Fluent $column)
- {
- return $this->formatPostGisType('linestring');
- }
-
- /**
- * Create the column definition for a spatial Polygon type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typePolygon(Fluent $column)
- {
- return $this->formatPostGisType('polygon');
- }
-
- /**
- * Create the column definition for a spatial GeometryCollection type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeGeometryCollection(Fluent $column)
- {
- return $this->formatPostGisType('geometrycollection');
- }
-
- /**
- * Create the column definition for a spatial MultiPoint type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeMultiPoint(Fluent $column)
- {
- return $this->formatPostGisType('multipoint');
- }
-
- /**
- * Create the column definition for a spatial MultiLineString type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- public function typeMultiLineString(Fluent $column)
- {
- return $this->formatPostGisType('multilinestring');
- }
-
- /**
- * Create the column definition for a spatial MultiPolygon type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeMultiPolygon(Fluent $column)
- {
- return $this->formatPostGisType('multipolygon');
- }
-
- /**
- * Format the column definition for a PostGIS spatial type.
- *
- * @param string $type
- * @return string
- */
- private function formatPostGisType(string $type)
- {
- return "geography($type, 4326)";
- }
-
- /**
- * Get the SQL for a nullable column modifier.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $column
- * @return string|null
- */
- protected function modifyNullable(Blueprint $blueprint, Fluent $column)
- {
- return $column->nullable ? ' null' : ' not null';
- }
-
- /**
- * Get the SQL for a default column modifier.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $column
- * @return string|null
- */
- protected function modifyDefault(Blueprint $blueprint, Fluent $column)
- {
- if (! is_null($column->default)) {
- return ' default '.$this->getDefaultValue($column->default);
- }
- }
-
- /**
- * Get the SQL for an auto-increment column modifier.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $column
- * @return string|null
- */
- protected function modifyIncrement(Blueprint $blueprint, Fluent $column)
- {
- if ((in_array($column->type, $this->serials) || ($column->generatedAs !== null)) && $column->autoIncrement) {
- return ' primary key';
- }
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/RenameColumn.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/RenameColumn.php
deleted file mode 100644
index a07c4fe..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/RenameColumn.php
+++ /dev/null
@@ -1,69 +0,0 @@
-getDoctrineColumn(
- $grammar->getTablePrefix().$blueprint->getTable(), $command->from
- );
-
- $schema = $connection->getDoctrineSchemaManager();
-
- return (array) $schema->getDatabasePlatform()->getAlterTableSQL(static::getRenamedDiff(
- $grammar, $blueprint, $command, $column, $schema
- ));
- }
-
- /**
- * Get a new column instance with the new column name.
- *
- * @param \Illuminate\Database\Schema\Grammars\Grammar $grammar
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @param \Doctrine\DBAL\Schema\Column $column
- * @param \Doctrine\DBAL\Schema\AbstractSchemaManager $schema
- * @return \Doctrine\DBAL\Schema\TableDiff
- */
- protected static function getRenamedDiff(Grammar $grammar, Blueprint $blueprint, Fluent $command, Column $column, SchemaManager $schema)
- {
- return static::setRenamedColumns(
- $grammar->getDoctrineTableDiff($blueprint, $schema), $command, $column
- );
- }
-
- /**
- * Set the renamed columns on the table diff.
- *
- * @param \Doctrine\DBAL\Schema\TableDiff $tableDiff
- * @param \Illuminate\Support\Fluent $command
- * @param \Doctrine\DBAL\Schema\Column $column
- * @return \Doctrine\DBAL\Schema\TableDiff
- */
- protected static function setRenamedColumns(TableDiff $tableDiff, Fluent $command, Column $column)
- {
- $tableDiff->renamedColumns = [
- $command->from => new Column($command->to, $column->getType(), $column->toArray()),
- ];
-
- return $tableDiff;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php
deleted file mode 100755
index d6ef59d..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php
+++ /dev/null
@@ -1,860 +0,0 @@
-wrap(str_replace('.', '__', $table)).')';
- }
-
- /**
- * Compile a create table command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileCreate(Blueprint $blueprint, Fluent $command)
- {
- return sprintf('%s table %s (%s%s%s)',
- $blueprint->temporary ? 'create temporary' : 'create',
- $this->wrapTable($blueprint),
- implode(', ', $this->getColumns($blueprint)),
- (string) $this->addForeignKeys($blueprint),
- (string) $this->addPrimaryKeys($blueprint)
- );
- }
-
- /**
- * Get the foreign key syntax for a table creation statement.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @return string|null
- */
- protected function addForeignKeys(Blueprint $blueprint)
- {
- $foreigns = $this->getCommandsByName($blueprint, 'foreign');
-
- return collect($foreigns)->reduce(function ($sql, $foreign) {
- // Once we have all the foreign key commands for the table creation statement
- // we'll loop through each of them and add them to the create table SQL we
- // are building, since SQLite needs foreign keys on the tables creation.
- $sql .= $this->getForeignKey($foreign);
-
- if (! is_null($foreign->onDelete)) {
- $sql .= " on delete {$foreign->onDelete}";
- }
-
- // If this foreign key specifies the action to be taken on update we will add
- // that to the statement here. We'll append it to this SQL and then return
- // the SQL so we can keep adding any other foreign constraints onto this.
- if (! is_null($foreign->onUpdate)) {
- $sql .= " on update {$foreign->onUpdate}";
- }
-
- return $sql;
- }, '');
- }
-
- /**
- * Get the SQL for the foreign key.
- *
- * @param \Illuminate\Support\Fluent $foreign
- * @return string
- */
- protected function getForeignKey($foreign)
- {
- // We need to columnize the columns that the foreign key is being defined for
- // so that it is a properly formatted list. Once we have done this, we can
- // return the foreign key SQL declaration to the calling method for use.
- return sprintf(', foreign key(%s) references %s(%s)',
- $this->columnize($foreign->columns),
- $this->wrapTable($foreign->on),
- $this->columnize((array) $foreign->references)
- );
- }
-
- /**
- * Get the primary key syntax for a table creation statement.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @return string|null
- */
- protected function addPrimaryKeys(Blueprint $blueprint)
- {
- if (! is_null($primary = $this->getCommandByName($blueprint, 'primary'))) {
- return ", primary key ({$this->columnize($primary->columns)})";
- }
- }
-
- /**
- * Compile alter table commands for adding columns.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return array
- */
- public function compileAdd(Blueprint $blueprint, Fluent $command)
- {
- $columns = $this->prefixArray('add column', $this->getColumns($blueprint));
-
- return collect($columns)->map(function ($column) use ($blueprint) {
- return 'alter table '.$this->wrapTable($blueprint).' '.$column;
- })->all();
- }
-
- /**
- * Compile a unique key command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileUnique(Blueprint $blueprint, Fluent $command)
- {
- return sprintf('create unique index %s on %s (%s)',
- $this->wrap($command->index),
- $this->wrapTable($blueprint),
- $this->columnize($command->columns)
- );
- }
-
- /**
- * Compile a plain index key command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileIndex(Blueprint $blueprint, Fluent $command)
- {
- return sprintf('create index %s on %s (%s)',
- $this->wrap($command->index),
- $this->wrapTable($blueprint),
- $this->columnize($command->columns)
- );
- }
-
- /**
- * Compile a spatial index key command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- *
- * @throws \RuntimeException
- */
- public function compileSpatialIndex(Blueprint $blueprint, Fluent $command)
- {
- throw new RuntimeException('The database driver in use does not support spatial indexes.');
- }
-
- /**
- * Compile a foreign key command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileForeign(Blueprint $blueprint, Fluent $command)
- {
- // Handled on table creation...
- }
-
- /**
- * Compile a drop table command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileDrop(Blueprint $blueprint, Fluent $command)
- {
- return 'drop table '.$this->wrapTable($blueprint);
- }
-
- /**
- * Compile a drop table (if exists) command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileDropIfExists(Blueprint $blueprint, Fluent $command)
- {
- return 'drop table if exists '.$this->wrapTable($blueprint);
- }
-
- /**
- * Compile the SQL needed to drop all tables.
- *
- * @return string
- */
- public function compileDropAllTables()
- {
- return "delete from sqlite_master where type in ('table', 'index', 'trigger')";
- }
-
- /**
- * Compile the SQL needed to drop all views.
- *
- * @return string
- */
- public function compileDropAllViews()
- {
- return "delete from sqlite_master where type in ('view')";
- }
-
- /**
- * Compile the SQL needed to rebuild the database.
- *
- * @return string
- */
- public function compileRebuild()
- {
- return 'vacuum';
- }
-
- /**
- * Compile a drop column command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @param \Illuminate\Database\Connection $connection
- * @return array
- */
- public function compileDropColumn(Blueprint $blueprint, Fluent $command, Connection $connection)
- {
- $tableDiff = $this->getDoctrineTableDiff(
- $blueprint, $schema = $connection->getDoctrineSchemaManager()
- );
-
- foreach ($command->columns as $name) {
- $tableDiff->removedColumns[$name] = $connection->getDoctrineColumn(
- $this->getTablePrefix().$blueprint->getTable(), $name
- );
- }
-
- return (array) $schema->getDatabasePlatform()->getAlterTableSQL($tableDiff);
- }
-
- /**
- * Compile a drop unique key command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileDropUnique(Blueprint $blueprint, Fluent $command)
- {
- $index = $this->wrap($command->index);
-
- return "drop index {$index}";
- }
-
- /**
- * Compile a drop index command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileDropIndex(Blueprint $blueprint, Fluent $command)
- {
- $index = $this->wrap($command->index);
-
- return "drop index {$index}";
- }
-
- /**
- * Compile a drop spatial index command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- *
- * @throws \RuntimeException
- */
- public function compileDropSpatialIndex(Blueprint $blueprint, Fluent $command)
- {
- throw new RuntimeException('The database driver in use does not support spatial indexes.');
- }
-
- /**
- * Compile a rename table command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileRename(Blueprint $blueprint, Fluent $command)
- {
- $from = $this->wrapTable($blueprint);
-
- return "alter table {$from} rename to ".$this->wrapTable($command->to);
- }
-
- /**
- * Compile a rename index command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @param \Illuminate\Database\Connection $connection
- * @return array
- */
- public function compileRenameIndex(Blueprint $blueprint, Fluent $command, Connection $connection)
- {
- $schemaManager = $connection->getDoctrineSchemaManager();
-
- $indexes = $schemaManager->listTableIndexes($this->getTablePrefix().$blueprint->getTable());
-
- $index = Arr::get($indexes, $command->from);
-
- if (! $index) {
- throw new RuntimeException("Index [{$command->from}] does not exist.");
- }
-
- $newIndex = new Index(
- $command->to, $index->getColumns(), $index->isUnique(),
- $index->isPrimary(), $index->getFlags(), $index->getOptions()
- );
-
- $platform = $schemaManager->getDatabasePlatform();
-
- return [
- $platform->getDropIndexSQL($command->from, $this->getTablePrefix().$blueprint->getTable()),
- $platform->getCreateIndexSQL($newIndex, $this->getTablePrefix().$blueprint->getTable()),
- ];
- }
-
- /**
- * Compile the command to enable foreign key constraints.
- *
- * @return string
- */
- public function compileEnableForeignKeyConstraints()
- {
- return 'PRAGMA foreign_keys = ON;';
- }
-
- /**
- * Compile the command to disable foreign key constraints.
- *
- * @return string
- */
- public function compileDisableForeignKeyConstraints()
- {
- return 'PRAGMA foreign_keys = OFF;';
- }
-
- /**
- * Compile the SQL needed to enable a writable schema.
- *
- * @return string
- */
- public function compileEnableWriteableSchema()
- {
- return 'PRAGMA writable_schema = 1;';
- }
-
- /**
- * Compile the SQL needed to disable a writable schema.
- *
- * @return string
- */
- public function compileDisableWriteableSchema()
- {
- return 'PRAGMA writable_schema = 0;';
- }
-
- /**
- * Create the column definition for a char type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeChar(Fluent $column)
- {
- return 'varchar';
- }
-
- /**
- * Create the column definition for a string type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeString(Fluent $column)
- {
- return 'varchar';
- }
-
- /**
- * Create the column definition for a text type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeText(Fluent $column)
- {
- return 'text';
- }
-
- /**
- * Create the column definition for a medium text type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeMediumText(Fluent $column)
- {
- return 'text';
- }
-
- /**
- * Create the column definition for a long text type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeLongText(Fluent $column)
- {
- return 'text';
- }
-
- /**
- * Create the column definition for a integer type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeInteger(Fluent $column)
- {
- return 'integer';
- }
-
- /**
- * Create the column definition for a big integer type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeBigInteger(Fluent $column)
- {
- return 'integer';
- }
-
- /**
- * Create the column definition for a medium integer type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeMediumInteger(Fluent $column)
- {
- return 'integer';
- }
-
- /**
- * Create the column definition for a tiny integer type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeTinyInteger(Fluent $column)
- {
- return 'integer';
- }
-
- /**
- * Create the column definition for a small integer type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeSmallInteger(Fluent $column)
- {
- return 'integer';
- }
-
- /**
- * Create the column definition for a float type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeFloat(Fluent $column)
- {
- return 'float';
- }
-
- /**
- * Create the column definition for a double type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeDouble(Fluent $column)
- {
- return 'float';
- }
-
- /**
- * Create the column definition for a decimal type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeDecimal(Fluent $column)
- {
- return 'numeric';
- }
-
- /**
- * Create the column definition for a boolean type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeBoolean(Fluent $column)
- {
- return 'tinyint(1)';
- }
-
- /**
- * Create the column definition for an enumeration type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeEnum(Fluent $column)
- {
- return sprintf(
- 'varchar check ("%s" in (%s))',
- $column->name,
- $this->quoteString($column->allowed)
- );
- }
-
- /**
- * Create the column definition for a json type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeJson(Fluent $column)
- {
- return 'text';
- }
-
- /**
- * Create the column definition for a jsonb type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeJsonb(Fluent $column)
- {
- return 'text';
- }
-
- /**
- * Create the column definition for a date type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeDate(Fluent $column)
- {
- return 'date';
- }
-
- /**
- * Create the column definition for a date-time type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeDateTime(Fluent $column)
- {
- return 'datetime';
- }
-
- /**
- * Create the column definition for a date-time (with time zone) type.
- *
- * Note: "SQLite does not have a storage class set aside for storing dates and/or times."
- * @link https://www.sqlite.org/datatype3.html
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeDateTimeTz(Fluent $column)
- {
- return $this->typeDateTime($column);
- }
-
- /**
- * Create the column definition for a time type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeTime(Fluent $column)
- {
- return 'time';
- }
-
- /**
- * Create the column definition for a time (with time zone) type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeTimeTz(Fluent $column)
- {
- return $this->typeTime($column);
- }
-
- /**
- * Create the column definition for a timestamp type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeTimestamp(Fluent $column)
- {
- return $column->useCurrent ? 'datetime default CURRENT_TIMESTAMP' : 'datetime';
- }
-
- /**
- * Create the column definition for a timestamp (with time zone) type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeTimestampTz(Fluent $column)
- {
- return $this->typeTimestamp($column);
- }
-
- /**
- * Create the column definition for a year type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeYear(Fluent $column)
- {
- return $this->typeInteger($column);
- }
-
- /**
- * Create the column definition for a binary type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeBinary(Fluent $column)
- {
- return 'blob';
- }
-
- /**
- * Create the column definition for a uuid type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeUuid(Fluent $column)
- {
- return 'varchar';
- }
-
- /**
- * Create the column definition for an IP address type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeIpAddress(Fluent $column)
- {
- return 'varchar';
- }
-
- /**
- * Create the column definition for a MAC address type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeMacAddress(Fluent $column)
- {
- return 'varchar';
- }
-
- /**
- * Create the column definition for a spatial Geometry type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- public function typeGeometry(Fluent $column)
- {
- return 'geometry';
- }
-
- /**
- * Create the column definition for a spatial Point type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- public function typePoint(Fluent $column)
- {
- return 'point';
- }
-
- /**
- * Create the column definition for a spatial LineString type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- public function typeLineString(Fluent $column)
- {
- return 'linestring';
- }
-
- /**
- * Create the column definition for a spatial Polygon type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- public function typePolygon(Fluent $column)
- {
- return 'polygon';
- }
-
- /**
- * Create the column definition for a spatial GeometryCollection type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- public function typeGeometryCollection(Fluent $column)
- {
- return 'geometrycollection';
- }
-
- /**
- * Create the column definition for a spatial MultiPoint type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- public function typeMultiPoint(Fluent $column)
- {
- return 'multipoint';
- }
-
- /**
- * Create the column definition for a spatial MultiLineString type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- public function typeMultiLineString(Fluent $column)
- {
- return 'multilinestring';
- }
-
- /**
- * Create the column definition for a spatial MultiPolygon type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- public function typeMultiPolygon(Fluent $column)
- {
- return 'multipolygon';
- }
-
- /**
- * Get the SQL for a nullable column modifier.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $column
- * @return string|null
- */
- protected function modifyNullable(Blueprint $blueprint, Fluent $column)
- {
- return $column->nullable ? ' null' : ' not null';
- }
-
- /**
- * Get the SQL for a default column modifier.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $column
- * @return string|null
- */
- protected function modifyDefault(Blueprint $blueprint, Fluent $column)
- {
- if (! is_null($column->default)) {
- return ' default '.$this->getDefaultValue($column->default);
- }
- }
-
- /**
- * Get the SQL for an auto-increment column modifier.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $column
- * @return string|null
- */
- protected function modifyIncrement(Blueprint $blueprint, Fluent $column)
- {
- if (in_array($column->type, $this->serials) && $column->autoIncrement) {
- return ' primary key autoincrement';
- }
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php
deleted file mode 100755
index 38f55fc..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php
+++ /dev/null
@@ -1,804 +0,0 @@
-getColumns($blueprint));
-
- return 'create table '.$this->wrapTable($blueprint)." ($columns)";
- }
-
- /**
- * Compile a column addition table command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileAdd(Blueprint $blueprint, Fluent $command)
- {
- return sprintf('alter table %s add %s',
- $this->wrapTable($blueprint),
- implode(', ', $this->getColumns($blueprint))
- );
- }
-
- /**
- * Compile a primary key command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compilePrimary(Blueprint $blueprint, Fluent $command)
- {
- return sprintf('alter table %s add constraint %s primary key (%s)',
- $this->wrapTable($blueprint),
- $this->wrap($command->index),
- $this->columnize($command->columns)
- );
- }
-
- /**
- * Compile a unique key command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileUnique(Blueprint $blueprint, Fluent $command)
- {
- return sprintf('create unique index %s on %s (%s)',
- $this->wrap($command->index),
- $this->wrapTable($blueprint),
- $this->columnize($command->columns)
- );
- }
-
- /**
- * Compile a plain index key command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileIndex(Blueprint $blueprint, Fluent $command)
- {
- return sprintf('create index %s on %s (%s)',
- $this->wrap($command->index),
- $this->wrapTable($blueprint),
- $this->columnize($command->columns)
- );
- }
-
- /**
- * Compile a spatial index key command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileSpatialIndex(Blueprint $blueprint, Fluent $command)
- {
- return sprintf('create spatial index %s on %s (%s)',
- $this->wrap($command->index),
- $this->wrapTable($blueprint),
- $this->columnize($command->columns)
- );
- }
-
- /**
- * Compile a drop table command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileDrop(Blueprint $blueprint, Fluent $command)
- {
- return 'drop table '.$this->wrapTable($blueprint);
- }
-
- /**
- * Compile a drop table (if exists) command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileDropIfExists(Blueprint $blueprint, Fluent $command)
- {
- return sprintf('if exists (select * from INFORMATION_SCHEMA.TABLES where TABLE_NAME = %s) drop table %s',
- "'".str_replace("'", "''", $this->getTablePrefix().$blueprint->getTable())."'",
- $this->wrapTable($blueprint)
- );
- }
-
- /**
- * Compile the SQL needed to drop all tables.
- *
- * @return string
- */
- public function compileDropAllTables()
- {
- return "EXEC sp_msforeachtable 'DROP TABLE ?'";
- }
-
- /**
- * Compile a drop column command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileDropColumn(Blueprint $blueprint, Fluent $command)
- {
- $columns = $this->wrapArray($command->columns);
-
- return 'alter table '.$this->wrapTable($blueprint).' drop column '.implode(', ', $columns);
- }
-
- /**
- * Compile a drop primary key command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileDropPrimary(Blueprint $blueprint, Fluent $command)
- {
- $index = $this->wrap($command->index);
-
- return "alter table {$this->wrapTable($blueprint)} drop constraint {$index}";
- }
-
- /**
- * Compile a drop unique key command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileDropUnique(Blueprint $blueprint, Fluent $command)
- {
- $index = $this->wrap($command->index);
-
- return "drop index {$index} on {$this->wrapTable($blueprint)}";
- }
-
- /**
- * Compile a drop index command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileDropIndex(Blueprint $blueprint, Fluent $command)
- {
- $index = $this->wrap($command->index);
-
- return "drop index {$index} on {$this->wrapTable($blueprint)}";
- }
-
- /**
- * Compile a drop spatial index command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileDropSpatialIndex(Blueprint $blueprint, Fluent $command)
- {
- return $this->compileDropIndex($blueprint, $command);
- }
-
- /**
- * Compile a drop foreign key command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileDropForeign(Blueprint $blueprint, Fluent $command)
- {
- $index = $this->wrap($command->index);
-
- return "alter table {$this->wrapTable($blueprint)} drop constraint {$index}";
- }
-
- /**
- * Compile a rename table command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileRename(Blueprint $blueprint, Fluent $command)
- {
- $from = $this->wrapTable($blueprint);
-
- return "sp_rename {$from}, ".$this->wrapTable($command->to);
- }
-
- /**
- * Compile a rename index command.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $command
- * @return string
- */
- public function compileRenameIndex(Blueprint $blueprint, Fluent $command)
- {
- return sprintf("sp_rename N'%s', %s, N'INDEX'",
- $this->wrap($blueprint->getTable().'.'.$command->from),
- $this->wrap($command->to)
- );
- }
-
- /**
- * Compile the command to enable foreign key constraints.
- *
- * @return string
- */
- public function compileEnableForeignKeyConstraints()
- {
- return 'EXEC sp_msforeachtable @command1="print \'?\'", @command2="ALTER TABLE ? WITH CHECK CHECK CONSTRAINT all";';
- }
-
- /**
- * Compile the command to disable foreign key constraints.
- *
- * @return string
- */
- public function compileDisableForeignKeyConstraints()
- {
- return 'EXEC sp_msforeachtable "ALTER TABLE ? NOCHECK CONSTRAINT all";';
- }
-
- /**
- * Create the column definition for a char type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeChar(Fluent $column)
- {
- return "nchar({$column->length})";
- }
-
- /**
- * Create the column definition for a string type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeString(Fluent $column)
- {
- return "nvarchar({$column->length})";
- }
-
- /**
- * Create the column definition for a text type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeText(Fluent $column)
- {
- return 'nvarchar(max)';
- }
-
- /**
- * Create the column definition for a medium text type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeMediumText(Fluent $column)
- {
- return 'nvarchar(max)';
- }
-
- /**
- * Create the column definition for a long text type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeLongText(Fluent $column)
- {
- return 'nvarchar(max)';
- }
-
- /**
- * Create the column definition for an integer type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeInteger(Fluent $column)
- {
- return 'int';
- }
-
- /**
- * Create the column definition for a big integer type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeBigInteger(Fluent $column)
- {
- return 'bigint';
- }
-
- /**
- * Create the column definition for a medium integer type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeMediumInteger(Fluent $column)
- {
- return 'int';
- }
-
- /**
- * Create the column definition for a tiny integer type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeTinyInteger(Fluent $column)
- {
- return 'tinyint';
- }
-
- /**
- * Create the column definition for a small integer type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeSmallInteger(Fluent $column)
- {
- return 'smallint';
- }
-
- /**
- * Create the column definition for a float type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeFloat(Fluent $column)
- {
- return 'float';
- }
-
- /**
- * Create the column definition for a double type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeDouble(Fluent $column)
- {
- return 'float';
- }
-
- /**
- * Create the column definition for a decimal type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeDecimal(Fluent $column)
- {
- return "decimal({$column->total}, {$column->places})";
- }
-
- /**
- * Create the column definition for a boolean type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeBoolean(Fluent $column)
- {
- return 'bit';
- }
-
- /**
- * Create the column definition for an enumeration type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeEnum(Fluent $column)
- {
- return sprintf(
- 'nvarchar(255) check ("%s" in (%s))',
- $column->name,
- $this->quoteString($column->allowed)
- );
- }
-
- /**
- * Create the column definition for a json type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeJson(Fluent $column)
- {
- return 'nvarchar(max)';
- }
-
- /**
- * Create the column definition for a jsonb type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeJsonb(Fluent $column)
- {
- return 'nvarchar(max)';
- }
-
- /**
- * Create the column definition for a date type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeDate(Fluent $column)
- {
- return 'date';
- }
-
- /**
- * Create the column definition for a date-time type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeDateTime(Fluent $column)
- {
- return $column->precision ? "datetime2($column->precision)" : 'datetime';
- }
-
- /**
- * Create the column definition for a date-time (with time zone) type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeDateTimeTz(Fluent $column)
- {
- return $column->precision ? "datetimeoffset($column->precision)" : 'datetimeoffset';
- }
-
- /**
- * Create the column definition for a time type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeTime(Fluent $column)
- {
- return $column->precision ? "time($column->precision)" : 'time';
- }
-
- /**
- * Create the column definition for a time (with time zone) type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeTimeTz(Fluent $column)
- {
- return $this->typeTime($column);
- }
-
- /**
- * Create the column definition for a timestamp type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeTimestamp(Fluent $column)
- {
- $columnType = $column->precision ? "datetime2($column->precision)" : 'datetime';
-
- return $column->useCurrent ? "$columnType default CURRENT_TIMESTAMP" : $columnType;
- }
-
- /**
- * Create the column definition for a timestamp (with time zone) type.
- *
- * @link https://msdn.microsoft.com/en-us/library/bb630289(v=sql.120).aspx
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeTimestampTz(Fluent $column)
- {
- if ($column->useCurrent) {
- $columnType = $column->precision ? "datetimeoffset($column->precision)" : 'datetimeoffset';
-
- return "$columnType default CURRENT_TIMESTAMP";
- }
-
- return "datetimeoffset($column->precision)";
- }
-
- /**
- * Create the column definition for a year type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeYear(Fluent $column)
- {
- return $this->typeInteger($column);
- }
-
- /**
- * Create the column definition for a binary type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeBinary(Fluent $column)
- {
- return 'varbinary(max)';
- }
-
- /**
- * Create the column definition for a uuid type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeUuid(Fluent $column)
- {
- return 'uniqueidentifier';
- }
-
- /**
- * Create the column definition for an IP address type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeIpAddress(Fluent $column)
- {
- return 'nvarchar(45)';
- }
-
- /**
- * Create the column definition for a MAC address type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- protected function typeMacAddress(Fluent $column)
- {
- return 'nvarchar(17)';
- }
-
- /**
- * Create the column definition for a spatial Geometry type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- public function typeGeometry(Fluent $column)
- {
- return 'geography';
- }
-
- /**
- * Create the column definition for a spatial Point type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- public function typePoint(Fluent $column)
- {
- return 'geography';
- }
-
- /**
- * Create the column definition for a spatial LineString type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- public function typeLineString(Fluent $column)
- {
- return 'geography';
- }
-
- /**
- * Create the column definition for a spatial Polygon type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- public function typePolygon(Fluent $column)
- {
- return 'geography';
- }
-
- /**
- * Create the column definition for a spatial GeometryCollection type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- public function typeGeometryCollection(Fluent $column)
- {
- return 'geography';
- }
-
- /**
- * Create the column definition for a spatial MultiPoint type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- public function typeMultiPoint(Fluent $column)
- {
- return 'geography';
- }
-
- /**
- * Create the column definition for a spatial MultiLineString type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- public function typeMultiLineString(Fluent $column)
- {
- return 'geography';
- }
-
- /**
- * Create the column definition for a spatial MultiPolygon type.
- *
- * @param \Illuminate\Support\Fluent $column
- * @return string
- */
- public function typeMultiPolygon(Fluent $column)
- {
- return 'geography';
- }
-
- /**
- * Get the SQL for a collation column modifier.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $column
- * @return string|null
- */
- protected function modifyCollate(Blueprint $blueprint, Fluent $column)
- {
- if (! is_null($column->collation)) {
- return ' collate '.$column->collation;
- }
- }
-
- /**
- * Get the SQL for a nullable column modifier.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $column
- * @return string|null
- */
- protected function modifyNullable(Blueprint $blueprint, Fluent $column)
- {
- return $column->nullable ? ' null' : ' not null';
- }
-
- /**
- * Get the SQL for a default column modifier.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $column
- * @return string|null
- */
- protected function modifyDefault(Blueprint $blueprint, Fluent $column)
- {
- if (! is_null($column->default)) {
- return ' default '.$this->getDefaultValue($column->default);
- }
- }
-
- /**
- * Get the SQL for an auto-increment column modifier.
- *
- * @param \Illuminate\Database\Schema\Blueprint $blueprint
- * @param \Illuminate\Support\Fluent $column
- * @return string|null
- */
- protected function modifyIncrement(Blueprint $blueprint, Fluent $column)
- {
- if (in_array($column->type, $this->serials) && $column->autoIncrement) {
- return ' identity primary key';
- }
- }
-
- /**
- * Wrap a table in keyword identifiers.
- *
- * @param \Illuminate\Database\Query\Expression|string $table
- * @return string
- */
- public function wrapTable($table)
- {
- if ($table instanceof Blueprint && $table->temporary) {
- $this->setTablePrefix('#');
- }
-
- return parent::wrapTable($table);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php
deleted file mode 100755
index 85f3e92..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php
+++ /dev/null
@@ -1,114 +0,0 @@
-connection->getTablePrefix().$table;
-
- return count($this->connection->select(
- $this->grammar->compileTableExists(), [$this->connection->getDatabaseName(), $table]
- )) > 0;
- }
-
- /**
- * Get the column listing for a given table.
- *
- * @param string $table
- * @return array
- */
- public function getColumnListing($table)
- {
- $table = $this->connection->getTablePrefix().$table;
-
- $results = $this->connection->select(
- $this->grammar->compileColumnListing(), [$this->connection->getDatabaseName(), $table]
- );
-
- return $this->connection->getPostProcessor()->processColumnListing($results);
- }
-
- /**
- * Drop all tables from the database.
- *
- * @return void
- */
- public function dropAllTables()
- {
- $tables = [];
-
- foreach ($this->getAllTables() as $row) {
- $row = (array) $row;
-
- $tables[] = reset($row);
- }
-
- if (empty($tables)) {
- return;
- }
-
- $this->disableForeignKeyConstraints();
-
- $this->connection->statement(
- $this->grammar->compileDropAllTables($tables)
- );
-
- $this->enableForeignKeyConstraints();
- }
-
- /**
- * Drop all views from the database.
- *
- * @return void
- */
- public function dropAllViews()
- {
- $views = [];
-
- foreach ($this->getAllViews() as $row) {
- $row = (array) $row;
-
- $views[] = reset($row);
- }
-
- if (empty($views)) {
- return;
- }
-
- $this->connection->statement(
- $this->grammar->compileDropAllViews($views)
- );
- }
-
- /**
- * Get all of the table names for the database.
- *
- * @return array
- */
- protected function getAllTables()
- {
- return $this->connection->select(
- $this->grammar->compileGetAllTables()
- );
- }
-
- /**
- * Get all of the view names for the database.
- *
- * @return array
- */
- protected function getAllViews()
- {
- return $this->connection->select(
- $this->grammar->compileGetAllViews()
- );
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/PostgresBuilder.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/PostgresBuilder.php
deleted file mode 100755
index bdeb972..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Schema/PostgresBuilder.php
+++ /dev/null
@@ -1,141 +0,0 @@
-parseSchemaAndTable($table);
-
- $table = $this->connection->getTablePrefix().$table;
-
- return count($this->connection->select(
- $this->grammar->compileTableExists(), [$schema, $table]
- )) > 0;
- }
-
- /**
- * Drop all tables from the database.
- *
- * @return void
- */
- public function dropAllTables()
- {
- $tables = [];
-
- $excludedTables = ['spatial_ref_sys'];
-
- foreach ($this->getAllTables() as $row) {
- $row = (array) $row;
-
- $table = reset($row);
-
- if (! in_array($table, $excludedTables)) {
- $tables[] = $table;
- }
- }
-
- if (empty($tables)) {
- return;
- }
-
- $this->connection->statement(
- $this->grammar->compileDropAllTables($tables)
- );
- }
-
- /**
- * Drop all views from the database.
- *
- * @return void
- */
- public function dropAllViews()
- {
- $views = [];
-
- foreach ($this->getAllViews() as $row) {
- $row = (array) $row;
-
- $views[] = reset($row);
- }
-
- if (empty($views)) {
- return;
- }
-
- $this->connection->statement(
- $this->grammar->compileDropAllViews($views)
- );
- }
-
- /**
- * Get all of the table names for the database.
- *
- * @return array
- */
- protected function getAllTables()
- {
- return $this->connection->select(
- $this->grammar->compileGetAllTables($this->connection->getConfig('schema'))
- );
- }
-
- /**
- * Get all of the view names for the database.
- *
- * @return array
- */
- protected function getAllViews()
- {
- return $this->connection->select(
- $this->grammar->compileGetAllViews($this->connection->getConfig('schema'))
- );
- }
-
- /**
- * Get the column listing for a given table.
- *
- * @param string $table
- * @return array
- */
- public function getColumnListing($table)
- {
- [$schema, $table] = $this->parseSchemaAndTable($table);
-
- $table = $this->connection->getTablePrefix().$table;
-
- $results = $this->connection->select(
- $this->grammar->compileColumnListing(), [$schema, $table]
- );
-
- return $this->connection->getPostProcessor()->processColumnListing($results);
- }
-
- /**
- * Parse the table name and extract the schema and table.
- *
- * @param string $table
- * @return array
- */
- protected function parseSchemaAndTable($table)
- {
- $table = explode('.', $table);
-
- if (is_array($schema = $this->connection->getConfig('schema'))) {
- if (in_array($table[0], $schema)) {
- return [array_shift($table), implode('.', $table)];
- }
-
- $schema = head($schema);
- }
-
- return [$schema ?: 'public', implode('.', $table)];
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/SQLiteBuilder.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/SQLiteBuilder.php
deleted file mode 100644
index 78b6b9c..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Schema/SQLiteBuilder.php
+++ /dev/null
@@ -1,52 +0,0 @@
-connection->getDatabaseName() !== ':memory:') {
- return $this->refreshDatabaseFile();
- }
-
- $this->connection->select($this->grammar->compileEnableWriteableSchema());
-
- $this->connection->select($this->grammar->compileDropAllTables());
-
- $this->connection->select($this->grammar->compileDisableWriteableSchema());
-
- $this->connection->select($this->grammar->compileRebuild());
- }
-
- /**
- * Drop all views from the database.
- *
- * @return void
- */
- public function dropAllViews()
- {
- $this->connection->select($this->grammar->compileEnableWriteableSchema());
-
- $this->connection->select($this->grammar->compileDropAllViews());
-
- $this->connection->select($this->grammar->compileDisableWriteableSchema());
-
- $this->connection->select($this->grammar->compileRebuild());
- }
-
- /**
- * Empty the database file.
- *
- * @return void
- */
- public function refreshDatabaseFile()
- {
- file_put_contents($this->connection->getDatabaseName(), '');
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/SqlServerBuilder.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/SqlServerBuilder.php
deleted file mode 100644
index 2c54282..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Schema/SqlServerBuilder.php
+++ /dev/null
@@ -1,20 +0,0 @@
-disableForeignKeyConstraints();
-
- $this->connection->statement($this->grammar->compileDropAllTables());
-
- $this->enableForeignKeyConstraints();
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/Seeder.php b/vendor/laravel/framework/src/Illuminate/Database/Seeder.php
deleted file mode 100755
index f8675ea..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/Seeder.php
+++ /dev/null
@@ -1,125 +0,0 @@
-command)) {
- $this->command->getOutput()->writeln("Seeding: $class");
- }
-
- $this->resolve($class)->__invoke();
- }
-
- return $this;
- }
-
- /**
- * Silently seed the given connection from the given path.
- *
- * @param array|string $class
- * @return void
- */
- public function callSilent($class)
- {
- $this->call($class, true);
- }
-
- /**
- * Resolve an instance of the given seeder class.
- *
- * @param string $class
- * @return \Illuminate\Database\Seeder
- */
- protected function resolve($class)
- {
- if (isset($this->container)) {
- $instance = $this->container->make($class);
-
- $instance->setContainer($this->container);
- } else {
- $instance = new $class;
- }
-
- if (isset($this->command)) {
- $instance->setCommand($this->command);
- }
-
- return $instance;
- }
-
- /**
- * Set the IoC container instance.
- *
- * @param \Illuminate\Container\Container $container
- * @return $this
- */
- public function setContainer(Container $container)
- {
- $this->container = $container;
-
- return $this;
- }
-
- /**
- * Set the console command instance.
- *
- * @param \Illuminate\Console\Command $command
- * @return $this
- */
- public function setCommand(Command $command)
- {
- $this->command = $command;
-
- return $this;
- }
-
- /**
- * Run the database seeds.
- *
- * @return dynamic
- *
- * @throws \InvalidArgumentException
- */
- public function __invoke()
- {
- if (! method_exists($this, 'run')) {
- throw new InvalidArgumentException('Method [run] missing from '.get_class($this));
- }
-
- return isset($this->container)
- ? $this->container->call([$this, 'run'])
- : $this->run();
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/SqlServerConnection.php b/vendor/laravel/framework/src/Illuminate/Database/SqlServerConnection.php
deleted file mode 100755
index db5a0be..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/SqlServerConnection.php
+++ /dev/null
@@ -1,113 +0,0 @@
-getDriverName() === 'sqlsrv') {
- return parent::transaction($callback);
- }
-
- $this->getPdo()->exec('BEGIN TRAN');
-
- // We'll simply execute the given callback within a try / catch block
- // and if we catch any exception we can rollback the transaction
- // so that none of the changes are persisted to the database.
- try {
- $result = $callback($this);
-
- $this->getPdo()->exec('COMMIT TRAN');
- }
-
- // If we catch an exception, we will roll back so nothing gets messed
- // up in the database. Then we'll re-throw the exception so it can
- // be handled how the developer sees fit for their applications.
- catch (Exception $e) {
- $this->getPdo()->exec('ROLLBACK TRAN');
-
- throw $e;
- } catch (Throwable $e) {
- $this->getPdo()->exec('ROLLBACK TRAN');
-
- throw $e;
- }
-
- return $result;
- }
- }
-
- /**
- * Get the default query grammar instance.
- *
- * @return \Illuminate\Database\Query\Grammars\SqlServerGrammar
- */
- protected function getDefaultQueryGrammar()
- {
- return $this->withTablePrefix(new QueryGrammar);
- }
-
- /**
- * Get a schema builder instance for the connection.
- *
- * @return \Illuminate\Database\Schema\SqlServerBuilder
- */
- public function getSchemaBuilder()
- {
- if (is_null($this->schemaGrammar)) {
- $this->useDefaultSchemaGrammar();
- }
-
- return new SqlServerBuilder($this);
- }
-
- /**
- * Get the default schema grammar instance.
- *
- * @return \Illuminate\Database\Schema\Grammars\SqlServerGrammar
- */
- protected function getDefaultSchemaGrammar()
- {
- return $this->withTablePrefix(new SchemaGrammar);
- }
-
- /**
- * Get the default post processor instance.
- *
- * @return \Illuminate\Database\Query\Processors\SqlServerProcessor
- */
- protected function getDefaultPostProcessor()
- {
- return new SqlServerProcessor;
- }
-
- /**
- * Get the Doctrine DBAL driver.
- *
- * @return \Doctrine\DBAL\Driver\PDOSqlsrv\Driver
- */
- protected function getDoctrineDriver()
- {
- return new DoctrineDriver;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Database/composer.json b/vendor/laravel/framework/src/Illuminate/Database/composer.json
deleted file mode 100644
index 81ef3b4..0000000
--- a/vendor/laravel/framework/src/Illuminate/Database/composer.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
- "name": "illuminate/database",
- "description": "The Illuminate Database package.",
- "license": "MIT",
- "homepage": "https://laravel.com",
- "support": {
- "issues": "https://github.com/laravel/framework/issues",
- "source": "https://github.com/laravel/framework"
- },
- "keywords": ["laravel", "database", "sql", "orm"],
- "authors": [
- {
- "name": "Taylor Otwell",
- "email": "taylor@laravel.com"
- }
- ],
- "require": {
- "php": "^7.1.3",
- "illuminate/container": "5.7.*",
- "illuminate/contracts": "5.7.*",
- "illuminate/support": "5.7.*"
- },
- "autoload": {
- "psr-4": {
- "Illuminate\\Database\\": ""
- }
- },
- "extra": {
- "branch-alias": {
- "dev-master": "5.7-dev"
- }
- },
- "suggest": {
- "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.6).",
- "fzaninotto/faker": "Required to use the eloquent factory builder (^1.4).",
- "illuminate/console": "Required to use the database commands (5.7.*).",
- "illuminate/events": "Required to use the observers with Eloquent (5.7.*).",
- "illuminate/filesystem": "Required to use the migrations (5.7.*).",
- "illuminate/pagination": "Required to paginate the result set (5.7.*)."
- },
- "config": {
- "sort-packages": true
- },
- "minimum-stability": "dev"
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php b/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php
deleted file mode 100755
index d4a1822..0000000
--- a/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php
+++ /dev/null
@@ -1,251 +0,0 @@
-key = $key;
- $this->cipher = $cipher;
- } else {
- throw new RuntimeException('The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths.');
- }
- }
-
- /**
- * Determine if the given key and cipher combination is valid.
- *
- * @param string $key
- * @param string $cipher
- * @return bool
- */
- public static function supported($key, $cipher)
- {
- $length = mb_strlen($key, '8bit');
-
- return ($cipher === 'AES-128-CBC' && $length === 16) ||
- ($cipher === 'AES-256-CBC' && $length === 32);
- }
-
- /**
- * Create a new encryption key for the given cipher.
- *
- * @param string $cipher
- * @return string
- */
- public static function generateKey($cipher)
- {
- return random_bytes($cipher === 'AES-128-CBC' ? 16 : 32);
- }
-
- /**
- * Encrypt the given value.
- *
- * @param mixed $value
- * @param bool $serialize
- * @return string
- *
- * @throws \Illuminate\Contracts\Encryption\EncryptException
- */
- public function encrypt($value, $serialize = true)
- {
- $iv = random_bytes(openssl_cipher_iv_length($this->cipher));
-
- // First we will encrypt the value using OpenSSL. After this is encrypted we
- // will proceed to calculating a MAC for the encrypted value so that this
- // value can be verified later as not having been changed by the users.
- $value = \openssl_encrypt(
- $serialize ? serialize($value) : $value,
- $this->cipher, $this->key, 0, $iv
- );
-
- if ($value === false) {
- throw new EncryptException('Could not encrypt the data.');
- }
-
- // Once we get the encrypted value we'll go ahead and base64_encode the input
- // vector and create the MAC for the encrypted value so we can then verify
- // its authenticity. Then, we'll JSON the data into the "payload" array.
- $mac = $this->hash($iv = base64_encode($iv), $value);
-
- $json = json_encode(compact('iv', 'value', 'mac'));
-
- if (json_last_error() !== JSON_ERROR_NONE) {
- throw new EncryptException('Could not encrypt the data.');
- }
-
- return base64_encode($json);
- }
-
- /**
- * Encrypt a string without serialization.
- *
- * @param string $value
- * @return string
- */
- public function encryptString($value)
- {
- return $this->encrypt($value, false);
- }
-
- /**
- * Decrypt the given value.
- *
- * @param mixed $payload
- * @param bool $unserialize
- * @return mixed
- *
- * @throws \Illuminate\Contracts\Encryption\DecryptException
- */
- public function decrypt($payload, $unserialize = true)
- {
- $payload = $this->getJsonPayload($payload);
-
- $iv = base64_decode($payload['iv']);
-
- // Here we will decrypt the value. If we are able to successfully decrypt it
- // we will then unserialize it and return it out to the caller. If we are
- // unable to decrypt this value we will throw out an exception message.
- $decrypted = \openssl_decrypt(
- $payload['value'], $this->cipher, $this->key, 0, $iv
- );
-
- if ($decrypted === false) {
- throw new DecryptException('Could not decrypt the data.');
- }
-
- return $unserialize ? unserialize($decrypted) : $decrypted;
- }
-
- /**
- * Decrypt the given string without unserialization.
- *
- * @param string $payload
- * @return string
- */
- public function decryptString($payload)
- {
- return $this->decrypt($payload, false);
- }
-
- /**
- * Create a MAC for the given value.
- *
- * @param string $iv
- * @param mixed $value
- * @return string
- */
- protected function hash($iv, $value)
- {
- return hash_hmac('sha256', $iv.$value, $this->key);
- }
-
- /**
- * Get the JSON array from the given payload.
- *
- * @param string $payload
- * @return array
- *
- * @throws \Illuminate\Contracts\Encryption\DecryptException
- */
- protected function getJsonPayload($payload)
- {
- $payload = json_decode(base64_decode($payload), true);
-
- // If the payload is not valid JSON or does not have the proper keys set we will
- // assume it is invalid and bail out of the routine since we will not be able
- // to decrypt the given value. We'll also check the MAC for this encryption.
- if (! $this->validPayload($payload)) {
- throw new DecryptException('The payload is invalid.');
- }
-
- if (! $this->validMac($payload)) {
- throw new DecryptException('The MAC is invalid.');
- }
-
- return $payload;
- }
-
- /**
- * Verify that the encryption payload is valid.
- *
- * @param mixed $payload
- * @return bool
- */
- protected function validPayload($payload)
- {
- return is_array($payload) && isset($payload['iv'], $payload['value'], $payload['mac']) &&
- strlen(base64_decode($payload['iv'], true)) === openssl_cipher_iv_length($this->cipher);
- }
-
- /**
- * Determine if the MAC for the given payload is valid.
- *
- * @param array $payload
- * @return bool
- */
- protected function validMac(array $payload)
- {
- $calculated = $this->calculateMac($payload, $bytes = random_bytes(16));
-
- return hash_equals(
- hash_hmac('sha256', $payload['mac'], $bytes, true), $calculated
- );
- }
-
- /**
- * Calculate the hash of the given payload.
- *
- * @param array $payload
- * @param string $bytes
- * @return string
- */
- protected function calculateMac($payload, $bytes)
- {
- return hash_hmac(
- 'sha256', $this->hash($payload['iv'], $payload['value']), $bytes, true
- );
- }
-
- /**
- * Get the encryption key.
- *
- * @return string
- */
- public function getKey()
- {
- return $this->key;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php
deleted file mode 100755
index ad7b93d..0000000
--- a/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php
+++ /dev/null
@@ -1,50 +0,0 @@
-app->singleton('encrypter', function ($app) {
- $config = $app->make('config')->get('app');
-
- // If the key starts with "base64:", we will need to decode the key before handing
- // it off to the encrypter. Keys may be base-64 encoded for presentation and we
- // want to make sure to convert them back to the raw bytes before encrypting.
- if (Str::startsWith($key = $this->key($config), 'base64:')) {
- $key = base64_decode(substr($key, 7));
- }
-
- return new Encrypter($key, $config['cipher']);
- });
- }
-
- /**
- * Extract the encryption key from the given configuration.
- *
- * @param array $config
- * @return string
- *
- * @throws \RuntimeException
- */
- protected function key(array $config)
- {
- return tap($config['key'], function ($key) {
- if (empty($key)) {
- throw new RuntimeException(
- 'No application encryption key has been specified.'
- );
- }
- });
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Encryption/composer.json b/vendor/laravel/framework/src/Illuminate/Encryption/composer.json
deleted file mode 100644
index 09eb4c7..0000000
--- a/vendor/laravel/framework/src/Illuminate/Encryption/composer.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "name": "illuminate/encryption",
- "description": "The Illuminate Encryption package.",
- "license": "MIT",
- "homepage": "https://laravel.com",
- "support": {
- "issues": "https://github.com/laravel/framework/issues",
- "source": "https://github.com/laravel/framework"
- },
- "authors": [
- {
- "name": "Taylor Otwell",
- "email": "taylor@laravel.com"
- }
- ],
- "require": {
- "php": "^7.1.3",
- "ext-mbstring": "*",
- "ext-openssl": "*",
- "illuminate/contracts": "5.7.*",
- "illuminate/support": "5.7.*"
- },
- "autoload": {
- "psr-4": {
- "Illuminate\\Encryption\\": ""
- }
- },
- "extra": {
- "branch-alias": {
- "dev-master": "5.7-dev"
- }
- },
- "config": {
- "sort-packages": true
- },
- "minimum-stability": "dev"
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Events/CallQueuedListener.php b/vendor/laravel/framework/src/Illuminate/Events/CallQueuedListener.php
deleted file mode 100644
index be0fee3..0000000
--- a/vendor/laravel/framework/src/Illuminate/Events/CallQueuedListener.php
+++ /dev/null
@@ -1,160 +0,0 @@
-data = $data;
- $this->class = $class;
- $this->method = $method;
- }
-
- /**
- * Handle the queued job.
- *
- * @param \Illuminate\Container\Container $container
- * @return void
- */
- public function handle(Container $container)
- {
- $this->prepareData();
-
- $handler = $this->setJobInstanceIfNecessary(
- $this->job, $container->make($this->class)
- );
-
- call_user_func_array(
- [$handler, $this->method], $this->data
- );
- }
-
- /**
- * Set the job instance of the given class if necessary.
- *
- * @param \Illuminate\Contracts\Queue\Job $job
- * @param mixed $instance
- * @return mixed
- */
- protected function setJobInstanceIfNecessary(Job $job, $instance)
- {
- if (in_array(InteractsWithQueue::class, class_uses_recursive($instance))) {
- $instance->setJob($job);
- }
-
- return $instance;
- }
-
- /**
- * Call the failed method on the job instance.
- *
- * The event instance and the exception will be passed.
- *
- * @param \Exception $e
- * @return void
- */
- public function failed($e)
- {
- $this->prepareData();
-
- $handler = Container::getInstance()->make($this->class);
-
- $parameters = array_merge($this->data, [$e]);
-
- if (method_exists($handler, 'failed')) {
- call_user_func_array([$handler, 'failed'], $parameters);
- }
- }
-
- /**
- * Unserialize the data if needed.
- *
- * @return void
- */
- protected function prepareData()
- {
- if (is_string($this->data)) {
- $this->data = unserialize($this->data);
- }
- }
-
- /**
- * Get the display name for the queued job.
- *
- * @return string
- */
- public function displayName()
- {
- return $this->class;
- }
-
- /**
- * Prepare the instance for cloning.
- *
- * @return void
- */
- public function __clone()
- {
- $this->data = array_map(function ($data) {
- return is_object($data) ? clone $data : $data;
- }, $this->data);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php b/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php
deleted file mode 100755
index 8fb73ba..0000000
--- a/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php
+++ /dev/null
@@ -1,573 +0,0 @@
-container = $container ?: new Container;
- }
-
- /**
- * Register an event listener with the dispatcher.
- *
- * @param string|array $events
- * @param mixed $listener
- * @return void
- */
- public function listen($events, $listener)
- {
- foreach ((array) $events as $event) {
- if (Str::contains($event, '*')) {
- $this->setupWildcardListen($event, $listener);
- } else {
- $this->listeners[$event][] = $this->makeListener($listener);
- }
- }
- }
-
- /**
- * Setup a wildcard listener callback.
- *
- * @param string $event
- * @param mixed $listener
- * @return void
- */
- protected function setupWildcardListen($event, $listener)
- {
- $this->wildcards[$event][] = $this->makeListener($listener, true);
-
- $this->wildcardsCache = [];
- }
-
- /**
- * Determine if a given event has listeners.
- *
- * @param string $eventName
- * @return bool
- */
- public function hasListeners($eventName)
- {
- return isset($this->listeners[$eventName]) || isset($this->wildcards[$eventName]);
- }
-
- /**
- * Register an event and payload to be fired later.
- *
- * @param string $event
- * @param array $payload
- * @return void
- */
- public function push($event, $payload = [])
- {
- $this->listen($event.'_pushed', function () use ($event, $payload) {
- $this->dispatch($event, $payload);
- });
- }
-
- /**
- * Flush a set of pushed events.
- *
- * @param string $event
- * @return void
- */
- public function flush($event)
- {
- $this->dispatch($event.'_pushed');
- }
-
- /**
- * Register an event subscriber with the dispatcher.
- *
- * @param object|string $subscriber
- * @return void
- */
- public function subscribe($subscriber)
- {
- $subscriber = $this->resolveSubscriber($subscriber);
-
- $subscriber->subscribe($this);
- }
-
- /**
- * Resolve the subscriber instance.
- *
- * @param object|string $subscriber
- * @return mixed
- */
- protected function resolveSubscriber($subscriber)
- {
- if (is_string($subscriber)) {
- return $this->container->make($subscriber);
- }
-
- return $subscriber;
- }
-
- /**
- * Fire an event until the first non-null response is returned.
- *
- * @param string|object $event
- * @param mixed $payload
- * @return array|null
- */
- public function until($event, $payload = [])
- {
- return $this->dispatch($event, $payload, true);
- }
-
- /**
- * Fire an event and call the listeners.
- *
- * @param string|object $event
- * @param mixed $payload
- * @param bool $halt
- * @return array|null
- */
- public function fire($event, $payload = [], $halt = false)
- {
- return $this->dispatch($event, $payload, $halt);
- }
-
- /**
- * Fire an event and call the listeners.
- *
- * @param string|object $event
- * @param mixed $payload
- * @param bool $halt
- * @return array|null
- */
- public function dispatch($event, $payload = [], $halt = false)
- {
- // When the given "event" is actually an object we will assume it is an event
- // object and use the class as the event name and this event itself as the
- // payload to the handler, which makes object based events quite simple.
- [$event, $payload] = $this->parseEventAndPayload(
- $event, $payload
- );
-
- if ($this->shouldBroadcast($payload)) {
- $this->broadcastEvent($payload[0]);
- }
-
- $responses = [];
-
- foreach ($this->getListeners($event) as $listener) {
- $response = $listener($event, $payload);
-
- // If a response is returned from the listener and event halting is enabled
- // we will just return this response, and not call the rest of the event
- // listeners. Otherwise we will add the response on the response list.
- if ($halt && ! is_null($response)) {
- return $response;
- }
-
- // If a boolean false is returned from a listener, we will stop propagating
- // the event to any further listeners down in the chain, else we keep on
- // looping through the listeners and firing every one in our sequence.
- if ($response === false) {
- break;
- }
-
- $responses[] = $response;
- }
-
- return $halt ? null : $responses;
- }
-
- /**
- * Parse the given event and payload and prepare them for dispatching.
- *
- * @param mixed $event
- * @param mixed $payload
- * @return array
- */
- protected function parseEventAndPayload($event, $payload)
- {
- if (is_object($event)) {
- [$payload, $event] = [[$event], get_class($event)];
- }
-
- return [$event, Arr::wrap($payload)];
- }
-
- /**
- * Determine if the payload has a broadcastable event.
- *
- * @param array $payload
- * @return bool
- */
- protected function shouldBroadcast(array $payload)
- {
- return isset($payload[0]) &&
- $payload[0] instanceof ShouldBroadcast &&
- $this->broadcastWhen($payload[0]);
- }
-
- /**
- * Check if event should be broadcasted by condition.
- *
- * @param mixed $event
- * @return bool
- */
- protected function broadcastWhen($event)
- {
- return method_exists($event, 'broadcastWhen')
- ? $event->broadcastWhen() : true;
- }
-
- /**
- * Broadcast the given event class.
- *
- * @param \Illuminate\Contracts\Broadcasting\ShouldBroadcast $event
- * @return void
- */
- protected function broadcastEvent($event)
- {
- $this->container->make(BroadcastFactory::class)->queue($event);
- }
-
- /**
- * Get all of the listeners for a given event name.
- *
- * @param string $eventName
- * @return array
- */
- public function getListeners($eventName)
- {
- $listeners = $this->listeners[$eventName] ?? [];
-
- $listeners = array_merge(
- $listeners,
- $this->wildcardsCache[$eventName] ?? $this->getWildcardListeners($eventName)
- );
-
- return class_exists($eventName, false)
- ? $this->addInterfaceListeners($eventName, $listeners)
- : $listeners;
- }
-
- /**
- * Get the wildcard listeners for the event.
- *
- * @param string $eventName
- * @return array
- */
- protected function getWildcardListeners($eventName)
- {
- $wildcards = [];
-
- foreach ($this->wildcards as $key => $listeners) {
- if (Str::is($key, $eventName)) {
- $wildcards = array_merge($wildcards, $listeners);
- }
- }
-
- return $this->wildcardsCache[$eventName] = $wildcards;
- }
-
- /**
- * Add the listeners for the event's interfaces to the given array.
- *
- * @param string $eventName
- * @param array $listeners
- * @return array
- */
- protected function addInterfaceListeners($eventName, array $listeners = [])
- {
- foreach (class_implements($eventName) as $interface) {
- if (isset($this->listeners[$interface])) {
- foreach ($this->listeners[$interface] as $names) {
- $listeners = array_merge($listeners, (array) $names);
- }
- }
- }
-
- return $listeners;
- }
-
- /**
- * Register an event listener with the dispatcher.
- *
- * @param \Closure|string $listener
- * @param bool $wildcard
- * @return \Closure
- */
- public function makeListener($listener, $wildcard = false)
- {
- if (is_string($listener)) {
- return $this->createClassListener($listener, $wildcard);
- }
-
- return function ($event, $payload) use ($listener, $wildcard) {
- if ($wildcard) {
- return $listener($event, $payload);
- }
-
- return $listener(...array_values($payload));
- };
- }
-
- /**
- * Create a class based listener using the IoC container.
- *
- * @param string $listener
- * @param bool $wildcard
- * @return \Closure
- */
- public function createClassListener($listener, $wildcard = false)
- {
- return function ($event, $payload) use ($listener, $wildcard) {
- if ($wildcard) {
- return call_user_func($this->createClassCallable($listener), $event, $payload);
- }
-
- return call_user_func_array(
- $this->createClassCallable($listener), $payload
- );
- };
- }
-
- /**
- * Create the class based event callable.
- *
- * @param string $listener
- * @return callable
- */
- protected function createClassCallable($listener)
- {
- [$class, $method] = $this->parseClassCallable($listener);
-
- if ($this->handlerShouldBeQueued($class)) {
- return $this->createQueuedHandlerCallable($class, $method);
- }
-
- return [$this->container->make($class), $method];
- }
-
- /**
- * Parse the class listener into class and method.
- *
- * @param string $listener
- * @return array
- */
- protected function parseClassCallable($listener)
- {
- return Str::parseCallback($listener, 'handle');
- }
-
- /**
- * Determine if the event handler class should be queued.
- *
- * @param string $class
- * @return bool
- */
- protected function handlerShouldBeQueued($class)
- {
- try {
- return (new ReflectionClass($class))->implementsInterface(
- ShouldQueue::class
- );
- } catch (Exception $e) {
- return false;
- }
- }
-
- /**
- * Create a callable for putting an event handler on the queue.
- *
- * @param string $class
- * @param string $method
- * @return \Closure
- */
- protected function createQueuedHandlerCallable($class, $method)
- {
- return function () use ($class, $method) {
- $arguments = array_map(function ($a) {
- return is_object($a) ? clone $a : $a;
- }, func_get_args());
-
- if ($this->handlerWantsToBeQueued($class, $arguments)) {
- $this->queueHandler($class, $method, $arguments);
- }
- };
- }
-
- /**
- * Determine if the event handler wants to be queued.
- *
- * @param string $class
- * @param array $arguments
- * @return bool
- */
- protected function handlerWantsToBeQueued($class, $arguments)
- {
- if (method_exists($class, 'shouldQueue')) {
- return $this->container->make($class)->shouldQueue($arguments[0]);
- }
-
- return true;
- }
-
- /**
- * Queue the handler class.
- *
- * @param string $class
- * @param string $method
- * @param array $arguments
- * @return void
- */
- protected function queueHandler($class, $method, $arguments)
- {
- [$listener, $job] = $this->createListenerAndJob($class, $method, $arguments);
-
- $connection = $this->resolveQueue()->connection(
- $listener->connection ?? null
- );
-
- $queue = $listener->queue ?? null;
-
- isset($listener->delay)
- ? $connection->laterOn($queue, $listener->delay, $job)
- : $connection->pushOn($queue, $job);
- }
-
- /**
- * Create the listener and job for a queued listener.
- *
- * @param string $class
- * @param string $method
- * @param array $arguments
- * @return array
- */
- protected function createListenerAndJob($class, $method, $arguments)
- {
- $listener = (new ReflectionClass($class))->newInstanceWithoutConstructor();
-
- return [$listener, $this->propagateListenerOptions(
- $listener, new CallQueuedListener($class, $method, $arguments)
- )];
- }
-
- /**
- * Propagate listener options to the job.
- *
- * @param mixed $listener
- * @param mixed $job
- * @return mixed
- */
- protected function propagateListenerOptions($listener, $job)
- {
- return tap($job, function ($job) use ($listener) {
- $job->tries = $listener->tries ?? null;
- $job->timeout = $listener->timeout ?? null;
- $job->timeoutAt = method_exists($listener, 'retryUntil')
- ? $listener->retryUntil() : null;
- });
- }
-
- /**
- * Remove a set of listeners from the dispatcher.
- *
- * @param string $event
- * @return void
- */
- public function forget($event)
- {
- if (Str::contains($event, '*')) {
- unset($this->wildcards[$event]);
- } else {
- unset($this->listeners[$event]);
- }
- }
-
- /**
- * Forget all of the pushed listeners.
- *
- * @return void
- */
- public function forgetPushed()
- {
- foreach ($this->listeners as $key => $value) {
- if (Str::endsWith($key, '_pushed')) {
- $this->forget($key);
- }
- }
- }
-
- /**
- * Get the queue implementation from the resolver.
- *
- * @return \Illuminate\Contracts\Queue\Queue
- */
- protected function resolveQueue()
- {
- return call_user_func($this->queueResolver);
- }
-
- /**
- * Set the queue resolver implementation.
- *
- * @param callable $resolver
- * @return $this
- */
- public function setQueueResolver(callable $resolver)
- {
- $this->queueResolver = $resolver;
-
- return $this;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Events/EventServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Events/EventServiceProvider.php
deleted file mode 100755
index fa3ed6f..0000000
--- a/vendor/laravel/framework/src/Illuminate/Events/EventServiceProvider.php
+++ /dev/null
@@ -1,23 +0,0 @@
-app->singleton('events', function ($app) {
- return (new Dispatcher($app))->setQueueResolver(function () use ($app) {
- return $app->make(QueueFactoryContract::class);
- });
- });
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Events/composer.json b/vendor/laravel/framework/src/Illuminate/Events/composer.json
deleted file mode 100755
index cba2e0f..0000000
--- a/vendor/laravel/framework/src/Illuminate/Events/composer.json
+++ /dev/null
@@ -1,36 +0,0 @@
-{
- "name": "illuminate/events",
- "description": "The Illuminate Events package.",
- "license": "MIT",
- "homepage": "https://laravel.com",
- "support": {
- "issues": "https://github.com/laravel/framework/issues",
- "source": "https://github.com/laravel/framework"
- },
- "authors": [
- {
- "name": "Taylor Otwell",
- "email": "taylor@laravel.com"
- }
- ],
- "require": {
- "php": "^7.1.3",
- "illuminate/container": "5.7.*",
- "illuminate/contracts": "5.7.*",
- "illuminate/support": "5.7.*"
- },
- "autoload": {
- "psr-4": {
- "Illuminate\\Events\\": ""
- }
- },
- "extra": {
- "branch-alias": {
- "dev-master": "5.7-dev"
- }
- },
- "config": {
- "sort-packages": true
- },
- "minimum-stability": "dev"
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Filesystem/Cache.php b/vendor/laravel/framework/src/Illuminate/Filesystem/Cache.php
deleted file mode 100644
index deb5fe5..0000000
--- a/vendor/laravel/framework/src/Illuminate/Filesystem/Cache.php
+++ /dev/null
@@ -1,77 +0,0 @@
-key = $key;
- $this->repository = $repository;
-
- if (! is_null($expire)) {
- $this->expire = (int) ceil($expire / 60);
- }
- }
-
- /**
- * Load the cache.
- *
- * @return void
- */
- public function load()
- {
- $contents = $this->repository->get($this->key);
-
- if (! is_null($contents)) {
- $this->setFromStorage($contents);
- }
- }
-
- /**
- * Persist the cache.
- *
- * @return void
- */
- public function save()
- {
- $contents = $this->getForStorage();
-
- if (! is_null($this->expire)) {
- $this->repository->put($this->key, $contents, $this->expire);
- } else {
- $this->repository->forever($this->key, $contents);
- }
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php b/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php
deleted file mode 100644
index 6f80105..0000000
--- a/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php
+++ /dev/null
@@ -1,609 +0,0 @@
-isFile($path)) {
- return $lock ? $this->sharedGet($path) : file_get_contents($path);
- }
-
- throw new FileNotFoundException("File does not exist at path {$path}");
- }
-
- /**
- * Get contents of a file with shared access.
- *
- * @param string $path
- * @return string
- */
- public function sharedGet($path)
- {
- $contents = '';
-
- $handle = fopen($path, 'rb');
-
- if ($handle) {
- try {
- if (flock($handle, LOCK_SH)) {
- clearstatcache(true, $path);
-
- $contents = fread($handle, $this->size($path) ?: 1);
-
- flock($handle, LOCK_UN);
- }
- } finally {
- fclose($handle);
- }
- }
-
- return $contents;
- }
-
- /**
- * Get the returned value of a file.
- *
- * @param string $path
- * @return mixed
- *
- * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
- */
- public function getRequire($path)
- {
- if ($this->isFile($path)) {
- return require $path;
- }
-
- throw new FileNotFoundException("File does not exist at path {$path}");
- }
-
- /**
- * Require the given file once.
- *
- * @param string $file
- * @return mixed
- */
- public function requireOnce($file)
- {
- require_once $file;
- }
-
- /**
- * Get the MD5 hash of the file at the given path.
- *
- * @param string $path
- * @return string
- */
- public function hash($path)
- {
- return md5_file($path);
- }
-
- /**
- * Write the contents of a file.
- *
- * @param string $path
- * @param string $contents
- * @param bool $lock
- * @return int
- */
- public function put($path, $contents, $lock = false)
- {
- return file_put_contents($path, $contents, $lock ? LOCK_EX : 0);
- }
-
- /**
- * Write the contents of a file, replacing it atomically if it already exists.
- *
- * @param string $path
- * @param string $content
- * @return void
- */
- public function replace($path, $content)
- {
- // If the path already exists and is a symlink, get the real path...
- clearstatcache(true, $path);
-
- $path = realpath($path) ?: $path;
-
- $tempPath = tempnam(dirname($path), basename($path));
-
- // Fix permissions of tempPath because `tempnam()` creates it with permissions set to 0600...
- chmod($tempPath, 0777 - umask());
-
- file_put_contents($tempPath, $content);
-
- rename($tempPath, $path);
- }
-
- /**
- * Prepend to a file.
- *
- * @param string $path
- * @param string $data
- * @return int
- */
- public function prepend($path, $data)
- {
- if ($this->exists($path)) {
- return $this->put($path, $data.$this->get($path));
- }
-
- return $this->put($path, $data);
- }
-
- /**
- * Append to a file.
- *
- * @param string $path
- * @param string $data
- * @return int
- */
- public function append($path, $data)
- {
- return file_put_contents($path, $data, FILE_APPEND);
- }
-
- /**
- * Get or set UNIX mode of a file or directory.
- *
- * @param string $path
- * @param int $mode
- * @return mixed
- */
- public function chmod($path, $mode = null)
- {
- if ($mode) {
- return chmod($path, $mode);
- }
-
- return substr(sprintf('%o', fileperms($path)), -4);
- }
-
- /**
- * Delete the file at a given path.
- *
- * @param string|array $paths
- * @return bool
- */
- public function delete($paths)
- {
- $paths = is_array($paths) ? $paths : func_get_args();
-
- $success = true;
-
- foreach ($paths as $path) {
- try {
- if (! @unlink($path)) {
- $success = false;
- }
- } catch (ErrorException $e) {
- $success = false;
- }
- }
-
- return $success;
- }
-
- /**
- * Move a file to a new location.
- *
- * @param string $path
- * @param string $target
- * @return bool
- */
- public function move($path, $target)
- {
- return rename($path, $target);
- }
-
- /**
- * Copy a file to a new location.
- *
- * @param string $path
- * @param string $target
- * @return bool
- */
- public function copy($path, $target)
- {
- return copy($path, $target);
- }
-
- /**
- * Create a hard link to the target file or directory.
- *
- * @param string $target
- * @param string $link
- * @return void
- */
- public function link($target, $link)
- {
- if (! windows_os()) {
- return symlink($target, $link);
- }
-
- $mode = $this->isDirectory($target) ? 'J' : 'H';
-
- exec("mklink /{$mode} \"{$link}\" \"{$target}\"");
- }
-
- /**
- * Extract the file name from a file path.
- *
- * @param string $path
- * @return string
- */
- public function name($path)
- {
- return pathinfo($path, PATHINFO_FILENAME);
- }
-
- /**
- * Extract the trailing name component from a file path.
- *
- * @param string $path
- * @return string
- */
- public function basename($path)
- {
- return pathinfo($path, PATHINFO_BASENAME);
- }
-
- /**
- * Extract the parent directory from a file path.
- *
- * @param string $path
- * @return string
- */
- public function dirname($path)
- {
- return pathinfo($path, PATHINFO_DIRNAME);
- }
-
- /**
- * Extract the file extension from a file path.
- *
- * @param string $path
- * @return string
- */
- public function extension($path)
- {
- return pathinfo($path, PATHINFO_EXTENSION);
- }
-
- /**
- * Get the file type of a given file.
- *
- * @param string $path
- * @return string
- */
- public function type($path)
- {
- return filetype($path);
- }
-
- /**
- * Get the mime-type of a given file.
- *
- * @param string $path
- * @return string|false
- */
- public function mimeType($path)
- {
- return finfo_file(finfo_open(FILEINFO_MIME_TYPE), $path);
- }
-
- /**
- * Get the file size of a given file.
- *
- * @param string $path
- * @return int
- */
- public function size($path)
- {
- return filesize($path);
- }
-
- /**
- * Get the file's last modification time.
- *
- * @param string $path
- * @return int
- */
- public function lastModified($path)
- {
- return filemtime($path);
- }
-
- /**
- * Determine if the given path is a directory.
- *
- * @param string $directory
- * @return bool
- */
- public function isDirectory($directory)
- {
- return is_dir($directory);
- }
-
- /**
- * Determine if the given path is readable.
- *
- * @param string $path
- * @return bool
- */
- public function isReadable($path)
- {
- return is_readable($path);
- }
-
- /**
- * Determine if the given path is writable.
- *
- * @param string $path
- * @return bool
- */
- public function isWritable($path)
- {
- return is_writable($path);
- }
-
- /**
- * Determine if the given path is a file.
- *
- * @param string $file
- * @return bool
- */
- public function isFile($file)
- {
- return is_file($file);
- }
-
- /**
- * Find path names matching a given pattern.
- *
- * @param string $pattern
- * @param int $flags
- * @return array
- */
- public function glob($pattern, $flags = 0)
- {
- return glob($pattern, $flags);
- }
-
- /**
- * Get an array of all files in a directory.
- *
- * @param string $directory
- * @param bool $hidden
- * @return \Symfony\Component\Finder\SplFileInfo[]
- */
- public function files($directory, $hidden = false)
- {
- return iterator_to_array(
- Finder::create()->files()->ignoreDotFiles(! $hidden)->in($directory)->depth(0)->sortByName(),
- false
- );
- }
-
- /**
- * Get all of the files from the given directory (recursive).
- *
- * @param string $directory
- * @param bool $hidden
- * @return \Symfony\Component\Finder\SplFileInfo[]
- */
- public function allFiles($directory, $hidden = false)
- {
- return iterator_to_array(
- Finder::create()->files()->ignoreDotFiles(! $hidden)->in($directory)->sortByName(),
- false
- );
- }
-
- /**
- * Get all of the directories within a given directory.
- *
- * @param string $directory
- * @return array
- */
- public function directories($directory)
- {
- $directories = [];
-
- foreach (Finder::create()->in($directory)->directories()->depth(0)->sortByName() as $dir) {
- $directories[] = $dir->getPathname();
- }
-
- return $directories;
- }
-
- /**
- * Create a directory.
- *
- * @param string $path
- * @param int $mode
- * @param bool $recursive
- * @param bool $force
- * @return bool
- */
- public function makeDirectory($path, $mode = 0755, $recursive = false, $force = false)
- {
- if ($force) {
- return @mkdir($path, $mode, $recursive);
- }
-
- return mkdir($path, $mode, $recursive);
- }
-
- /**
- * Move a directory.
- *
- * @param string $from
- * @param string $to
- * @param bool $overwrite
- * @return bool
- */
- public function moveDirectory($from, $to, $overwrite = false)
- {
- if ($overwrite && $this->isDirectory($to) && ! $this->deleteDirectory($to)) {
- return false;
- }
-
- return @rename($from, $to) === true;
- }
-
- /**
- * Copy a directory from one location to another.
- *
- * @param string $directory
- * @param string $destination
- * @param int $options
- * @return bool
- */
- public function copyDirectory($directory, $destination, $options = null)
- {
- if (! $this->isDirectory($directory)) {
- return false;
- }
-
- $options = $options ?: FilesystemIterator::SKIP_DOTS;
-
- // If the destination directory does not actually exist, we will go ahead and
- // create it recursively, which just gets the destination prepared to copy
- // the files over. Once we make the directory we'll proceed the copying.
- if (! $this->isDirectory($destination)) {
- $this->makeDirectory($destination, 0777, true);
- }
-
- $items = new FilesystemIterator($directory, $options);
-
- foreach ($items as $item) {
- // As we spin through items, we will check to see if the current file is actually
- // a directory or a file. When it is actually a directory we will need to call
- // back into this function recursively to keep copying these nested folders.
- $target = $destination.'/'.$item->getBasename();
-
- if ($item->isDir()) {
- $path = $item->getPathname();
-
- if (! $this->copyDirectory($path, $target, $options)) {
- return false;
- }
- }
-
- // If the current items is just a regular file, we will just copy this to the new
- // location and keep looping. If for some reason the copy fails we'll bail out
- // and return false, so the developer is aware that the copy process failed.
- else {
- if (! $this->copy($item->getPathname(), $target)) {
- return false;
- }
- }
- }
-
- return true;
- }
-
- /**
- * Recursively delete a directory.
- *
- * The directory itself may be optionally preserved.
- *
- * @param string $directory
- * @param bool $preserve
- * @return bool
- */
- public function deleteDirectory($directory, $preserve = false)
- {
- if (! $this->isDirectory($directory)) {
- return false;
- }
-
- $items = new FilesystemIterator($directory);
-
- foreach ($items as $item) {
- // If the item is a directory, we can just recurse into the function and
- // delete that sub-directory otherwise we'll just delete the file and
- // keep iterating through each file until the directory is cleaned.
- if ($item->isDir() && ! $item->isLink()) {
- $this->deleteDirectory($item->getPathname());
- }
-
- // If the item is just a file, we can go ahead and delete it since we're
- // just looping through and waxing all of the files in this directory
- // and calling directories recursively, so we delete the real path.
- else {
- $this->delete($item->getPathname());
- }
- }
-
- if (! $preserve) {
- @rmdir($directory);
- }
-
- return true;
- }
-
- /**
- * Remove all of the directories within a given directory.
- *
- * @param string $directory
- * @return bool
- */
- public function deleteDirectories($directory)
- {
- $allDirectories = $this->directories($directory);
-
- if (! empty($allDirectories)) {
- foreach ($allDirectories as $directoryName) {
- $this->deleteDirectory($directoryName);
- }
-
- return true;
- }
-
- return false;
- }
-
- /**
- * Empty the specified directory of all files and folders.
- *
- * @param string $directory
- * @return bool
- */
- public function cleanDirectory($directory)
- {
- return $this->deleteDirectory($directory, true);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemAdapter.php b/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemAdapter.php
deleted file mode 100644
index 8249058..0000000
--- a/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemAdapter.php
+++ /dev/null
@@ -1,731 +0,0 @@
-driver = $driver;
- }
-
- /**
- * Assert that the given file exists.
- *
- * @param string|array $path
- * @return $this
- */
- public function assertExists($path)
- {
- $paths = Arr::wrap($path);
-
- foreach ($paths as $path) {
- PHPUnit::assertTrue(
- $this->exists($path), "Unable to find a file at path [{$path}]."
- );
- }
-
- return $this;
- }
-
- /**
- * Assert that the given file does not exist.
- *
- * @param string|array $path
- * @return $this
- */
- public function assertMissing($path)
- {
- $paths = Arr::wrap($path);
-
- foreach ($paths as $path) {
- PHPUnit::assertFalse(
- $this->exists($path), "Found unexpected file at path [{$path}]."
- );
- }
-
- return $this;
- }
-
- /**
- * Determine if a file exists.
- *
- * @param string $path
- * @return bool
- */
- public function exists($path)
- {
- return $this->driver->has($path);
- }
-
- /**
- * Get the full path for the file at the given "short" path.
- *
- * @param string $path
- * @return string
- */
- public function path($path)
- {
- return $this->driver->getAdapter()->getPathPrefix().$path;
- }
-
- /**
- * Get the contents of a file.
- *
- * @param string $path
- * @return string
- *
- * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
- */
- public function get($path)
- {
- try {
- return $this->driver->read($path);
- } catch (FileNotFoundException $e) {
- throw new ContractFileNotFoundException($path, $e->getCode(), $e);
- }
- }
-
- /**
- * Create a streamed response for a given file.
- *
- * @param string $path
- * @param string|null $name
- * @param array|null $headers
- * @param string|null $disposition
- * @return \Symfony\Component\HttpFoundation\StreamedResponse
- */
- public function response($path, $name = null, array $headers = [], $disposition = 'inline')
- {
- $response = new StreamedResponse;
-
- $disposition = $response->headers->makeDisposition($disposition, $name ?? basename($path));
-
- $response->headers->replace($headers + [
- 'Content-Type' => $this->mimeType($path),
- 'Content-Length' => $this->size($path),
- 'Content-Disposition' => $disposition,
- ]);
-
- $response->setCallback(function () use ($path) {
- $stream = $this->readStream($path);
- fpassthru($stream);
- fclose($stream);
- });
-
- return $response;
- }
-
- /**
- * Create a streamed download response for a given file.
- *
- * @param string $path
- * @param string|null $name
- * @param array|null $headers
- * @return \Symfony\Component\HttpFoundation\StreamedResponse
- */
- public function download($path, $name = null, array $headers = [])
- {
- return $this->response($path, $name, $headers, 'attachment');
- }
-
- /**
- * Write the contents of a file.
- *
- * @param string $path
- * @param string|resource $contents
- * @param mixed $options
- * @return bool
- */
- public function put($path, $contents, $options = [])
- {
- $options = is_string($options)
- ? ['visibility' => $options]
- : (array) $options;
-
- // If the given contents is actually a file or uploaded file instance than we will
- // automatically store the file using a stream. This provides a convenient path
- // for the developer to store streams without managing them manually in code.
- if ($contents instanceof File ||
- $contents instanceof UploadedFile) {
- return $this->putFile($path, $contents, $options);
- }
-
- return is_resource($contents)
- ? $this->driver->putStream($path, $contents, $options)
- : $this->driver->put($path, $contents, $options);
- }
-
- /**
- * Store the uploaded file on the disk.
- *
- * @param string $path
- * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile $file
- * @param array $options
- * @return string|false
- */
- public function putFile($path, $file, $options = [])
- {
- return $this->putFileAs($path, $file, $file->hashName(), $options);
- }
-
- /**
- * Store the uploaded file on the disk with a given name.
- *
- * @param string $path
- * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile $file
- * @param string $name
- * @param array $options
- * @return string|false
- */
- public function putFileAs($path, $file, $name, $options = [])
- {
- $stream = fopen($file->getRealPath(), 'r');
-
- // Next, we will format the path of the file and store the file using a stream since
- // they provide better performance than alternatives. Once we write the file this
- // stream will get closed automatically by us so the developer doesn't have to.
- $result = $this->put(
- $path = trim($path.'/'.$name, '/'), $stream, $options
- );
-
- if (is_resource($stream)) {
- fclose($stream);
- }
-
- return $result ? $path : false;
- }
-
- /**
- * Get the visibility for the given path.
- *
- * @param string $path
- * @return string
- */
- public function getVisibility($path)
- {
- if ($this->driver->getVisibility($path) == AdapterInterface::VISIBILITY_PUBLIC) {
- return FilesystemContract::VISIBILITY_PUBLIC;
- }
-
- return FilesystemContract::VISIBILITY_PRIVATE;
- }
-
- /**
- * Set the visibility for the given path.
- *
- * @param string $path
- * @param string $visibility
- * @return bool
- */
- public function setVisibility($path, $visibility)
- {
- return $this->driver->setVisibility($path, $this->parseVisibility($visibility));
- }
-
- /**
- * Prepend to a file.
- *
- * @param string $path
- * @param string $data
- * @param string $separator
- * @return bool
- */
- public function prepend($path, $data, $separator = PHP_EOL)
- {
- if ($this->exists($path)) {
- return $this->put($path, $data.$separator.$this->get($path));
- }
-
- return $this->put($path, $data);
- }
-
- /**
- * Append to a file.
- *
- * @param string $path
- * @param string $data
- * @param string $separator
- * @return bool
- */
- public function append($path, $data, $separator = PHP_EOL)
- {
- if ($this->exists($path)) {
- return $this->put($path, $this->get($path).$separator.$data);
- }
-
- return $this->put($path, $data);
- }
-
- /**
- * Delete the file at a given path.
- *
- * @param string|array $paths
- * @return bool
- */
- public function delete($paths)
- {
- $paths = is_array($paths) ? $paths : func_get_args();
-
- $success = true;
-
- foreach ($paths as $path) {
- try {
- if (! $this->driver->delete($path)) {
- $success = false;
- }
- } catch (FileNotFoundException $e) {
- $success = false;
- }
- }
-
- return $success;
- }
-
- /**
- * Copy a file to a new location.
- *
- * @param string $from
- * @param string $to
- * @return bool
- */
- public function copy($from, $to)
- {
- return $this->driver->copy($from, $to);
- }
-
- /**
- * Move a file to a new location.
- *
- * @param string $from
- * @param string $to
- * @return bool
- */
- public function move($from, $to)
- {
- return $this->driver->rename($from, $to);
- }
-
- /**
- * Get the file size of a given file.
- *
- * @param string $path
- * @return int
- */
- public function size($path)
- {
- return $this->driver->getSize($path);
- }
-
- /**
- * Get the mime-type of a given file.
- *
- * @param string $path
- * @return string|false
- */
- public function mimeType($path)
- {
- return $this->driver->getMimetype($path);
- }
-
- /**
- * Get the file's last modification time.
- *
- * @param string $path
- * @return int
- */
- public function lastModified($path)
- {
- return $this->driver->getTimestamp($path);
- }
-
- /**
- * Get the URL for the file at the given path.
- *
- * @param string $path
- * @return string
- *
- * @throws \RuntimeException
- */
- public function url($path)
- {
- $adapter = $this->driver->getAdapter();
-
- if ($adapter instanceof CachedAdapter) {
- $adapter = $adapter->getAdapter();
- }
-
- if (method_exists($adapter, 'getUrl')) {
- return $adapter->getUrl($path);
- } elseif (method_exists($this->driver, 'getUrl')) {
- return $this->driver->getUrl($path);
- } elseif ($adapter instanceof AwsS3Adapter) {
- return $this->getAwsUrl($adapter, $path);
- } elseif ($adapter instanceof RackspaceAdapter) {
- return $this->getRackspaceUrl($adapter, $path);
- } elseif ($adapter instanceof LocalAdapter) {
- return $this->getLocalUrl($path);
- } else {
- throw new RuntimeException('This driver does not support retrieving URLs.');
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function readStream($path)
- {
- try {
- $resource = $this->driver->readStream($path);
-
- return $resource ? $resource : null;
- } catch (FileNotFoundException $e) {
- throw new ContractFileNotFoundException($e->getMessage(), $e->getCode(), $e);
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function writeStream($path, $resource, array $options = [])
- {
- try {
- return $this->driver->writeStream($path, $resource, $options);
- } catch (FileExistsException $e) {
- throw new ContractFileExistsException($e->getMessage(), $e->getCode(), $e);
- }
- }
-
- /**
- * Get the URL for the file at the given path.
- *
- * @param \League\Flysystem\AwsS3v3\AwsS3Adapter $adapter
- * @param string $path
- * @return string
- */
- protected function getAwsUrl($adapter, $path)
- {
- // If an explicit base URL has been set on the disk configuration then we will use
- // it as the base URL instead of the default path. This allows the developer to
- // have full control over the base path for this filesystem's generated URLs.
- if (! is_null($url = $this->driver->getConfig()->get('url'))) {
- return $this->concatPathToUrl($url, $adapter->getPathPrefix().$path);
- }
-
- return $adapter->getClient()->getObjectUrl(
- $adapter->getBucket(), $adapter->getPathPrefix().$path
- );
- }
-
- /**
- * Get the URL for the file at the given path.
- *
- * @param \League\Flysystem\Rackspace\RackspaceAdapter $adapter
- * @param string $path
- * @return string
- */
- protected function getRackspaceUrl($adapter, $path)
- {
- return (string) $adapter->getContainer()->getObject($path)->getPublicUrl();
- }
-
- /**
- * Get the URL for the file at the given path.
- *
- * @param string $path
- * @return string
- */
- protected function getLocalUrl($path)
- {
- $config = $this->driver->getConfig();
-
- // If an explicit base URL has been set on the disk configuration then we will use
- // it as the base URL instead of the default path. This allows the developer to
- // have full control over the base path for this filesystem's generated URLs.
- if ($config->has('url')) {
- return $this->concatPathToUrl($config->get('url'), $path);
- }
-
- $path = '/storage/'.$path;
-
- // If the path contains "storage/public", it probably means the developer is using
- // the default disk to generate the path instead of the "public" disk like they
- // are really supposed to use. We will remove the public from this path here.
- if (Str::contains($path, '/storage/public/')) {
- return Str::replaceFirst('/public/', '/', $path);
- }
-
- return $path;
- }
-
- /**
- * Get a temporary URL for the file at the given path.
- *
- * @param string $path
- * @param \DateTimeInterface $expiration
- * @param array $options
- * @return string
- *
- * @throws \RuntimeException
- */
- public function temporaryUrl($path, $expiration, array $options = [])
- {
- $adapter = $this->driver->getAdapter();
-
- if ($adapter instanceof CachedAdapter) {
- $adapter = $adapter->getAdapter();
- }
-
- if (method_exists($adapter, 'getTemporaryUrl')) {
- return $adapter->getTemporaryUrl($path, $expiration, $options);
- } elseif ($adapter instanceof AwsS3Adapter) {
- return $this->getAwsTemporaryUrl($adapter, $path, $expiration, $options);
- } elseif ($adapter instanceof RackspaceAdapter) {
- return $this->getRackspaceTemporaryUrl($adapter, $path, $expiration, $options);
- } else {
- throw new RuntimeException('This driver does not support creating temporary URLs.');
- }
- }
-
- /**
- * Get a temporary URL for the file at the given path.
- *
- * @param \League\Flysystem\AwsS3v3\AwsS3Adapter $adapter
- * @param string $path
- * @param \DateTimeInterface $expiration
- * @param array $options
- * @return string
- */
- public function getAwsTemporaryUrl($adapter, $path, $expiration, $options)
- {
- $client = $adapter->getClient();
-
- $command = $client->getCommand('GetObject', array_merge([
- 'Bucket' => $adapter->getBucket(),
- 'Key' => $adapter->getPathPrefix().$path,
- ], $options));
-
- return (string) $client->createPresignedRequest(
- $command, $expiration
- )->getUri();
- }
-
- /**
- * Get a temporary URL for the file at the given path.
- *
- * @param \League\Flysystem\Rackspace\RackspaceAdapter $adapter
- * @param string $path
- * @param \DateTimeInterface $expiration
- * @param array $options
- * @return string
- */
- public function getRackspaceTemporaryUrl($adapter, $path, $expiration, $options)
- {
- return $adapter->getContainer()->getObject($path)->getTemporaryUrl(
- Carbon::now()->diffInSeconds($expiration),
- $options['method'] ?? 'GET',
- $options['forcePublicUrl'] ?? true
- );
- }
-
- /**
- * Concatenate a path to a URL.
- *
- * @param string $url
- * @param string $path
- * @return string
- */
- protected function concatPathToUrl($url, $path)
- {
- return rtrim($url, '/').'/'.ltrim($path, '/');
- }
-
- /**
- * Get an array of all files in a directory.
- *
- * @param string|null $directory
- * @param bool $recursive
- * @return array
- */
- public function files($directory = null, $recursive = false)
- {
- $contents = $this->driver->listContents($directory, $recursive);
-
- return $this->filterContentsByType($contents, 'file');
- }
-
- /**
- * Get all of the files from the given directory (recursive).
- *
- * @param string|null $directory
- * @return array
- */
- public function allFiles($directory = null)
- {
- return $this->files($directory, true);
- }
-
- /**
- * Get all of the directories within a given directory.
- *
- * @param string|null $directory
- * @param bool $recursive
- * @return array
- */
- public function directories($directory = null, $recursive = false)
- {
- $contents = $this->driver->listContents($directory, $recursive);
-
- return $this->filterContentsByType($contents, 'dir');
- }
-
- /**
- * Get all (recursive) of the directories within a given directory.
- *
- * @param string|null $directory
- * @return array
- */
- public function allDirectories($directory = null)
- {
- return $this->directories($directory, true);
- }
-
- /**
- * Create a directory.
- *
- * @param string $path
- * @return bool
- */
- public function makeDirectory($path)
- {
- return $this->driver->createDir($path);
- }
-
- /**
- * Recursively delete a directory.
- *
- * @param string $directory
- * @return bool
- */
- public function deleteDirectory($directory)
- {
- return $this->driver->deleteDir($directory);
- }
-
- /**
- * Flush the Flysystem cache.
- *
- * @return void
- */
- public function flushCache()
- {
- $adapter = $this->driver->getAdapter();
-
- if ($adapter instanceof CachedAdapter) {
- $adapter->getCache()->flush();
- }
- }
-
- /**
- * Get the Flysystem driver.
- *
- * @return \League\Flysystem\FilesystemInterface
- */
- public function getDriver()
- {
- return $this->driver;
- }
-
- /**
- * Filter directory contents by type.
- *
- * @param array $contents
- * @param string $type
- * @return array
- */
- protected function filterContentsByType($contents, $type)
- {
- return Collection::make($contents)
- ->where('type', $type)
- ->pluck('path')
- ->values()
- ->all();
- }
-
- /**
- * Parse the given visibility value.
- *
- * @param string|null $visibility
- * @return string|null
- *
- * @throws \InvalidArgumentException
- */
- protected function parseVisibility($visibility)
- {
- if (is_null($visibility)) {
- return;
- }
-
- switch ($visibility) {
- case FilesystemContract::VISIBILITY_PUBLIC:
- return AdapterInterface::VISIBILITY_PUBLIC;
- case FilesystemContract::VISIBILITY_PRIVATE:
- return AdapterInterface::VISIBILITY_PRIVATE;
- }
-
- throw new InvalidArgumentException("Unknown visibility: {$visibility}");
- }
-
- /**
- * Pass dynamic methods call onto Flysystem.
- *
- * @param string $method
- * @param array $parameters
- * @return mixed
- *
- * @throws \BadMethodCallException
- */
- public function __call($method, array $parameters)
- {
- return call_user_func_array([$this->driver, $method], $parameters);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemManager.php b/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemManager.php
deleted file mode 100644
index 7897352..0000000
--- a/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemManager.php
+++ /dev/null
@@ -1,401 +0,0 @@
-app = $app;
- }
-
- /**
- * Get a filesystem instance.
- *
- * @param string $name
- * @return \Illuminate\Contracts\Filesystem\Filesystem
- */
- public function drive($name = null)
- {
- return $this->disk($name);
- }
-
- /**
- * Get a filesystem instance.
- *
- * @param string $name
- * @return \Illuminate\Contracts\Filesystem\Filesystem
- */
- public function disk($name = null)
- {
- $name = $name ?: $this->getDefaultDriver();
-
- return $this->disks[$name] = $this->get($name);
- }
-
- /**
- * Get a default cloud filesystem instance.
- *
- * @return \Illuminate\Contracts\Filesystem\Filesystem
- */
- public function cloud()
- {
- $name = $this->getDefaultCloudDriver();
-
- return $this->disks[$name] = $this->get($name);
- }
-
- /**
- * Attempt to get the disk from the local cache.
- *
- * @param string $name
- * @return \Illuminate\Contracts\Filesystem\Filesystem
- */
- protected function get($name)
- {
- return $this->disks[$name] ?? $this->resolve($name);
- }
-
- /**
- * Resolve the given disk.
- *
- * @param string $name
- * @return \Illuminate\Contracts\Filesystem\Filesystem
- *
- * @throws \InvalidArgumentException
- */
- protected function resolve($name)
- {
- $config = $this->getConfig($name);
-
- if (isset($this->customCreators[$config['driver']])) {
- return $this->callCustomCreator($config);
- }
-
- $driverMethod = 'create'.ucfirst($config['driver']).'Driver';
-
- if (method_exists($this, $driverMethod)) {
- return $this->{$driverMethod}($config);
- } else {
- throw new InvalidArgumentException("Driver [{$config['driver']}] is not supported.");
- }
- }
-
- /**
- * Call a custom driver creator.
- *
- * @param array $config
- * @return \Illuminate\Contracts\Filesystem\Filesystem
- */
- protected function callCustomCreator(array $config)
- {
- $driver = $this->customCreators[$config['driver']]($this->app, $config);
-
- if ($driver instanceof FilesystemInterface) {
- return $this->adapt($driver);
- }
-
- return $driver;
- }
-
- /**
- * Create an instance of the local driver.
- *
- * @param array $config
- * @return \Illuminate\Contracts\Filesystem\Filesystem
- */
- public function createLocalDriver(array $config)
- {
- $permissions = $config['permissions'] ?? [];
-
- $links = ($config['links'] ?? null) === 'skip'
- ? LocalAdapter::SKIP_LINKS
- : LocalAdapter::DISALLOW_LINKS;
-
- return $this->adapt($this->createFlysystem(new LocalAdapter(
- $config['root'], LOCK_EX, $links, $permissions
- ), $config));
- }
-
- /**
- * Create an instance of the ftp driver.
- *
- * @param array $config
- * @return \Illuminate\Contracts\Filesystem\Filesystem
- */
- public function createFtpDriver(array $config)
- {
- return $this->adapt($this->createFlysystem(
- new FtpAdapter($config), $config
- ));
- }
-
- /**
- * Create an instance of the sftp driver.
- *
- * @param array $config
- * @return \Illuminate\Contracts\Filesystem\Filesystem
- */
- public function createSftpDriver(array $config)
- {
- return $this->adapt($this->createFlysystem(
- new SftpAdapter($config), $config
- ));
- }
-
- /**
- * Create an instance of the Amazon S3 driver.
- *
- * @param array $config
- * @return \Illuminate\Contracts\Filesystem\Cloud
- */
- public function createS3Driver(array $config)
- {
- $s3Config = $this->formatS3Config($config);
-
- $root = $s3Config['root'] ?? null;
-
- $options = $config['options'] ?? [];
-
- return $this->adapt($this->createFlysystem(
- new S3Adapter(new S3Client($s3Config), $s3Config['bucket'], $root, $options), $config
- ));
- }
-
- /**
- * Format the given S3 configuration with the default options.
- *
- * @param array $config
- * @return array
- */
- protected function formatS3Config(array $config)
- {
- $config += ['version' => 'latest'];
-
- if ($config['key'] && $config['secret']) {
- $config['credentials'] = Arr::only($config, ['key', 'secret', 'token']);
- }
-
- return $config;
- }
-
- /**
- * Create an instance of the Rackspace driver.
- *
- * @param array $config
- * @return \Illuminate\Contracts\Filesystem\Cloud
- */
- public function createRackspaceDriver(array $config)
- {
- $client = new Rackspace($config['endpoint'], [
- 'username' => $config['username'], 'apiKey' => $config['key'],
- ], $config['options'] ?? []);
-
- $root = $config['root'] ?? null;
-
- return $this->adapt($this->createFlysystem(
- new RackspaceAdapter($this->getRackspaceContainer($client, $config), $root), $config
- ));
- }
-
- /**
- * Get the Rackspace Cloud Files container.
- *
- * @param \OpenCloud\Rackspace $client
- * @param array $config
- * @return \OpenCloud\ObjectStore\Resource\Container
- */
- protected function getRackspaceContainer(Rackspace $client, array $config)
- {
- $urlType = $config['url_type'] ?? null;
-
- $store = $client->objectStoreService('cloudFiles', $config['region'], $urlType);
-
- return $store->getContainer($config['container']);
- }
-
- /**
- * Create a Flysystem instance with the given adapter.
- *
- * @param \League\Flysystem\AdapterInterface $adapter
- * @param array $config
- * @return \League\Flysystem\FilesystemInterface
- */
- protected function createFlysystem(AdapterInterface $adapter, array $config)
- {
- $cache = Arr::pull($config, 'cache');
-
- $config = Arr::only($config, ['visibility', 'disable_asserts', 'url']);
-
- if ($cache) {
- $adapter = new CachedAdapter($adapter, $this->createCacheStore($cache));
- }
-
- return new Flysystem($adapter, count($config) > 0 ? $config : null);
- }
-
- /**
- * Create a cache store instance.
- *
- * @param mixed $config
- * @return \League\Flysystem\Cached\CacheInterface
- *
- * @throws \InvalidArgumentException
- */
- protected function createCacheStore($config)
- {
- if ($config === true) {
- return new MemoryStore;
- }
-
- return new Cache(
- $this->app['cache']->store($config['store']),
- $config['prefix'] ?? 'flysystem',
- $config['expire'] ?? null
- );
- }
-
- /**
- * Adapt the filesystem implementation.
- *
- * @param \League\Flysystem\FilesystemInterface $filesystem
- * @return \Illuminate\Contracts\Filesystem\Filesystem
- */
- protected function adapt(FilesystemInterface $filesystem)
- {
- return new FilesystemAdapter($filesystem);
- }
-
- /**
- * Set the given disk instance.
- *
- * @param string $name
- * @param mixed $disk
- * @return $this
- */
- public function set($name, $disk)
- {
- $this->disks[$name] = $disk;
-
- return $this;
- }
-
- /**
- * Get the filesystem connection configuration.
- *
- * @param string $name
- * @return array
- */
- protected function getConfig($name)
- {
- return $this->app['config']["filesystems.disks.{$name}"];
- }
-
- /**
- * Get the default driver name.
- *
- * @return string
- */
- public function getDefaultDriver()
- {
- return $this->app['config']['filesystems.default'];
- }
-
- /**
- * Get the default cloud driver name.
- *
- * @return string
- */
- public function getDefaultCloudDriver()
- {
- return $this->app['config']['filesystems.cloud'];
- }
-
- /**
- * Unset the given disk instances.
- *
- * @param array|string $disk
- * @return $this
- */
- public function forgetDisk($disk)
- {
- foreach ((array) $disk as $diskName) {
- unset($this->disks[$diskName]);
- }
-
- return $this;
- }
-
- /**
- * Register a custom driver creator Closure.
- *
- * @param string $driver
- * @param \Closure $callback
- * @return $this
- */
- public function extend($driver, Closure $callback)
- {
- $this->customCreators[$driver] = $callback;
-
- return $this;
- }
-
- /**
- * Dynamically call the default driver instance.
- *
- * @param string $method
- * @param array $parameters
- * @return mixed
- */
- public function __call($method, $parameters)
- {
- return $this->disk()->$method(...$parameters);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemServiceProvider.php
deleted file mode 100644
index 6932270..0000000
--- a/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemServiceProvider.php
+++ /dev/null
@@ -1,82 +0,0 @@
-registerNativeFilesystem();
-
- $this->registerFlysystem();
- }
-
- /**
- * Register the native filesystem implementation.
- *
- * @return void
- */
- protected function registerNativeFilesystem()
- {
- $this->app->singleton('files', function () {
- return new Filesystem;
- });
- }
-
- /**
- * Register the driver based filesystem.
- *
- * @return void
- */
- protected function registerFlysystem()
- {
- $this->registerManager();
-
- $this->app->singleton('filesystem.disk', function () {
- return $this->app['filesystem']->disk($this->getDefaultDriver());
- });
-
- $this->app->singleton('filesystem.cloud', function () {
- return $this->app['filesystem']->disk($this->getCloudDriver());
- });
- }
-
- /**
- * Register the filesystem manager.
- *
- * @return void
- */
- protected function registerManager()
- {
- $this->app->singleton('filesystem', function () {
- return new FilesystemManager($this->app);
- });
- }
-
- /**
- * Get the default file driver.
- *
- * @return string
- */
- protected function getDefaultDriver()
- {
- return $this->app['config']['filesystems.default'];
- }
-
- /**
- * Get the default cloud based file driver.
- *
- * @return string
- */
- protected function getCloudDriver()
- {
- return $this->app['config']['filesystems.cloud'];
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Filesystem/composer.json b/vendor/laravel/framework/src/Illuminate/Filesystem/composer.json
deleted file mode 100644
index 4157c81..0000000
--- a/vendor/laravel/framework/src/Illuminate/Filesystem/composer.json
+++ /dev/null
@@ -1,43 +0,0 @@
-{
- "name": "illuminate/filesystem",
- "description": "The Illuminate Filesystem package.",
- "license": "MIT",
- "homepage": "https://laravel.com",
- "support": {
- "issues": "https://github.com/laravel/framework/issues",
- "source": "https://github.com/laravel/framework"
- },
- "authors": [
- {
- "name": "Taylor Otwell",
- "email": "taylor@laravel.com"
- }
- ],
- "require": {
- "php": "^7.1.3",
- "illuminate/contracts": "5.7.*",
- "illuminate/support": "5.7.*",
- "symfony/finder": "^4.1"
- },
- "autoload": {
- "psr-4": {
- "Illuminate\\Filesystem\\": ""
- }
- },
- "extra": {
- "branch-alias": {
- "dev-master": "5.7-dev"
- }
- },
- "suggest": {
- "league/flysystem": "Required to use the Flysystem local and FTP drivers (^1.0).",
- "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^1.0).",
- "league/flysystem-cached-adapter": "Required to use the Flysystem cache (^1.0).",
- "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (^1.0).",
- "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0)."
- },
- "config": {
- "sort-packages": true
- },
- "minimum-stability": "dev"
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/AliasLoader.php b/vendor/laravel/framework/src/Illuminate/Foundation/AliasLoader.php
deleted file mode 100755
index 63f3891..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/AliasLoader.php
+++ /dev/null
@@ -1,243 +0,0 @@
-aliases = $aliases;
- }
-
- /**
- * Get or create the singleton alias loader instance.
- *
- * @param array $aliases
- * @return \Illuminate\Foundation\AliasLoader
- */
- public static function getInstance(array $aliases = [])
- {
- if (is_null(static::$instance)) {
- return static::$instance = new static($aliases);
- }
-
- $aliases = array_merge(static::$instance->getAliases(), $aliases);
-
- static::$instance->setAliases($aliases);
-
- return static::$instance;
- }
-
- /**
- * Load a class alias if it is registered.
- *
- * @param string $alias
- * @return bool|null
- */
- public function load($alias)
- {
- if (static::$facadeNamespace && strpos($alias, static::$facadeNamespace) === 0) {
- $this->loadFacade($alias);
-
- return true;
- }
-
- if (isset($this->aliases[$alias])) {
- return class_alias($this->aliases[$alias], $alias);
- }
- }
-
- /**
- * Load a real-time facade for the given alias.
- *
- * @param string $alias
- * @return void
- */
- protected function loadFacade($alias)
- {
- require $this->ensureFacadeExists($alias);
- }
-
- /**
- * Ensure that the given alias has an existing real-time facade class.
- *
- * @param string $alias
- * @return string
- */
- protected function ensureFacadeExists($alias)
- {
- if (file_exists($path = storage_path('framework/cache/facade-'.sha1($alias).'.php'))) {
- return $path;
- }
-
- file_put_contents($path, $this->formatFacadeStub(
- $alias, file_get_contents(__DIR__.'/stubs/facade.stub')
- ));
-
- return $path;
- }
-
- /**
- * Format the facade stub with the proper namespace and class.
- *
- * @param string $alias
- * @param string $stub
- * @return string
- */
- protected function formatFacadeStub($alias, $stub)
- {
- $replacements = [
- str_replace('/', '\\', dirname(str_replace('\\', '/', $alias))),
- class_basename($alias),
- substr($alias, strlen(static::$facadeNamespace)),
- ];
-
- return str_replace(
- ['DummyNamespace', 'DummyClass', 'DummyTarget'], $replacements, $stub
- );
- }
-
- /**
- * Add an alias to the loader.
- *
- * @param string $class
- * @param string $alias
- * @return void
- */
- public function alias($class, $alias)
- {
- $this->aliases[$class] = $alias;
- }
-
- /**
- * Register the loader on the auto-loader stack.
- *
- * @return void
- */
- public function register()
- {
- if (! $this->registered) {
- $this->prependToLoaderStack();
-
- $this->registered = true;
- }
- }
-
- /**
- * Prepend the load method to the auto-loader stack.
- *
- * @return void
- */
- protected function prependToLoaderStack()
- {
- spl_autoload_register([$this, 'load'], true, true);
- }
-
- /**
- * Get the registered aliases.
- *
- * @return array
- */
- public function getAliases()
- {
- return $this->aliases;
- }
-
- /**
- * Set the registered aliases.
- *
- * @param array $aliases
- * @return void
- */
- public function setAliases(array $aliases)
- {
- $this->aliases = $aliases;
- }
-
- /**
- * Indicates if the loader has been registered.
- *
- * @return bool
- */
- public function isRegistered()
- {
- return $this->registered;
- }
-
- /**
- * Set the "registered" state of the loader.
- *
- * @param bool $value
- * @return void
- */
- public function setRegistered($value)
- {
- $this->registered = $value;
- }
-
- /**
- * Set the real-time facade namespace.
- *
- * @param string $namespace
- * @return void
- */
- public static function setFacadeNamespace($namespace)
- {
- static::$facadeNamespace = rtrim($namespace, '\\').'\\';
- }
-
- /**
- * Set the value of the singleton alias loader.
- *
- * @param \Illuminate\Foundation\AliasLoader $loader
- * @return void
- */
- public static function setInstance($loader)
- {
- static::$instance = $loader;
- }
-
- /**
- * Clone method.
- *
- * @return void
- */
- private function __clone()
- {
- //
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Application.php b/vendor/laravel/framework/src/Illuminate/Foundation/Application.php
deleted file mode 100755
index a87e2a2..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Application.php
+++ /dev/null
@@ -1,1167 +0,0 @@
-setBasePath($basePath);
- }
-
- $this->registerBaseBindings();
-
- $this->registerBaseServiceProviders();
-
- $this->registerCoreContainerAliases();
- }
-
- /**
- * Get the version number of the application.
- *
- * @return string
- */
- public function version()
- {
- return static::VERSION;
- }
-
- /**
- * Register the basic bindings into the container.
- *
- * @return void
- */
- protected function registerBaseBindings()
- {
- static::setInstance($this);
-
- $this->instance('app', $this);
-
- $this->instance(Container::class, $this);
-
- $this->instance(PackageManifest::class, new PackageManifest(
- new Filesystem, $this->basePath(), $this->getCachedPackagesPath()
- ));
- }
-
- /**
- * Register all of the base service providers.
- *
- * @return void
- */
- protected function registerBaseServiceProviders()
- {
- $this->register(new EventServiceProvider($this));
- $this->register(new LogServiceProvider($this));
- $this->register(new RoutingServiceProvider($this));
- }
-
- /**
- * Run the given array of bootstrap classes.
- *
- * @param array $bootstrappers
- * @return void
- */
- public function bootstrapWith(array $bootstrappers)
- {
- $this->hasBeenBootstrapped = true;
-
- foreach ($bootstrappers as $bootstrapper) {
- $this['events']->dispatch('bootstrapping: '.$bootstrapper, [$this]);
-
- $this->make($bootstrapper)->bootstrap($this);
-
- $this['events']->dispatch('bootstrapped: '.$bootstrapper, [$this]);
- }
- }
-
- /**
- * Register a callback to run after loading the environment.
- *
- * @param \Closure $callback
- * @return void
- */
- public function afterLoadingEnvironment(Closure $callback)
- {
- return $this->afterBootstrapping(
- LoadEnvironmentVariables::class, $callback
- );
- }
-
- /**
- * Register a callback to run before a bootstrapper.
- *
- * @param string $bootstrapper
- * @param \Closure $callback
- * @return void
- */
- public function beforeBootstrapping($bootstrapper, Closure $callback)
- {
- $this['events']->listen('bootstrapping: '.$bootstrapper, $callback);
- }
-
- /**
- * Register a callback to run after a bootstrapper.
- *
- * @param string $bootstrapper
- * @param \Closure $callback
- * @return void
- */
- public function afterBootstrapping($bootstrapper, Closure $callback)
- {
- $this['events']->listen('bootstrapped: '.$bootstrapper, $callback);
- }
-
- /**
- * Determine if the application has been bootstrapped before.
- *
- * @return bool
- */
- public function hasBeenBootstrapped()
- {
- return $this->hasBeenBootstrapped;
- }
-
- /**
- * Set the base path for the application.
- *
- * @param string $basePath
- * @return $this
- */
- public function setBasePath($basePath)
- {
- $this->basePath = rtrim($basePath, '\/');
-
- $this->bindPathsInContainer();
-
- return $this;
- }
-
- /**
- * Bind all of the application paths in the container.
- *
- * @return void
- */
- protected function bindPathsInContainer()
- {
- $this->instance('path', $this->path());
- $this->instance('path.base', $this->basePath());
- $this->instance('path.lang', $this->langPath());
- $this->instance('path.config', $this->configPath());
- $this->instance('path.public', $this->publicPath());
- $this->instance('path.storage', $this->storagePath());
- $this->instance('path.database', $this->databasePath());
- $this->instance('path.resources', $this->resourcePath());
- $this->instance('path.bootstrap', $this->bootstrapPath());
- }
-
- /**
- * Get the path to the application "app" directory.
- *
- * @param string $path Optionally, a path to append to the app path
- * @return string
- */
- public function path($path = '')
- {
- return $this->basePath.DIRECTORY_SEPARATOR.'app'.($path ? DIRECTORY_SEPARATOR.$path : $path);
- }
-
- /**
- * Get the base path of the Laravel installation.
- *
- * @param string $path Optionally, a path to append to the base path
- * @return string
- */
- public function basePath($path = '')
- {
- return $this->basePath.($path ? DIRECTORY_SEPARATOR.$path : $path);
- }
-
- /**
- * Get the path to the bootstrap directory.
- *
- * @param string $path Optionally, a path to append to the bootstrap path
- * @return string
- */
- public function bootstrapPath($path = '')
- {
- return $this->basePath.DIRECTORY_SEPARATOR.'bootstrap'.($path ? DIRECTORY_SEPARATOR.$path : $path);
- }
-
- /**
- * Get the path to the application configuration files.
- *
- * @param string $path Optionally, a path to append to the config path
- * @return string
- */
- public function configPath($path = '')
- {
- return $this->basePath.DIRECTORY_SEPARATOR.'config'.($path ? DIRECTORY_SEPARATOR.$path : $path);
- }
-
- /**
- * Get the path to the database directory.
- *
- * @param string $path Optionally, a path to append to the database path
- * @return string
- */
- public function databasePath($path = '')
- {
- return ($this->databasePath ?: $this->basePath.DIRECTORY_SEPARATOR.'database').($path ? DIRECTORY_SEPARATOR.$path : $path);
- }
-
- /**
- * Set the database directory.
- *
- * @param string $path
- * @return $this
- */
- public function useDatabasePath($path)
- {
- $this->databasePath = $path;
-
- $this->instance('path.database', $path);
-
- return $this;
- }
-
- /**
- * Get the path to the language files.
- *
- * @return string
- */
- public function langPath()
- {
- return $this->resourcePath().DIRECTORY_SEPARATOR.'lang';
- }
-
- /**
- * Get the path to the public / web directory.
- *
- * @return string
- */
- public function publicPath()
- {
- return $this->basePath.DIRECTORY_SEPARATOR.'public';
- }
-
- /**
- * Get the path to the storage directory.
- *
- * @return string
- */
- public function storagePath()
- {
- return $this->storagePath ?: $this->basePath.DIRECTORY_SEPARATOR.'storage';
- }
-
- /**
- * Set the storage directory.
- *
- * @param string $path
- * @return $this
- */
- public function useStoragePath($path)
- {
- $this->storagePath = $path;
-
- $this->instance('path.storage', $path);
-
- return $this;
- }
-
- /**
- * Get the path to the resources directory.
- *
- * @param string $path
- * @return string
- */
- public function resourcePath($path = '')
- {
- return $this->basePath.DIRECTORY_SEPARATOR.'resources'.($path ? DIRECTORY_SEPARATOR.$path : $path);
- }
-
- /**
- * Get the path to the environment file directory.
- *
- * @return string
- */
- public function environmentPath()
- {
- return $this->environmentPath ?: $this->basePath;
- }
-
- /**
- * Set the directory for the environment file.
- *
- * @param string $path
- * @return $this
- */
- public function useEnvironmentPath($path)
- {
- $this->environmentPath = $path;
-
- return $this;
- }
-
- /**
- * Set the environment file to be loaded during bootstrapping.
- *
- * @param string $file
- * @return $this
- */
- public function loadEnvironmentFrom($file)
- {
- $this->environmentFile = $file;
-
- return $this;
- }
-
- /**
- * Get the environment file the application is using.
- *
- * @return string
- */
- public function environmentFile()
- {
- return $this->environmentFile ?: '.env';
- }
-
- /**
- * Get the fully qualified path to the environment file.
- *
- * @return string
- */
- public function environmentFilePath()
- {
- return $this->environmentPath().DIRECTORY_SEPARATOR.$this->environmentFile();
- }
-
- /**
- * Get or check the current application environment.
- *
- * @return string|bool
- */
- public function environment()
- {
- if (func_num_args() > 0) {
- $patterns = is_array(func_get_arg(0)) ? func_get_arg(0) : func_get_args();
-
- return Str::is($patterns, $this['env']);
- }
-
- return $this['env'];
- }
-
- /**
- * Determine if application is in local environment.
- *
- * @return bool
- */
- public function isLocal()
- {
- return $this['env'] === 'local';
- }
-
- /**
- * Detect the application's current environment.
- *
- * @param \Closure $callback
- * @return string
- */
- public function detectEnvironment(Closure $callback)
- {
- $args = $_SERVER['argv'] ?? null;
-
- return $this['env'] = (new EnvironmentDetector)->detect($callback, $args);
- }
-
- /**
- * Determine if the application is running in the console.
- *
- * @return bool
- */
- public function runningInConsole()
- {
- if (isset($_ENV['APP_RUNNING_IN_CONSOLE'])) {
- return $_ENV['APP_RUNNING_IN_CONSOLE'] === 'true';
- }
-
- return php_sapi_name() === 'cli' || php_sapi_name() === 'phpdbg';
- }
-
- /**
- * Determine if the application is running unit tests.
- *
- * @return bool
- */
- public function runningUnitTests()
- {
- return $this['env'] === 'testing';
- }
-
- /**
- * Register all of the configured providers.
- *
- * @return void
- */
- public function registerConfiguredProviders()
- {
- $providers = Collection::make($this->config['app.providers'])
- ->partition(function ($provider) {
- return Str::startsWith($provider, 'Illuminate\\');
- });
-
- $providers->splice(1, 0, [$this->make(PackageManifest::class)->providers()]);
-
- (new ProviderRepository($this, new Filesystem, $this->getCachedServicesPath()))
- ->load($providers->collapse()->toArray());
- }
-
- /**
- * Register a service provider with the application.
- *
- * @param \Illuminate\Support\ServiceProvider|string $provider
- * @param bool $force
- * @return \Illuminate\Support\ServiceProvider
- */
- public function register($provider, $force = false)
- {
- if (($registered = $this->getProvider($provider)) && ! $force) {
- return $registered;
- }
-
- // If the given "provider" is a string, we will resolve it, passing in the
- // application instance automatically for the developer. This is simply
- // a more convenient way of specifying your service provider classes.
- if (is_string($provider)) {
- $provider = $this->resolveProvider($provider);
- }
-
- if (method_exists($provider, 'register')) {
- $provider->register();
- }
-
- // If there are bindings / singletons set as properties on the provider we
- // will spin through them and register them with the application, which
- // serves as a convenience layer while registering a lot of bindings.
- if (property_exists($provider, 'bindings')) {
- foreach ($provider->bindings as $key => $value) {
- $this->bind($key, $value);
- }
- }
-
- if (property_exists($provider, 'singletons')) {
- foreach ($provider->singletons as $key => $value) {
- $this->singleton($key, $value);
- }
- }
-
- $this->markAsRegistered($provider);
-
- // If the application has already booted, we will call this boot method on
- // the provider class so it has an opportunity to do its boot logic and
- // will be ready for any usage by this developer's application logic.
- if ($this->booted) {
- $this->bootProvider($provider);
- }
-
- return $provider;
- }
-
- /**
- * Get the registered service provider instance if it exists.
- *
- * @param \Illuminate\Support\ServiceProvider|string $provider
- * @return \Illuminate\Support\ServiceProvider|null
- */
- public function getProvider($provider)
- {
- return array_values($this->getProviders($provider))[0] ?? null;
- }
-
- /**
- * Get the registered service provider instances if any exist.
- *
- * @param \Illuminate\Support\ServiceProvider|string $provider
- * @return array
- */
- public function getProviders($provider)
- {
- $name = is_string($provider) ? $provider : get_class($provider);
-
- return Arr::where($this->serviceProviders, function ($value) use ($name) {
- return $value instanceof $name;
- });
- }
-
- /**
- * Resolve a service provider instance from the class name.
- *
- * @param string $provider
- * @return \Illuminate\Support\ServiceProvider
- */
- public function resolveProvider($provider)
- {
- return new $provider($this);
- }
-
- /**
- * Mark the given provider as registered.
- *
- * @param \Illuminate\Support\ServiceProvider $provider
- * @return void
- */
- protected function markAsRegistered($provider)
- {
- $this->serviceProviders[] = $provider;
-
- $this->loadedProviders[get_class($provider)] = true;
- }
-
- /**
- * Load and boot all of the remaining deferred providers.
- *
- * @return void
- */
- public function loadDeferredProviders()
- {
- // We will simply spin through each of the deferred providers and register each
- // one and boot them if the application has booted. This should make each of
- // the remaining services available to this application for immediate use.
- foreach ($this->deferredServices as $service => $provider) {
- $this->loadDeferredProvider($service);
- }
-
- $this->deferredServices = [];
- }
-
- /**
- * Load the provider for a deferred service.
- *
- * @param string $service
- * @return void
- */
- public function loadDeferredProvider($service)
- {
- if (! isset($this->deferredServices[$service])) {
- return;
- }
-
- $provider = $this->deferredServices[$service];
-
- // If the service provider has not already been loaded and registered we can
- // register it with the application and remove the service from this list
- // of deferred services, since it will already be loaded on subsequent.
- if (! isset($this->loadedProviders[$provider])) {
- $this->registerDeferredProvider($provider, $service);
- }
- }
-
- /**
- * Register a deferred provider and service.
- *
- * @param string $provider
- * @param string|null $service
- * @return void
- */
- public function registerDeferredProvider($provider, $service = null)
- {
- // Once the provider that provides the deferred service has been registered we
- // will remove it from our local list of the deferred services with related
- // providers so that this container does not try to resolve it out again.
- if ($service) {
- unset($this->deferredServices[$service]);
- }
-
- $this->register($instance = new $provider($this));
-
- if (! $this->booted) {
- $this->booting(function () use ($instance) {
- $this->bootProvider($instance);
- });
- }
- }
-
- /**
- * Resolve the given type from the container.
- *
- * (Overriding Container::make)
- *
- * @param string $abstract
- * @param array $parameters
- * @return mixed
- */
- public function make($abstract, array $parameters = [])
- {
- $abstract = $this->getAlias($abstract);
-
- if (isset($this->deferredServices[$abstract]) && ! isset($this->instances[$abstract])) {
- $this->loadDeferredProvider($abstract);
- }
-
- return parent::make($abstract, $parameters);
- }
-
- /**
- * Determine if the given abstract type has been bound.
- *
- * (Overriding Container::bound)
- *
- * @param string $abstract
- * @return bool
- */
- public function bound($abstract)
- {
- return isset($this->deferredServices[$abstract]) || parent::bound($abstract);
- }
-
- /**
- * Determine if the application has booted.
- *
- * @return bool
- */
- public function isBooted()
- {
- return $this->booted;
- }
-
- /**
- * Boot the application's service providers.
- *
- * @return void
- */
- public function boot()
- {
- if ($this->booted) {
- return;
- }
-
- // Once the application has booted we will also fire some "booted" callbacks
- // for any listeners that need to do work after this initial booting gets
- // finished. This is useful when ordering the boot-up processes we run.
- $this->fireAppCallbacks($this->bootingCallbacks);
-
- array_walk($this->serviceProviders, function ($p) {
- $this->bootProvider($p);
- });
-
- $this->booted = true;
-
- $this->fireAppCallbacks($this->bootedCallbacks);
- }
-
- /**
- * Boot the given service provider.
- *
- * @param \Illuminate\Support\ServiceProvider $provider
- * @return mixed
- */
- protected function bootProvider(ServiceProvider $provider)
- {
- if (method_exists($provider, 'boot')) {
- return $this->call([$provider, 'boot']);
- }
- }
-
- /**
- * Register a new boot listener.
- *
- * @param mixed $callback
- * @return void
- */
- public function booting($callback)
- {
- $this->bootingCallbacks[] = $callback;
- }
-
- /**
- * Register a new "booted" listener.
- *
- * @param mixed $callback
- * @return void
- */
- public function booted($callback)
- {
- $this->bootedCallbacks[] = $callback;
-
- if ($this->isBooted()) {
- $this->fireAppCallbacks([$callback]);
- }
- }
-
- /**
- * Call the booting callbacks for the application.
- *
- * @param array $callbacks
- * @return void
- */
- protected function fireAppCallbacks(array $callbacks)
- {
- foreach ($callbacks as $callback) {
- call_user_func($callback, $this);
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function handle(SymfonyRequest $request, $type = self::MASTER_REQUEST, $catch = true)
- {
- return $this[HttpKernelContract::class]->handle(Request::createFromBase($request));
- }
-
- /**
- * Determine if middleware has been disabled for the application.
- *
- * @return bool
- */
- public function shouldSkipMiddleware()
- {
- return $this->bound('middleware.disable') &&
- $this->make('middleware.disable') === true;
- }
-
- /**
- * Get the path to the cached services.php file.
- *
- * @return string
- */
- public function getCachedServicesPath()
- {
- return $this->bootstrapPath().'/cache/services.php';
- }
-
- /**
- * Get the path to the cached packages.php file.
- *
- * @return string
- */
- public function getCachedPackagesPath()
- {
- return $this->bootstrapPath().'/cache/packages.php';
- }
-
- /**
- * Determine if the application configuration is cached.
- *
- * @return bool
- */
- public function configurationIsCached()
- {
- return file_exists($this->getCachedConfigPath());
- }
-
- /**
- * Get the path to the configuration cache file.
- *
- * @return string
- */
- public function getCachedConfigPath()
- {
- return $_ENV['APP_CONFIG_CACHE'] ?? $this->bootstrapPath().'/cache/config.php';
- }
-
- /**
- * Determine if the application routes are cached.
- *
- * @return bool
- */
- public function routesAreCached()
- {
- return $this['files']->exists($this->getCachedRoutesPath());
- }
-
- /**
- * Get the path to the routes cache file.
- *
- * @return string
- */
- public function getCachedRoutesPath()
- {
- return $this->bootstrapPath().'/cache/routes.php';
- }
-
- /**
- * Determine if the application is currently down for maintenance.
- *
- * @return bool
- */
- public function isDownForMaintenance()
- {
- return file_exists($this->storagePath().'/framework/down');
- }
-
- /**
- * Throw an HttpException with the given data.
- *
- * @param int $code
- * @param string $message
- * @param array $headers
- * @return void
- *
- * @throws \Symfony\Component\HttpKernel\Exception\HttpException
- */
- public function abort($code, $message = '', array $headers = [])
- {
- if ($code == 404) {
- throw new NotFoundHttpException($message);
- }
-
- throw new HttpException($code, $message, null, $headers);
- }
-
- /**
- * Register a terminating callback with the application.
- *
- * @param \Closure $callback
- * @return $this
- */
- public function terminating(Closure $callback)
- {
- $this->terminatingCallbacks[] = $callback;
-
- return $this;
- }
-
- /**
- * Terminate the application.
- *
- * @return void
- */
- public function terminate()
- {
- foreach ($this->terminatingCallbacks as $terminating) {
- $this->call($terminating);
- }
- }
-
- /**
- * Get the service providers that have been loaded.
- *
- * @return array
- */
- public function getLoadedProviders()
- {
- return $this->loadedProviders;
- }
-
- /**
- * Get the application's deferred services.
- *
- * @return array
- */
- public function getDeferredServices()
- {
- return $this->deferredServices;
- }
-
- /**
- * Set the application's deferred services.
- *
- * @param array $services
- * @return void
- */
- public function setDeferredServices(array $services)
- {
- $this->deferredServices = $services;
- }
-
- /**
- * Add an array of services to the application's deferred services.
- *
- * @param array $services
- * @return void
- */
- public function addDeferredServices(array $services)
- {
- $this->deferredServices = array_merge($this->deferredServices, $services);
- }
-
- /**
- * Determine if the given service is a deferred service.
- *
- * @param string $service
- * @return bool
- */
- public function isDeferredService($service)
- {
- return isset($this->deferredServices[$service]);
- }
-
- /**
- * Configure the real-time facade namespace.
- *
- * @param string $namespace
- * @return void
- */
- public function provideFacades($namespace)
- {
- AliasLoader::setFacadeNamespace($namespace);
- }
-
- /**
- * Get the current application locale.
- *
- * @return string
- */
- public function getLocale()
- {
- return $this['config']->get('app.locale');
- }
-
- /**
- * Set the current application locale.
- *
- * @param string $locale
- * @return void
- */
- public function setLocale($locale)
- {
- $this['config']->set('app.locale', $locale);
-
- $this['translator']->setLocale($locale);
-
- $this['events']->dispatch(new Events\LocaleUpdated($locale));
- }
-
- /**
- * Determine if application locale is the given locale.
- *
- * @param string $locale
- * @return bool
- */
- public function isLocale($locale)
- {
- return $this->getLocale() == $locale;
- }
-
- /**
- * Register the core class aliases in the container.
- *
- * @return void
- */
- public function registerCoreContainerAliases()
- {
- foreach ([
- 'app' => [\Illuminate\Foundation\Application::class, \Illuminate\Contracts\Container\Container::class, \Illuminate\Contracts\Foundation\Application::class, \Psr\Container\ContainerInterface::class],
- 'auth' => [\Illuminate\Auth\AuthManager::class, \Illuminate\Contracts\Auth\Factory::class],
- 'auth.driver' => [\Illuminate\Contracts\Auth\Guard::class],
- 'blade.compiler' => [\Illuminate\View\Compilers\BladeCompiler::class],
- 'cache' => [\Illuminate\Cache\CacheManager::class, \Illuminate\Contracts\Cache\Factory::class],
- 'cache.store' => [\Illuminate\Cache\Repository::class, \Illuminate\Contracts\Cache\Repository::class],
- 'config' => [\Illuminate\Config\Repository::class, \Illuminate\Contracts\Config\Repository::class],
- 'cookie' => [\Illuminate\Cookie\CookieJar::class, \Illuminate\Contracts\Cookie\Factory::class, \Illuminate\Contracts\Cookie\QueueingFactory::class],
- 'encrypter' => [\Illuminate\Encryption\Encrypter::class, \Illuminate\Contracts\Encryption\Encrypter::class],
- 'db' => [\Illuminate\Database\DatabaseManager::class],
- 'db.connection' => [\Illuminate\Database\Connection::class, \Illuminate\Database\ConnectionInterface::class],
- 'events' => [\Illuminate\Events\Dispatcher::class, \Illuminate\Contracts\Events\Dispatcher::class],
- 'files' => [\Illuminate\Filesystem\Filesystem::class],
- 'filesystem' => [\Illuminate\Filesystem\FilesystemManager::class, \Illuminate\Contracts\Filesystem\Factory::class],
- 'filesystem.disk' => [\Illuminate\Contracts\Filesystem\Filesystem::class],
- 'filesystem.cloud' => [\Illuminate\Contracts\Filesystem\Cloud::class],
- 'hash' => [\Illuminate\Hashing\HashManager::class],
- 'hash.driver' => [\Illuminate\Contracts\Hashing\Hasher::class],
- 'translator' => [\Illuminate\Translation\Translator::class, \Illuminate\Contracts\Translation\Translator::class],
- 'log' => [\Illuminate\Log\LogManager::class, \Psr\Log\LoggerInterface::class],
- 'mailer' => [\Illuminate\Mail\Mailer::class, \Illuminate\Contracts\Mail\Mailer::class, \Illuminate\Contracts\Mail\MailQueue::class],
- 'auth.password' => [\Illuminate\Auth\Passwords\PasswordBrokerManager::class, \Illuminate\Contracts\Auth\PasswordBrokerFactory::class],
- 'auth.password.broker' => [\Illuminate\Auth\Passwords\PasswordBroker::class, \Illuminate\Contracts\Auth\PasswordBroker::class],
- 'queue' => [\Illuminate\Queue\QueueManager::class, \Illuminate\Contracts\Queue\Factory::class, \Illuminate\Contracts\Queue\Monitor::class],
- 'queue.connection' => [\Illuminate\Contracts\Queue\Queue::class],
- 'queue.failer' => [\Illuminate\Queue\Failed\FailedJobProviderInterface::class],
- 'redirect' => [\Illuminate\Routing\Redirector::class],
- 'redis' => [\Illuminate\Redis\RedisManager::class, \Illuminate\Contracts\Redis\Factory::class],
- 'request' => [\Illuminate\Http\Request::class, \Symfony\Component\HttpFoundation\Request::class],
- 'router' => [\Illuminate\Routing\Router::class, \Illuminate\Contracts\Routing\Registrar::class, \Illuminate\Contracts\Routing\BindingRegistrar::class],
- 'session' => [\Illuminate\Session\SessionManager::class],
- 'session.store' => [\Illuminate\Session\Store::class, \Illuminate\Contracts\Session\Session::class],
- 'url' => [\Illuminate\Routing\UrlGenerator::class, \Illuminate\Contracts\Routing\UrlGenerator::class],
- 'validator' => [\Illuminate\Validation\Factory::class, \Illuminate\Contracts\Validation\Factory::class],
- 'view' => [\Illuminate\View\Factory::class, \Illuminate\Contracts\View\Factory::class],
- ] as $key => $aliases) {
- foreach ($aliases as $alias) {
- $this->alias($key, $alias);
- }
- }
- }
-
- /**
- * Flush the container of all bindings and resolved instances.
- *
- * @return void
- */
- public function flush()
- {
- parent::flush();
-
- $this->buildStack = [];
- $this->loadedProviders = [];
- $this->bootedCallbacks = [];
- $this->bootingCallbacks = [];
- $this->deferredServices = [];
- $this->reboundCallbacks = [];
- $this->serviceProviders = [];
- $this->resolvingCallbacks = [];
- $this->afterResolvingCallbacks = [];
- $this->globalResolvingCallbacks = [];
- }
-
- /**
- * Get the application namespace.
- *
- * @return string
- *
- * @throws \RuntimeException
- */
- public function getNamespace()
- {
- if (! is_null($this->namespace)) {
- return $this->namespace;
- }
-
- $composer = json_decode(file_get_contents(base_path('composer.json')), true);
-
- foreach ((array) data_get($composer, 'autoload.psr-4') as $namespace => $path) {
- foreach ((array) $path as $pathChoice) {
- if (realpath(app_path()) == realpath(base_path().'/'.$pathChoice)) {
- return $this->namespace = $namespace;
- }
- }
- }
-
- throw new RuntimeException('Unable to detect application namespace.');
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/Access/Authorizable.php b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/Access/Authorizable.php
deleted file mode 100644
index 9e8e33b..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/Access/Authorizable.php
+++ /dev/null
@@ -1,44 +0,0 @@
-forUser($this)->check($ability, $arguments);
- }
-
- /**
- * Determine if the entity does not have a given ability.
- *
- * @param string $ability
- * @param array|mixed $arguments
- * @return bool
- */
- public function cant($ability, $arguments = [])
- {
- return ! $this->can($ability, $arguments);
- }
-
- /**
- * Determine if the entity does not have a given ability.
- *
- * @param string $ability
- * @param array|mixed $arguments
- * @return bool
- */
- public function cannot($ability, $arguments = [])
- {
- return $this->cant($ability, $arguments);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/Access/AuthorizesRequests.php b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/Access/AuthorizesRequests.php
deleted file mode 100644
index 9930d90..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/Access/AuthorizesRequests.php
+++ /dev/null
@@ -1,126 +0,0 @@
-parseAbilityAndArguments($ability, $arguments);
-
- return app(Gate::class)->authorize($ability, $arguments);
- }
-
- /**
- * Authorize a given action for a user.
- *
- * @param \Illuminate\Contracts\Auth\Authenticatable|mixed $user
- * @param mixed $ability
- * @param mixed|array $arguments
- * @return \Illuminate\Auth\Access\Response
- *
- * @throws \Illuminate\Auth\Access\AuthorizationException
- */
- public function authorizeForUser($user, $ability, $arguments = [])
- {
- [$ability, $arguments] = $this->parseAbilityAndArguments($ability, $arguments);
-
- return app(Gate::class)->forUser($user)->authorize($ability, $arguments);
- }
-
- /**
- * Guesses the ability's name if it wasn't provided.
- *
- * @param mixed $ability
- * @param mixed|array $arguments
- * @return array
- */
- protected function parseAbilityAndArguments($ability, $arguments)
- {
- if (is_string($ability) && strpos($ability, '\\') === false) {
- return [$ability, $arguments];
- }
-
- $method = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3)[2]['function'];
-
- return [$this->normalizeGuessedAbilityName($method), $ability];
- }
-
- /**
- * Normalize the ability name that has been guessed from the method name.
- *
- * @param string $ability
- * @return string
- */
- protected function normalizeGuessedAbilityName($ability)
- {
- $map = $this->resourceAbilityMap();
-
- return $map[$ability] ?? $ability;
- }
-
- /**
- * Authorize a resource action based on the incoming request.
- *
- * @param string $model
- * @param string|null $parameter
- * @param array $options
- * @param \Illuminate\Http\Request|null $request
- * @return void
- */
- public function authorizeResource($model, $parameter = null, array $options = [], $request = null)
- {
- $parameter = $parameter ?: Str::snake(class_basename($model));
-
- $middleware = [];
-
- foreach ($this->resourceAbilityMap() as $method => $ability) {
- $modelName = in_array($method, $this->resourceMethodsWithoutModels()) ? $model : $parameter;
-
- $middleware["can:{$ability},{$modelName}"][] = $method;
- }
-
- foreach ($middleware as $middlewareName => $methods) {
- $this->middleware($middlewareName, $options)->only($methods);
- }
- }
-
- /**
- * Get the map of resource methods to ability names.
- *
- * @return array
- */
- protected function resourceAbilityMap()
- {
- return [
- 'show' => 'view',
- 'create' => 'create',
- 'store' => 'create',
- 'edit' => 'update',
- 'update' => 'update',
- 'destroy' => 'delete',
- ];
- }
-
- /**
- * Get the list of resource methods which do not have model parameters.
- *
- * @return array
- */
- protected function resourceMethodsWithoutModels()
- {
- return ['index', 'create', 'store'];
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/AuthenticatesUsers.php b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/AuthenticatesUsers.php
deleted file mode 100644
index 6ee7171..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/AuthenticatesUsers.php
+++ /dev/null
@@ -1,184 +0,0 @@
-validateLogin($request);
-
- // If the class is using the ThrottlesLogins trait, we can automatically throttle
- // the login attempts for this application. We'll key this by the username and
- // the IP address of the client making these requests into this application.
- if ($this->hasTooManyLoginAttempts($request)) {
- $this->fireLockoutEvent($request);
-
- return $this->sendLockoutResponse($request);
- }
-
- if ($this->attemptLogin($request)) {
- return $this->sendLoginResponse($request);
- }
-
- // If the login attempt was unsuccessful we will increment the number of attempts
- // to login and redirect the user back to the login form. Of course, when this
- // user surpasses their maximum number of attempts they will get locked out.
- $this->incrementLoginAttempts($request);
-
- return $this->sendFailedLoginResponse($request);
- }
-
- /**
- * Validate the user login request.
- *
- * @param \Illuminate\Http\Request $request
- * @return void
- *
- * @throws \Illuminate\Validation\ValidationException
- */
- protected function validateLogin(Request $request)
- {
- $request->validate([
- $this->username() => 'required|string',
- 'password' => 'required|string',
- ]);
- }
-
- /**
- * Attempt to log the user into the application.
- *
- * @param \Illuminate\Http\Request $request
- * @return bool
- */
- protected function attemptLogin(Request $request)
- {
- return $this->guard()->attempt(
- $this->credentials($request), $request->filled('remember')
- );
- }
-
- /**
- * Get the needed authorization credentials from the request.
- *
- * @param \Illuminate\Http\Request $request
- * @return array
- */
- protected function credentials(Request $request)
- {
- return $request->only($this->username(), 'password');
- }
-
- /**
- * Send the response after the user was authenticated.
- *
- * @param \Illuminate\Http\Request $request
- * @return \Illuminate\Http\Response
- */
- protected function sendLoginResponse(Request $request)
- {
- $request->session()->regenerate();
-
- $this->clearLoginAttempts($request);
-
- return $this->authenticated($request, $this->guard()->user())
- ?: redirect()->intended($this->redirectPath());
- }
-
- /**
- * The user has been authenticated.
- *
- * @param \Illuminate\Http\Request $request
- * @param mixed $user
- * @return mixed
- */
- protected function authenticated(Request $request, $user)
- {
- //
- }
-
- /**
- * Get the failed login response instance.
- *
- * @param \Illuminate\Http\Request $request
- * @return \Symfony\Component\HttpFoundation\Response
- *
- * @throws \Illuminate\Validation\ValidationException
- */
- protected function sendFailedLoginResponse(Request $request)
- {
- throw ValidationException::withMessages([
- $this->username() => [trans('auth.failed')],
- ]);
- }
-
- /**
- * Get the login username to be used by the controller.
- *
- * @return string
- */
- public function username()
- {
- return 'email';
- }
-
- /**
- * Log the user out of the application.
- *
- * @param \Illuminate\Http\Request $request
- * @return \Illuminate\Http\Response
- */
- public function logout(Request $request)
- {
- $this->guard()->logout();
-
- $request->session()->invalidate();
-
- return $this->loggedOut($request) ?: redirect('/');
- }
-
- /**
- * The user has logged out of the application.
- *
- * @param \Illuminate\Http\Request $request
- * @return mixed
- */
- protected function loggedOut(Request $request)
- {
- //
- }
-
- /**
- * Get the guard to be used during authentication.
- *
- * @return \Illuminate\Contracts\Auth\StatefulGuard
- */
- protected function guard()
- {
- return Auth::guard();
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/RedirectsUsers.php b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/RedirectsUsers.php
deleted file mode 100644
index cc99229..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/RedirectsUsers.php
+++ /dev/null
@@ -1,20 +0,0 @@
-redirectTo();
- }
-
- return property_exists($this, 'redirectTo') ? $this->redirectTo : '/home';
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/RegistersUsers.php b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/RegistersUsers.php
deleted file mode 100644
index f3238f2..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/RegistersUsers.php
+++ /dev/null
@@ -1,62 +0,0 @@
-validator($request->all())->validate();
-
- event(new Registered($user = $this->create($request->all())));
-
- $this->guard()->login($user);
-
- return $this->registered($request, $user)
- ?: redirect($this->redirectPath());
- }
-
- /**
- * Get the guard to be used during registration.
- *
- * @return \Illuminate\Contracts\Auth\StatefulGuard
- */
- protected function guard()
- {
- return Auth::guard();
- }
-
- /**
- * The user has been registered.
- *
- * @param \Illuminate\Http\Request $request
- * @param mixed $user
- * @return mixed
- */
- protected function registered(Request $request, $user)
- {
- //
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/ResetsPasswords.php b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/ResetsPasswords.php
deleted file mode 100644
index 3cf5af9..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/ResetsPasswords.php
+++ /dev/null
@@ -1,162 +0,0 @@
-with(
- ['token' => $token, 'email' => $request->email]
- );
- }
-
- /**
- * Reset the given user's password.
- *
- * @param \Illuminate\Http\Request $request
- * @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\JsonResponse
- */
- public function reset(Request $request)
- {
- $request->validate($this->rules(), $this->validationErrorMessages());
-
- // Here we will attempt to reset the user's password. If it is successful we
- // will update the password on an actual user model and persist it to the
- // database. Otherwise we will parse the error and return the response.
- $response = $this->broker()->reset(
- $this->credentials($request), function ($user, $password) {
- $this->resetPassword($user, $password);
- }
- );
-
- // If the password was successfully reset, we will redirect the user back to
- // the application's home authenticated view. If there is an error we can
- // redirect them back to where they came from with their error message.
- return $response == Password::PASSWORD_RESET
- ? $this->sendResetResponse($request, $response)
- : $this->sendResetFailedResponse($request, $response);
- }
-
- /**
- * Get the password reset validation rules.
- *
- * @return array
- */
- protected function rules()
- {
- return [
- 'token' => 'required',
- 'email' => 'required|email',
- 'password' => 'required|confirmed|min:6',
- ];
- }
-
- /**
- * Get the password reset validation error messages.
- *
- * @return array
- */
- protected function validationErrorMessages()
- {
- return [];
- }
-
- /**
- * Get the password reset credentials from the request.
- *
- * @param \Illuminate\Http\Request $request
- * @return array
- */
- protected function credentials(Request $request)
- {
- return $request->only(
- 'email', 'password', 'password_confirmation', 'token'
- );
- }
-
- /**
- * Reset the given user's password.
- *
- * @param \Illuminate\Contracts\Auth\CanResetPassword $user
- * @param string $password
- * @return void
- */
- protected function resetPassword($user, $password)
- {
- $user->password = Hash::make($password);
-
- $user->setRememberToken(Str::random(60));
-
- $user->save();
-
- event(new PasswordReset($user));
-
- $this->guard()->login($user);
- }
-
- /**
- * Get the response for a successful password reset.
- *
- * @param \Illuminate\Http\Request $request
- * @param string $response
- * @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\JsonResponse
- */
- protected function sendResetResponse(Request $request, $response)
- {
- return redirect($this->redirectPath())
- ->with('status', trans($response));
- }
-
- /**
- * Get the response for a failed password reset.
- *
- * @param \Illuminate\Http\Request $request
- * @param string $response
- * @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\JsonResponse
- */
- protected function sendResetFailedResponse(Request $request, $response)
- {
- return redirect()->back()
- ->withInput($request->only('email'))
- ->withErrors(['email' => trans($response)]);
- }
-
- /**
- * Get the broker to be used during password reset.
- *
- * @return \Illuminate\Contracts\Auth\PasswordBroker
- */
- public function broker()
- {
- return Password::broker();
- }
-
- /**
- * Get the guard to be used during password reset.
- *
- * @return \Illuminate\Contracts\Auth\StatefulGuard
- */
- protected function guard()
- {
- return Auth::guard();
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/SendsPasswordResetEmails.php b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/SendsPasswordResetEmails.php
deleted file mode 100644
index 52d77cc..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/SendsPasswordResetEmails.php
+++ /dev/null
@@ -1,88 +0,0 @@
-validateEmail($request);
-
- // We will send the password reset link to this user. Once we have attempted
- // to send the link, we will examine the response then see the message we
- // need to show to the user. Finally, we'll send out a proper response.
- $response = $this->broker()->sendResetLink(
- $request->only('email')
- );
-
- return $response == Password::RESET_LINK_SENT
- ? $this->sendResetLinkResponse($request, $response)
- : $this->sendResetLinkFailedResponse($request, $response);
- }
-
- /**
- * Validate the email for the given request.
- *
- * @param \Illuminate\Http\Request $request
- * @return void
- */
- protected function validateEmail(Request $request)
- {
- $request->validate(['email' => 'required|email']);
- }
-
- /**
- * Get the response for a successful password reset link.
- *
- * @param \Illuminate\Http\Request $request
- * @param string $response
- * @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\JsonResponse
- */
- protected function sendResetLinkResponse(Request $request, $response)
- {
- return back()->with('status', trans($response));
- }
-
- /**
- * Get the response for a failed password reset link.
- *
- * @param \Illuminate\Http\Request $request
- * @param string $response
- * @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\JsonResponse
- */
- protected function sendResetLinkFailedResponse(Request $request, $response)
- {
- return back()
- ->withInput($request->only('email'))
- ->withErrors(['email' => trans($response)]);
- }
-
- /**
- * Get the broker to be used during password reset.
- *
- * @return \Illuminate\Contracts\Auth\PasswordBroker
- */
- public function broker()
- {
- return Password::broker();
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/ThrottlesLogins.php b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/ThrottlesLogins.php
deleted file mode 100644
index 1dca25c..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/ThrottlesLogins.php
+++ /dev/null
@@ -1,121 +0,0 @@
-limiter()->tooManyAttempts(
- $this->throttleKey($request), $this->maxAttempts()
- );
- }
-
- /**
- * Increment the login attempts for the user.
- *
- * @param \Illuminate\Http\Request $request
- * @return void
- */
- protected function incrementLoginAttempts(Request $request)
- {
- $this->limiter()->hit(
- $this->throttleKey($request), $this->decayMinutes()
- );
- }
-
- /**
- * Redirect the user after determining they are locked out.
- *
- * @param \Illuminate\Http\Request $request
- * @return void
- *
- * @throws \Illuminate\Validation\ValidationException
- */
- protected function sendLockoutResponse(Request $request)
- {
- $seconds = $this->limiter()->availableIn(
- $this->throttleKey($request)
- );
-
- throw ValidationException::withMessages([
- $this->username() => [Lang::get('auth.throttle', ['seconds' => $seconds])],
- ])->status(429);
- }
-
- /**
- * Clear the login locks for the given user credentials.
- *
- * @param \Illuminate\Http\Request $request
- * @return void
- */
- protected function clearLoginAttempts(Request $request)
- {
- $this->limiter()->clear($this->throttleKey($request));
- }
-
- /**
- * Fire an event when a lockout occurs.
- *
- * @param \Illuminate\Http\Request $request
- * @return void
- */
- protected function fireLockoutEvent(Request $request)
- {
- event(new Lockout($request));
- }
-
- /**
- * Get the throttle key for the given request.
- *
- * @param \Illuminate\Http\Request $request
- * @return string
- */
- protected function throttleKey(Request $request)
- {
- return Str::lower($request->input($this->username())).'|'.$request->ip();
- }
-
- /**
- * Get the rate limiter instance.
- *
- * @return \Illuminate\Cache\RateLimiter
- */
- protected function limiter()
- {
- return app(RateLimiter::class);
- }
-
- /**
- * Get the maximum number of attempts to allow.
- *
- * @return int
- */
- public function maxAttempts()
- {
- return property_exists($this, 'maxAttempts') ? $this->maxAttempts : 5;
- }
-
- /**
- * Get the number of minutes to throttle for.
- *
- * @return int
- */
- public function decayMinutes()
- {
- return property_exists($this, 'decayMinutes') ? $this->decayMinutes : 1;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/User.php b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/User.php
deleted file mode 100644
index c816436..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/User.php
+++ /dev/null
@@ -1,20 +0,0 @@
-user()->hasVerifiedEmail()
- ? redirect($this->redirectPath())
- : view('auth.verify');
- }
-
- /**
- * Mark the authenticated user's email address as verified.
- *
- * @param \Illuminate\Http\Request $request
- * @return \Illuminate\Http\Response
- * @throws \Illuminate\Auth\Access\AuthorizationException
- */
- public function verify(Request $request)
- {
- if ($request->route('id') != $request->user()->getKey()) {
- throw new AuthorizationException;
- }
-
- if ($request->user()->hasVerifiedEmail()) {
- return redirect($this->redirectPath());
- }
-
- if ($request->user()->markEmailAsVerified()) {
- event(new Verified($request->user()));
- }
-
- return redirect($this->redirectPath())->with('verified', true);
- }
-
- /**
- * Resend the email verification notification.
- *
- * @param \Illuminate\Http\Request $request
- * @return \Illuminate\Http\Response
- */
- public function resend(Request $request)
- {
- if ($request->user()->hasVerifiedEmail()) {
- return redirect($this->redirectPath());
- }
-
- $request->user()->sendEmailVerificationNotification();
-
- return back()->with('resent', true);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php b/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php
deleted file mode 100644
index 2c0bcb0..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php
+++ /dev/null
@@ -1,19 +0,0 @@
-boot();
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php b/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php
deleted file mode 100644
index b7edb68..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php
+++ /dev/null
@@ -1,161 +0,0 @@
-app = $app;
-
- error_reporting(-1);
-
- set_error_handler([$this, 'handleError']);
-
- set_exception_handler([$this, 'handleException']);
-
- register_shutdown_function([$this, 'handleShutdown']);
-
- if (! $app->environment('testing')) {
- ini_set('display_errors', 'Off');
- }
- }
-
- /**
- * Convert PHP errors to ErrorException instances.
- *
- * @param int $level
- * @param string $message
- * @param string $file
- * @param int $line
- * @param array $context
- * @return void
- *
- * @throws \ErrorException
- */
- public function handleError($level, $message, $file = '', $line = 0, $context = [])
- {
- if (error_reporting() & $level) {
- throw new ErrorException($message, 0, $level, $file, $line);
- }
- }
-
- /**
- * Handle an uncaught exception from the application.
- *
- * Note: Most exceptions can be handled via the try / catch block in
- * the HTTP and Console kernels. But, fatal error exceptions must
- * be handled differently since they are not normal exceptions.
- *
- * @param \Throwable $e
- * @return void
- */
- public function handleException($e)
- {
- if (! $e instanceof Exception) {
- $e = new FatalThrowableError($e);
- }
-
- try {
- $this->getExceptionHandler()->report($e);
- } catch (Exception $e) {
- //
- }
-
- if ($this->app->runningInConsole()) {
- $this->renderForConsole($e);
- } else {
- $this->renderHttpResponse($e);
- }
- }
-
- /**
- * Render an exception to the console.
- *
- * @param \Exception $e
- * @return void
- */
- protected function renderForConsole(Exception $e)
- {
- $this->getExceptionHandler()->renderForConsole(new ConsoleOutput, $e);
- }
-
- /**
- * Render an exception as an HTTP response and send it.
- *
- * @param \Exception $e
- * @return void
- */
- protected function renderHttpResponse(Exception $e)
- {
- $this->getExceptionHandler()->render($this->app['request'], $e)->send();
- }
-
- /**
- * Handle the PHP shutdown event.
- *
- * @return void
- */
- public function handleShutdown()
- {
- if (! is_null($error = error_get_last()) && $this->isFatal($error['type'])) {
- $this->handleException($this->fatalExceptionFromError($error, 0));
- }
- }
-
- /**
- * Create a new fatal exception instance from an error array.
- *
- * @param array $error
- * @param int|null $traceOffset
- * @return \Symfony\Component\Debug\Exception\FatalErrorException
- */
- protected function fatalExceptionFromError(array $error, $traceOffset = null)
- {
- return new FatalErrorException(
- $error['message'], $error['type'], 0, $error['file'], $error['line'], $traceOffset
- );
- }
-
- /**
- * Determine if the error type is fatal.
- *
- * @param int $type
- * @return bool
- */
- protected function isFatal($type)
- {
- return in_array($type, [E_COMPILE_ERROR, E_CORE_ERROR, E_ERROR, E_PARSE]);
- }
-
- /**
- * Get an instance of the exception handler.
- *
- * @return \Illuminate\Contracts\Debug\ExceptionHandler
- */
- protected function getExceptionHandler()
- {
- return $this->app->make(ExceptionHandler::class);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php b/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php
deleted file mode 100644
index 8f4653d..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php
+++ /dev/null
@@ -1,116 +0,0 @@
-getCachedConfigPath())) {
- $items = require $cached;
-
- $loadedFromCache = true;
- }
-
- // Next we will spin through all of the configuration files in the configuration
- // directory and load each one into the repository. This will make all of the
- // options available to the developer for use in various parts of this app.
- $app->instance('config', $config = new Repository($items));
-
- if (! isset($loadedFromCache)) {
- $this->loadConfigurationFiles($app, $config);
- }
-
- // Finally, we will set the application's environment based on the configuration
- // values that were loaded. We will pass a callback which will be used to get
- // the environment in a web context where an "--env" switch is not present.
- $app->detectEnvironment(function () use ($config) {
- return $config->get('app.env', 'production');
- });
-
- date_default_timezone_set($config->get('app.timezone', 'UTC'));
-
- mb_internal_encoding('UTF-8');
- }
-
- /**
- * Load the configuration items from all of the files.
- *
- * @param \Illuminate\Contracts\Foundation\Application $app
- * @param \Illuminate\Contracts\Config\Repository $repository
- * @return void
- *
- * @throws \Exception
- */
- protected function loadConfigurationFiles(Application $app, RepositoryContract $repository)
- {
- $files = $this->getConfigurationFiles($app);
-
- if (! isset($files['app'])) {
- throw new Exception('Unable to load the "app" configuration file.');
- }
-
- foreach ($files as $key => $path) {
- $repository->set($key, require $path);
- }
- }
-
- /**
- * Get all of the configuration files for the application.
- *
- * @param \Illuminate\Contracts\Foundation\Application $app
- * @return array
- */
- protected function getConfigurationFiles(Application $app)
- {
- $files = [];
-
- $configPath = realpath($app->configPath());
-
- foreach (Finder::create()->files()->name('*.php')->in($configPath) as $file) {
- $directory = $this->getNestedDirectory($file, $configPath);
-
- $files[$directory.basename($file->getRealPath(), '.php')] = $file->getRealPath();
- }
-
- ksort($files, SORT_NATURAL);
-
- return $files;
- }
-
- /**
- * Get the configuration file nesting path.
- *
- * @param \SplFileInfo $file
- * @param string $configPath
- * @return string
- */
- protected function getNestedDirectory(SplFileInfo $file, $configPath)
- {
- $directory = $file->getPath();
-
- if ($nested = trim(str_replace($configPath, '', $directory), DIRECTORY_SEPARATOR)) {
- $nested = str_replace(DIRECTORY_SEPARATOR, '.', $nested).'.';
- }
-
- return $nested;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadEnvironmentVariables.php b/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadEnvironmentVariables.php
deleted file mode 100644
index 6eeb735..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadEnvironmentVariables.php
+++ /dev/null
@@ -1,79 +0,0 @@
-configurationIsCached()) {
- return;
- }
-
- $this->checkForSpecificEnvironmentFile($app);
-
- try {
- (new Dotenv($app->environmentPath(), $app->environmentFile()))->load();
- } catch (InvalidPathException $e) {
- //
- } catch (InvalidFileException $e) {
- echo 'The environment file is invalid: '.$e->getMessage();
- die(1);
- }
- }
-
- /**
- * Detect if a custom environment file matching the APP_ENV exists.
- *
- * @param \Illuminate\Contracts\Foundation\Application $app
- * @return void
- */
- protected function checkForSpecificEnvironmentFile($app)
- {
- if ($app->runningInConsole() && ($input = new ArgvInput)->hasParameterOption('--env')) {
- if ($this->setEnvironmentFilePath(
- $app, $app->environmentFile().'.'.$input->getParameterOption('--env')
- )) {
- return;
- }
- }
-
- if (! env('APP_ENV')) {
- return;
- }
-
- $this->setEnvironmentFilePath(
- $app, $app->environmentFile().'.'.env('APP_ENV')
- );
- }
-
- /**
- * Load a custom environment file.
- *
- * @param \Illuminate\Contracts\Foundation\Application $app
- * @param string $file
- * @return bool
- */
- protected function setEnvironmentFilePath($app, $file)
- {
- if (file_exists($app->environmentPath().'/'.$file)) {
- $app->loadEnvironmentFrom($file);
-
- return true;
- }
-
- return false;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterFacades.php b/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterFacades.php
deleted file mode 100644
index 62a42d0..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterFacades.php
+++ /dev/null
@@ -1,29 +0,0 @@
-make('config')->get('app.aliases', []),
- $app->make(PackageManifest::class)->aliases()
- ))->register();
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php b/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php
deleted file mode 100644
index f18375c..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php
+++ /dev/null
@@ -1,19 +0,0 @@
-registerConfiguredProviders();
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/SetRequestForConsole.php b/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/SetRequestForConsole.php
deleted file mode 100644
index fda735b..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/SetRequestForConsole.php
+++ /dev/null
@@ -1,35 +0,0 @@
-make('config')->get('app.url', 'http://localhost');
-
- $components = parse_url($uri);
-
- $server = $_SERVER;
-
- if (isset($components['path'])) {
- $server = array_merge($server, [
- 'SCRIPT_FILENAME' => $components['path'],
- 'SCRIPT_NAME' => $components['path'],
- ]);
- }
-
- $app->instance('request', Request::create(
- $uri, 'GET', [], [], [], $server
- ));
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Bus/Dispatchable.php b/vendor/laravel/framework/src/Illuminate/Foundation/Bus/Dispatchable.php
deleted file mode 100644
index 6dd992e..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Bus/Dispatchable.php
+++ /dev/null
@@ -1,39 +0,0 @@
-dispatchNow(new static(...func_get_args()));
- }
-
- /**
- * Set the jobs that should run if this job is successful.
- *
- * @param array $chain
- * @return \Illuminate\Foundation\Bus\PendingChain
- */
- public static function withChain($chain)
- {
- return new PendingChain(static::class, $chain);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Bus/DispatchesJobs.php b/vendor/laravel/framework/src/Illuminate/Foundation/Bus/DispatchesJobs.php
deleted file mode 100644
index 46d6e5b..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Bus/DispatchesJobs.php
+++ /dev/null
@@ -1,30 +0,0 @@
-dispatch($job);
- }
-
- /**
- * Dispatch a job to its appropriate handler in the current process.
- *
- * @param mixed $job
- * @return mixed
- */
- public function dispatchNow($job)
- {
- return app(Dispatcher::class)->dispatchNow($job);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Bus/PendingChain.php b/vendor/laravel/framework/src/Illuminate/Foundation/Bus/PendingChain.php
deleted file mode 100644
index b345536..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Bus/PendingChain.php
+++ /dev/null
@@ -1,45 +0,0 @@
-class = $class;
- $this->chain = $chain;
- }
-
- /**
- * Dispatch the job with the given arguments.
- *
- * @return \Illuminate\Foundation\Bus\PendingDispatch
- */
- public function dispatch()
- {
- return (new PendingDispatch(
- new $this->class(...func_get_args())
- ))->chain($this->chain);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Bus/PendingDispatch.php b/vendor/laravel/framework/src/Illuminate/Foundation/Bus/PendingDispatch.php
deleted file mode 100644
index 8ae625a..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Bus/PendingDispatch.php
+++ /dev/null
@@ -1,114 +0,0 @@
-job = $job;
- }
-
- /**
- * Set the desired connection for the job.
- *
- * @param string|null $connection
- * @return $this
- */
- public function onConnection($connection)
- {
- $this->job->onConnection($connection);
-
- return $this;
- }
-
- /**
- * Set the desired queue for the job.
- *
- * @param string|null $queue
- * @return $this
- */
- public function onQueue($queue)
- {
- $this->job->onQueue($queue);
-
- return $this;
- }
-
- /**
- * Set the desired connection for the chain.
- *
- * @param string|null $connection
- * @return $this
- */
- public function allOnConnection($connection)
- {
- $this->job->allOnConnection($connection);
-
- return $this;
- }
-
- /**
- * Set the desired queue for the chain.
- *
- * @param string|null $queue
- * @return $this
- */
- public function allOnQueue($queue)
- {
- $this->job->allOnQueue($queue);
-
- return $this;
- }
-
- /**
- * Set the desired delay for the job.
- *
- * @param \DateTime|int|null $delay
- * @return $this
- */
- public function delay($delay)
- {
- $this->job->delay($delay);
-
- return $this;
- }
-
- /**
- * Set the jobs that should run if this job is successful.
- *
- * @param array $chain
- * @return $this
- */
- public function chain($chain)
- {
- $this->job->chain($chain);
-
- return $this;
- }
-
- /**
- * Handle the object's destruction.
- *
- * @return void
- */
- public function __destruct()
- {
- app(Dispatcher::class)->dispatch($this->job);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/ComposerScripts.php b/vendor/laravel/framework/src/Illuminate/Foundation/ComposerScripts.php
deleted file mode 100644
index fcda187..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/ComposerScripts.php
+++ /dev/null
@@ -1,65 +0,0 @@
-getComposer()->getConfig()->get('vendor-dir').'/autoload.php';
-
- static::clearCompiled();
- }
-
- /**
- * Handle the post-update Composer event.
- *
- * @param \Composer\Script\Event $event
- * @return void
- */
- public static function postUpdate(Event $event)
- {
- require_once $event->getComposer()->getConfig()->get('vendor-dir').'/autoload.php';
-
- static::clearCompiled();
- }
-
- /**
- * Handle the post-autoload-dump Composer event.
- *
- * @param \Composer\Script\Event $event
- * @return void
- */
- public static function postAutoloadDump(Event $event)
- {
- require_once $event->getComposer()->getConfig()->get('vendor-dir').'/autoload.php';
-
- static::clearCompiled();
- }
-
- /**
- * Clear the cached Laravel bootstrapping files.
- *
- * @return void
- */
- protected static function clearCompiled()
- {
- $laravel = new Application(getcwd());
-
- if (file_exists($servicesPath = $laravel->getCachedServicesPath())) {
- @unlink($servicesPath);
- }
-
- if (file_exists($packagesPath = $laravel->getCachedPackagesPath())) {
- @unlink($packagesPath);
- }
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/AppNameCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/AppNameCommand.php
deleted file mode 100644
index 1c0d359..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/AppNameCommand.php
+++ /dev/null
@@ -1,296 +0,0 @@
-files = $files;
- $this->composer = $composer;
- }
-
- /**
- * Execute the console command.
- *
- * @return void
- */
- public function handle()
- {
- $this->currentRoot = trim($this->laravel->getNamespace(), '\\');
-
- $this->setAppDirectoryNamespace();
- $this->setBootstrapNamespaces();
- $this->setConfigNamespaces();
- $this->setComposerNamespace();
- $this->setDatabaseFactoryNamespaces();
-
- $this->info('Application namespace set!');
-
- $this->composer->dumpAutoloads();
-
- $this->call('optimize:clear');
- }
-
- /**
- * Set the namespace on the files in the app directory.
- *
- * @return void
- */
- protected function setAppDirectoryNamespace()
- {
- $files = Finder::create()
- ->in($this->laravel['path'])
- ->contains($this->currentRoot)
- ->name('*.php');
-
- foreach ($files as $file) {
- $this->replaceNamespace($file->getRealPath());
- }
- }
-
- /**
- * Replace the App namespace at the given path.
- *
- * @param string $path
- * @return void
- */
- protected function replaceNamespace($path)
- {
- $search = [
- 'namespace '.$this->currentRoot.';',
- $this->currentRoot.'\\',
- ];
-
- $replace = [
- 'namespace '.$this->argument('name').';',
- $this->argument('name').'\\',
- ];
-
- $this->replaceIn($path, $search, $replace);
- }
-
- /**
- * Set the bootstrap namespaces.
- *
- * @return void
- */
- protected function setBootstrapNamespaces()
- {
- $search = [
- $this->currentRoot.'\\Http',
- $this->currentRoot.'\\Console',
- $this->currentRoot.'\\Exceptions',
- ];
-
- $replace = [
- $this->argument('name').'\\Http',
- $this->argument('name').'\\Console',
- $this->argument('name').'\\Exceptions',
- ];
-
- $this->replaceIn($this->getBootstrapPath(), $search, $replace);
- }
-
- /**
- * Set the namespace in the appropriate configuration files.
- *
- * @return void
- */
- protected function setConfigNamespaces()
- {
- $this->setAppConfigNamespaces();
- $this->setAuthConfigNamespace();
- $this->setServicesConfigNamespace();
- }
-
- /**
- * Set the application provider namespaces.
- *
- * @return void
- */
- protected function setAppConfigNamespaces()
- {
- $search = [
- $this->currentRoot.'\\Providers',
- $this->currentRoot.'\\Http\\Controllers\\',
- ];
-
- $replace = [
- $this->argument('name').'\\Providers',
- $this->argument('name').'\\Http\\Controllers\\',
- ];
-
- $this->replaceIn($this->getConfigPath('app'), $search, $replace);
- }
-
- /**
- * Set the authentication User namespace.
- *
- * @return void
- */
- protected function setAuthConfigNamespace()
- {
- $this->replaceIn(
- $this->getConfigPath('auth'),
- $this->currentRoot.'\\User',
- $this->argument('name').'\\User'
- );
- }
-
- /**
- * Set the services User namespace.
- *
- * @return void
- */
- protected function setServicesConfigNamespace()
- {
- $this->replaceIn(
- $this->getConfigPath('services'),
- $this->currentRoot.'\\User',
- $this->argument('name').'\\User'
- );
- }
-
- /**
- * Set the PSR-4 namespace in the Composer file.
- *
- * @return void
- */
- protected function setComposerNamespace()
- {
- $this->replaceIn(
- $this->getComposerPath(),
- str_replace('\\', '\\\\', $this->currentRoot).'\\\\',
- str_replace('\\', '\\\\', $this->argument('name')).'\\\\'
- );
- }
-
- /**
- * Set the namespace in database factory files.
- *
- * @return void
- */
- protected function setDatabaseFactoryNamespaces()
- {
- $files = Finder::create()
- ->in(database_path('factories'))
- ->contains($this->currentRoot)
- ->name('*.php');
-
- foreach ($files as $file) {
- $this->replaceIn(
- $file->getRealPath(),
- $this->currentRoot, $this->argument('name')
- );
- }
- }
-
- /**
- * Replace the given string in the given file.
- *
- * @param string $path
- * @param string|array $search
- * @param string|array $replace
- * @return void
- */
- protected function replaceIn($path, $search, $replace)
- {
- if ($this->files->exists($path)) {
- $this->files->put($path, str_replace($search, $replace, $this->files->get($path)));
- }
- }
-
- /**
- * Get the path to the bootstrap/app.php file.
- *
- * @return string
- */
- protected function getBootstrapPath()
- {
- return $this->laravel->bootstrapPath().'/app.php';
- }
-
- /**
- * Get the path to the Composer.json file.
- *
- * @return string
- */
- protected function getComposerPath()
- {
- return base_path('composer.json');
- }
-
- /**
- * Get the path to the given configuration file.
- *
- * @param string $name
- * @return string
- */
- protected function getConfigPath($name)
- {
- return $this->laravel['path.config'].'/'.$name.'.php';
- }
-
- /**
- * Get the console command arguments.
- *
- * @return array
- */
- protected function getArguments()
- {
- return [
- ['name', InputArgument::REQUIRED, 'The desired namespace'],
- ];
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ChannelMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ChannelMakeCommand.php
deleted file mode 100644
index 202d81c..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ChannelMakeCommand.php
+++ /dev/null
@@ -1,65 +0,0 @@
-userProviderModel()),
- parent::buildClass($name)
- );
- }
-
- /**
- * Get the stub file for the generator.
- *
- * @return string
- */
- protected function getStub()
- {
- return __DIR__.'/stubs/channel.stub';
- }
-
- /**
- * Get the default namespace for the class.
- *
- * @param string $rootNamespace
- * @return string
- */
- protected function getDefaultNamespace($rootNamespace)
- {
- return $rootNamespace.'\Broadcasting';
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ClearCompiledCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ClearCompiledCommand.php
deleted file mode 100644
index 399a44d..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ClearCompiledCommand.php
+++ /dev/null
@@ -1,40 +0,0 @@
-laravel->getCachedServicesPath())) {
- @unlink($servicesPath);
- }
-
- if (file_exists($packagesPath = $this->laravel->getCachedPackagesPath())) {
- @unlink($packagesPath);
- }
-
- $this->info('Compiled services and packages files removed!');
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ClosureCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ClosureCommand.php
deleted file mode 100644
index 1e34b86..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ClosureCommand.php
+++ /dev/null
@@ -1,71 +0,0 @@
-callback = $callback;
- $this->signature = $signature;
-
- parent::__construct();
- }
-
- /**
- * Execute the console command.
- *
- * @param \Symfony\Component\Console\Input\InputInterface $input
- * @param \Symfony\Component\Console\Output\OutputInterface $output
- * @return mixed
- */
- protected function execute(InputInterface $input, OutputInterface $output)
- {
- $inputs = array_merge($input->getArguments(), $input->getOptions());
-
- $parameters = [];
-
- foreach ((new ReflectionFunction($this->callback))->getParameters() as $parameter) {
- if (isset($inputs[$parameter->name])) {
- $parameters[$parameter->name] = $inputs[$parameter->name];
- }
- }
-
- return $this->laravel->call(
- $this->callback->bindTo($this, $this), $parameters
- );
- }
-
- /**
- * Set the description for the command.
- *
- * @param string $description
- * @return $this
- */
- public function describe($description)
- {
- $this->setDescription($description);
-
- return $this;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConfigCacheCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConfigCacheCommand.php
deleted file mode 100644
index c127f6e..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConfigCacheCommand.php
+++ /dev/null
@@ -1,90 +0,0 @@
-files = $files;
- }
-
- /**
- * Execute the console command.
- *
- * @return void
- *
- * @throws \LogicException
- */
- public function handle()
- {
- $this->call('config:clear');
-
- $config = $this->getFreshConfiguration();
-
- $configPath = $this->laravel->getCachedConfigPath();
-
- $this->files->put(
- $configPath, 'files->delete($configPath);
-
- throw new LogicException('Your configuration files are not serializable.', 0, $e);
- }
-
- $this->info('Configuration cached successfully!');
- }
-
- /**
- * Boot a fresh copy of the application configuration.
- *
- * @return array
- */
- protected function getFreshConfiguration()
- {
- $app = require $this->laravel->bootstrapPath().'/app.php';
-
- $app->make(ConsoleKernelContract::class)->bootstrap();
-
- return $app['config']->all();
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConfigClearCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConfigClearCommand.php
deleted file mode 100644
index d20e2d8..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConfigClearCommand.php
+++ /dev/null
@@ -1,55 +0,0 @@
-files = $files;
- }
-
- /**
- * Execute the console command.
- *
- * @return void
- */
- public function handle()
- {
- $this->files->delete($this->laravel->getCachedConfigPath());
-
- $this->info('Configuration cache cleared!');
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConsoleMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConsoleMakeCommand.php
deleted file mode 100644
index 54183e9..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConsoleMakeCommand.php
+++ /dev/null
@@ -1,90 +0,0 @@
-option('command'), $stub);
- }
-
- /**
- * Get the stub file for the generator.
- *
- * @return string
- */
- protected function getStub()
- {
- return __DIR__.'/stubs/console.stub';
- }
-
- /**
- * Get the default namespace for the class.
- *
- * @param string $rootNamespace
- * @return string
- */
- protected function getDefaultNamespace($rootNamespace)
- {
- return $rootNamespace.'\Console\Commands';
- }
-
- /**
- * Get the console command arguments.
- *
- * @return array
- */
- protected function getArguments()
- {
- return [
- ['name', InputArgument::REQUIRED, 'The name of the command'],
- ];
- }
-
- /**
- * Get the console command options.
- *
- * @return array
- */
- protected function getOptions()
- {
- return [
- ['command', null, InputOption::VALUE_OPTIONAL, 'The terminal command that should be assigned', 'command:name'],
- ];
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/DownCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/DownCommand.php
deleted file mode 100644
index ff1e594..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/DownCommand.php
+++ /dev/null
@@ -1,69 +0,0 @@
-getDownFilePayload(), JSON_PRETTY_PRINT)
- );
-
- $this->comment('Application is now in maintenance mode.');
- }
-
- /**
- * Get the payload to be placed in the "down" file.
- *
- * @return array
- */
- protected function getDownFilePayload()
- {
- return [
- 'time' => $this->currentTime(),
- 'message' => $this->option('message'),
- 'retry' => $this->getRetryTime(),
- 'allowed' => $this->option('allow'),
- ];
- }
-
- /**
- * Get the number of seconds the client should wait before retrying their request.
- *
- * @return int|null
- */
- protected function getRetryTime()
- {
- $retry = $this->option('retry');
-
- return is_numeric($retry) && $retry > 0 ? (int) $retry : null;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/EnvironmentCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/EnvironmentCommand.php
deleted file mode 100644
index ab3bb32..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/EnvironmentCommand.php
+++ /dev/null
@@ -1,32 +0,0 @@
-line('Current application environment:'.$this->laravel['env'].'');
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/EventGenerateCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/EventGenerateCommand.php
deleted file mode 100644
index 0c6a4a7..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/EventGenerateCommand.php
+++ /dev/null
@@ -1,78 +0,0 @@
-laravel->getProviders(EventServiceProvider::class);
-
- foreach ($providers as $provider) {
- foreach ($provider->listens() as $event => $listeners) {
- $this->makeEventAndListeners($event, $listeners);
- }
- }
-
- $this->info('Events and listeners generated successfully!');
- }
-
- /**
- * Make the event and listeners for the given event.
- *
- * @param string $event
- * @param array $listeners
- * @return void
- */
- protected function makeEventAndListeners($event, $listeners)
- {
- if (! Str::contains($event, '\\')) {
- return;
- }
-
- $this->callSilent('make:event', ['name' => $event]);
-
- $this->makeListeners($event, $listeners);
- }
-
- /**
- * Make the listeners for the given event.
- *
- * @param string $event
- * @param array $listeners
- * @return void
- */
- protected function makeListeners($event, $listeners)
- {
- foreach ($listeners as $listener) {
- $listener = preg_replace('/@.+$/', '', $listener);
-
- $this->callSilent('make:listener', array_filter(
- ['name' => $listener, '--event' => $event]
- ));
- }
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/EventMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/EventMakeCommand.php
deleted file mode 100644
index f18719a..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/EventMakeCommand.php
+++ /dev/null
@@ -1,61 +0,0 @@
-option('render')) {
- return $this->option('report')
- ? __DIR__.'/stubs/exception-render-report.stub'
- : __DIR__.'/stubs/exception-render.stub';
- }
-
- return $this->option('report')
- ? __DIR__.'/stubs/exception-report.stub'
- : __DIR__.'/stubs/exception.stub';
- }
-
- /**
- * Determine if the class already exists.
- *
- * @param string $rawName
- * @return bool
- */
- protected function alreadyExists($rawName)
- {
- return class_exists($this->rootNamespace().'Exceptions\\'.$rawName);
- }
-
- /**
- * Get the default namespace for the class.
- *
- * @param string $rootNamespace
- * @return string
- */
- protected function getDefaultNamespace($rootNamespace)
- {
- return $rootNamespace.'\Exceptions';
- }
-
- /**
- * Get the console command options.
- *
- * @return array
- */
- protected function getOptions()
- {
- return [
- ['render', null, InputOption::VALUE_NONE, 'Create the exception with an empty render method'],
-
- ['report', null, InputOption::VALUE_NONE, 'Create the exception with an empty report method'],
- ];
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/JobMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/JobMakeCommand.php
deleted file mode 100644
index 60d942e..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/JobMakeCommand.php
+++ /dev/null
@@ -1,65 +0,0 @@
-option('sync')
- ? __DIR__.'/stubs/job.stub'
- : __DIR__.'/stubs/job-queued.stub';
- }
-
- /**
- * Get the default namespace for the class.
- *
- * @param string $rootNamespace
- * @return string
- */
- protected function getDefaultNamespace($rootNamespace)
- {
- return $rootNamespace.'\Jobs';
- }
-
- /**
- * Get the console command options.
- *
- * @return array
- */
- protected function getOptions()
- {
- return [
- ['sync', null, InputOption::VALUE_NONE, 'Indicates that job should be synchronous'],
- ];
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php
deleted file mode 100644
index 1cdbd16..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php
+++ /dev/null
@@ -1,367 +0,0 @@
-app = $app;
- $this->events = $events;
-
- $this->app->booted(function () {
- $this->defineConsoleSchedule();
- });
- }
-
- /**
- * Define the application's command schedule.
- *
- * @return void
- */
- protected function defineConsoleSchedule()
- {
- $this->app->singleton(Schedule::class, function () {
- return new Schedule;
- });
-
- $schedule = $this->app->make(Schedule::class);
-
- $this->schedule($schedule);
- }
-
- /**
- * Run the console application.
- *
- * @param \Symfony\Component\Console\Input\InputInterface $input
- * @param \Symfony\Component\Console\Output\OutputInterface $output
- * @return int
- */
- public function handle($input, $output = null)
- {
- try {
- $this->bootstrap();
-
- return $this->getArtisan()->run($input, $output);
- } catch (Exception $e) {
- $this->reportException($e);
-
- $this->renderException($output, $e);
-
- return 1;
- } catch (Throwable $e) {
- $e = new FatalThrowableError($e);
-
- $this->reportException($e);
-
- $this->renderException($output, $e);
-
- return 1;
- }
- }
-
- /**
- * Terminate the application.
- *
- * @param \Symfony\Component\Console\Input\InputInterface $input
- * @param int $status
- * @return void
- */
- public function terminate($input, $status)
- {
- $this->app->terminate();
- }
-
- /**
- * Define the application's command schedule.
- *
- * @param \Illuminate\Console\Scheduling\Schedule $schedule
- * @return void
- */
- protected function schedule(Schedule $schedule)
- {
- //
- }
-
- /**
- * Register the Closure based commands for the application.
- *
- * @return void
- */
- protected function commands()
- {
- //
- }
-
- /**
- * Register a Closure based command with the application.
- *
- * @param string $signature
- * @param \Closure $callback
- * @return \Illuminate\Foundation\Console\ClosureCommand
- */
- public function command($signature, Closure $callback)
- {
- $command = new ClosureCommand($signature, $callback);
-
- Artisan::starting(function ($artisan) use ($command) {
- $artisan->add($command);
- });
-
- return $command;
- }
-
- /**
- * Register all of the commands in the given directory.
- *
- * @param array|string $paths
- * @return void
- */
- protected function load($paths)
- {
- $paths = array_unique(Arr::wrap($paths));
-
- $paths = array_filter($paths, function ($path) {
- return is_dir($path);
- });
-
- if (empty($paths)) {
- return;
- }
-
- $namespace = $this->app->getNamespace();
-
- foreach ((new Finder)->in($paths)->files() as $command) {
- $command = $namespace.str_replace(
- ['/', '.php'],
- ['\\', ''],
- Str::after($command->getPathname(), app_path().DIRECTORY_SEPARATOR)
- );
-
- if (is_subclass_of($command, Command::class) &&
- ! (new ReflectionClass($command))->isAbstract()) {
- Artisan::starting(function ($artisan) use ($command) {
- $artisan->resolve($command);
- });
- }
- }
- }
-
- /**
- * Register the given command with the console application.
- *
- * @param \Symfony\Component\Console\Command\Command $command
- * @return void
- */
- public function registerCommand($command)
- {
- $this->getArtisan()->add($command);
- }
-
- /**
- * Run an Artisan console command by name.
- *
- * @param string $command
- * @param array $parameters
- * @param \Symfony\Component\Console\Output\OutputInterface $outputBuffer
- * @return int
- */
- public function call($command, array $parameters = [], $outputBuffer = null)
- {
- $this->bootstrap();
-
- return $this->getArtisan()->call($command, $parameters, $outputBuffer);
- }
-
- /**
- * Queue the given console command.
- *
- * @param string $command
- * @param array $parameters
- * @return \Illuminate\Foundation\Bus\PendingDispatch
- */
- public function queue($command, array $parameters = [])
- {
- return QueuedCommand::dispatch(func_get_args());
- }
-
- /**
- * Get all of the commands registered with the console.
- *
- * @return array
- */
- public function all()
- {
- $this->bootstrap();
-
- return $this->getArtisan()->all();
- }
-
- /**
- * Get the output for the last run command.
- *
- * @return string
- */
- public function output()
- {
- $this->bootstrap();
-
- return $this->getArtisan()->output();
- }
-
- /**
- * Bootstrap the application for artisan commands.
- *
- * @return void
- */
- public function bootstrap()
- {
- if (! $this->app->hasBeenBootstrapped()) {
- $this->app->bootstrapWith($this->bootstrappers());
- }
-
- $this->app->loadDeferredProviders();
-
- if (! $this->commandsLoaded) {
- $this->commands();
-
- $this->commandsLoaded = true;
- }
- }
-
- /**
- * Get the Artisan application instance.
- *
- * @return \Illuminate\Console\Application
- */
- protected function getArtisan()
- {
- if (is_null($this->artisan)) {
- return $this->artisan = (new Artisan($this->app, $this->events, $this->app->version()))
- ->resolveCommands($this->commands);
- }
-
- return $this->artisan;
- }
-
- /**
- * Set the Artisan application instance.
- *
- * @param \Illuminate\Console\Application $artisan
- * @return void
- */
- public function setArtisan($artisan)
- {
- $this->artisan = $artisan;
- }
-
- /**
- * Get the bootstrap classes for the application.
- *
- * @return array
- */
- protected function bootstrappers()
- {
- return $this->bootstrappers;
- }
-
- /**
- * Report the exception to the exception handler.
- *
- * @param \Exception $e
- * @return void
- */
- protected function reportException(Exception $e)
- {
- $this->app[ExceptionHandler::class]->report($e);
- }
-
- /**
- * Render the given exception.
- *
- * @param \Symfony\Component\Console\Output\OutputInterface $output
- * @param \Exception $e
- * @return void
- */
- protected function renderException($output, Exception $e)
- {
- $this->app[ExceptionHandler::class]->renderForConsole($output, $e);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/KeyGenerateCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/KeyGenerateCommand.php
deleted file mode 100644
index 99492f0..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/KeyGenerateCommand.php
+++ /dev/null
@@ -1,111 +0,0 @@
-generateRandomKey();
-
- if ($this->option('show')) {
- return $this->line(''.$key.'');
- }
-
- // Next, we will replace the application key in the environment file so it is
- // automatically setup for this developer. This key gets generated using a
- // secure random byte generator and is later base64 encoded for storage.
- if (! $this->setKeyInEnvironmentFile($key)) {
- return;
- }
-
- $this->laravel['config']['app.key'] = $key;
-
- $this->info('Application key set successfully.');
- }
-
- /**
- * Generate a random key for the application.
- *
- * @return string
- */
- protected function generateRandomKey()
- {
- return 'base64:'.base64_encode(
- Encrypter::generateKey($this->laravel['config']['app.cipher'])
- );
- }
-
- /**
- * Set the application key in the environment file.
- *
- * @param string $key
- * @return bool
- */
- protected function setKeyInEnvironmentFile($key)
- {
- $currentKey = $this->laravel['config']['app.key'];
-
- if (strlen($currentKey) !== 0 && (! $this->confirmToProceed())) {
- return false;
- }
-
- $this->writeNewEnvironmentFileWith($key);
-
- return true;
- }
-
- /**
- * Write a new environment file with the given key.
- *
- * @param string $key
- * @return void
- */
- protected function writeNewEnvironmentFileWith($key)
- {
- file_put_contents($this->laravel->environmentFilePath(), preg_replace(
- $this->keyReplacementPattern(),
- 'APP_KEY='.$key,
- file_get_contents($this->laravel->environmentFilePath())
- ));
- }
-
- /**
- * Get a regex pattern that will match env APP_KEY with any random key.
- *
- * @return string
- */
- protected function keyReplacementPattern()
- {
- $escaped = preg_quote('='.$this->laravel['config']['app.key'], '/');
-
- return "/^APP_KEY{$escaped}/m";
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ListenerMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ListenerMakeCommand.php
deleted file mode 100644
index c13bfbb..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ListenerMakeCommand.php
+++ /dev/null
@@ -1,112 +0,0 @@
-option('event');
-
- if (! Str::startsWith($event, [
- $this->laravel->getNamespace(),
- 'Illuminate',
- '\\',
- ])) {
- $event = $this->laravel->getNamespace().'Events\\'.$event;
- }
-
- $stub = str_replace(
- 'DummyEvent', class_basename($event), parent::buildClass($name)
- );
-
- return str_replace(
- 'DummyFullEvent', $event, $stub
- );
- }
-
- /**
- * Get the stub file for the generator.
- *
- * @return string
- */
- protected function getStub()
- {
- if ($this->option('queued')) {
- return $this->option('event')
- ? __DIR__.'/stubs/listener-queued.stub'
- : __DIR__.'/stubs/listener-queued-duck.stub';
- }
-
- return $this->option('event')
- ? __DIR__.'/stubs/listener.stub'
- : __DIR__.'/stubs/listener-duck.stub';
- }
-
- /**
- * Determine if the class already exists.
- *
- * @param string $rawName
- * @return bool
- */
- protected function alreadyExists($rawName)
- {
- return class_exists($rawName);
- }
-
- /**
- * Get the default namespace for the class.
- *
- * @param string $rootNamespace
- * @return string
- */
- protected function getDefaultNamespace($rootNamespace)
- {
- return $rootNamespace.'\Listeners';
- }
-
- /**
- * Get the console command options.
- *
- * @return array
- */
- protected function getOptions()
- {
- return [
- ['event', 'e', InputOption::VALUE_OPTIONAL, 'The event class being listened for'],
-
- ['queued', null, InputOption::VALUE_NONE, 'Indicates the event listener should be queued'],
- ];
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/MailMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/MailMakeCommand.php
deleted file mode 100644
index d401a9e..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/MailMakeCommand.php
+++ /dev/null
@@ -1,116 +0,0 @@
-option('force')) {
- return;
- }
-
- if ($this->option('markdown')) {
- $this->writeMarkdownTemplate();
- }
- }
-
- /**
- * Write the Markdown template for the mailable.
- *
- * @return void
- */
- protected function writeMarkdownTemplate()
- {
- $path = resource_path('views/'.str_replace('.', '/', $this->option('markdown'))).'.blade.php';
-
- if (! $this->files->isDirectory(dirname($path))) {
- $this->files->makeDirectory(dirname($path), 0755, true);
- }
-
- $this->files->put($path, file_get_contents(__DIR__.'/stubs/markdown.stub'));
- }
-
- /**
- * Build the class with the given name.
- *
- * @param string $name
- * @return string
- */
- protected function buildClass($name)
- {
- $class = parent::buildClass($name);
-
- if ($this->option('markdown')) {
- $class = str_replace('DummyView', $this->option('markdown'), $class);
- }
-
- return $class;
- }
-
- /**
- * Get the stub file for the generator.
- *
- * @return string
- */
- protected function getStub()
- {
- return $this->option('markdown')
- ? __DIR__.'/stubs/markdown-mail.stub'
- : __DIR__.'/stubs/mail.stub';
- }
-
- /**
- * Get the default namespace for the class.
- *
- * @param string $rootNamespace
- * @return string
- */
- protected function getDefaultNamespace($rootNamespace)
- {
- return $rootNamespace.'\Mail';
- }
-
- /**
- * Get the console command options.
- *
- * @return array
- */
- protected function getOptions()
- {
- return [
- ['force', 'f', InputOption::VALUE_NONE, 'Create the class even if the mailable already exists'],
-
- ['markdown', 'm', InputOption::VALUE_OPTIONAL, 'Create a new Markdown template for the mailable'],
- ];
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ModelMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ModelMakeCommand.php
deleted file mode 100644
index 91a0499..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ModelMakeCommand.php
+++ /dev/null
@@ -1,162 +0,0 @@
-option('force')) {
- return false;
- }
-
- if ($this->option('all')) {
- $this->input->setOption('factory', true);
- $this->input->setOption('migration', true);
- $this->input->setOption('controller', true);
- $this->input->setOption('resource', true);
- }
-
- if ($this->option('factory')) {
- $this->createFactory();
- }
-
- if ($this->option('migration')) {
- $this->createMigration();
- }
-
- if ($this->option('controller') || $this->option('resource')) {
- $this->createController();
- }
- }
-
- /**
- * Create a model factory for the model.
- *
- * @return void
- */
- protected function createFactory()
- {
- $factory = Str::studly(class_basename($this->argument('name')));
-
- $this->call('make:factory', [
- 'name' => "{$factory}Factory",
- '--model' => $this->qualifyClass($this->getNameInput()),
- ]);
- }
-
- /**
- * Create a migration file for the model.
- *
- * @return void
- */
- protected function createMigration()
- {
- $table = Str::plural(Str::snake(class_basename($this->argument('name'))));
-
- if ($this->option('pivot')) {
- $table = Str::singular($table);
- }
-
- $this->call('make:migration', [
- 'name' => "create_{$table}_table",
- '--create' => $table,
- ]);
- }
-
- /**
- * Create a controller for the model.
- *
- * @return void
- */
- protected function createController()
- {
- $controller = Str::studly(class_basename($this->argument('name')));
-
- $modelName = $this->qualifyClass($this->getNameInput());
-
- $this->call('make:controller', [
- 'name' => "{$controller}Controller",
- '--model' => $this->option('resource') ? $modelName : null,
- ]);
- }
-
- /**
- * Get the stub file for the generator.
- *
- * @return string
- */
- protected function getStub()
- {
- if ($this->option('pivot')) {
- return __DIR__.'/stubs/pivot.model.stub';
- }
-
- return __DIR__.'/stubs/model.stub';
- }
-
- /**
- * Get the default namespace for the class.
- *
- * @param string $rootNamespace
- * @return string
- */
- protected function getDefaultNamespace($rootNamespace)
- {
- return $rootNamespace;
- }
-
- /**
- * Get the console command options.
- *
- * @return array
- */
- protected function getOptions()
- {
- return [
- ['all', 'a', InputOption::VALUE_NONE, 'Generate a migration, factory, and resource controller for the model'],
-
- ['controller', 'c', InputOption::VALUE_NONE, 'Create a new controller for the model'],
-
- ['factory', 'f', InputOption::VALUE_NONE, 'Create a new factory for the model'],
-
- ['force', null, InputOption::VALUE_NONE, 'Create the class even if the model already exists'],
-
- ['migration', 'm', InputOption::VALUE_NONE, 'Create a new migration file for the model'],
-
- ['pivot', 'p', InputOption::VALUE_NONE, 'Indicates if the generated model should be a custom intermediate table model'],
-
- ['resource', 'r', InputOption::VALUE_NONE, 'Indicates if the generated controller should be a resource controller'],
- ];
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/NotificationMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/NotificationMakeCommand.php
deleted file mode 100644
index 40e9d84..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/NotificationMakeCommand.php
+++ /dev/null
@@ -1,116 +0,0 @@
-option('force')) {
- return;
- }
-
- if ($this->option('markdown')) {
- $this->writeMarkdownTemplate();
- }
- }
-
- /**
- * Write the Markdown template for the mailable.
- *
- * @return void
- */
- protected function writeMarkdownTemplate()
- {
- $path = resource_path('views/'.str_replace('.', '/', $this->option('markdown'))).'.blade.php';
-
- if (! $this->files->isDirectory(dirname($path))) {
- $this->files->makeDirectory(dirname($path), 0755, true);
- }
-
- $this->files->put($path, file_get_contents(__DIR__.'/stubs/markdown.stub'));
- }
-
- /**
- * Build the class with the given name.
- *
- * @param string $name
- * @return string
- */
- protected function buildClass($name)
- {
- $class = parent::buildClass($name);
-
- if ($this->option('markdown')) {
- $class = str_replace('DummyView', $this->option('markdown'), $class);
- }
-
- return $class;
- }
-
- /**
- * Get the stub file for the generator.
- *
- * @return string
- */
- protected function getStub()
- {
- return $this->option('markdown')
- ? __DIR__.'/stubs/markdown-notification.stub'
- : __DIR__.'/stubs/notification.stub';
- }
-
- /**
- * Get the default namespace for the class.
- *
- * @param string $rootNamespace
- * @return string
- */
- protected function getDefaultNamespace($rootNamespace)
- {
- return $rootNamespace.'\Notifications';
- }
-
- /**
- * Get the console command options.
- *
- * @return array
- */
- protected function getOptions()
- {
- return [
- ['force', 'f', InputOption::VALUE_NONE, 'Create the class even if the notification already exists'],
-
- ['markdown', 'm', InputOption::VALUE_OPTIONAL, 'Create a new Markdown template for the notification'],
- ];
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ObserverMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ObserverMakeCommand.php
deleted file mode 100644
index 77a8162..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ObserverMakeCommand.php
+++ /dev/null
@@ -1,113 +0,0 @@
-option('model');
-
- return $model ? $this->replaceModel($stub, $model) : $stub;
- }
-
- /**
- * Get the stub file for the generator.
- *
- * @return string
- */
- protected function getStub()
- {
- return $this->option('model')
- ? __DIR__.'/stubs/observer.stub'
- : __DIR__.'/stubs/observer.plain.stub';
- }
-
- /**
- * Replace the model for the given stub.
- *
- * @param string $stub
- * @param string $model
- * @return string
- */
- protected function replaceModel($stub, $model)
- {
- $model = str_replace('/', '\\', $model);
-
- $namespaceModel = $this->laravel->getNamespace().$model;
-
- if (Str::startsWith($model, '\\')) {
- $stub = str_replace('NamespacedDummyModel', trim($model, '\\'), $stub);
- } else {
- $stub = str_replace('NamespacedDummyModel', $namespaceModel, $stub);
- }
-
- $stub = str_replace(
- "use {$namespaceModel};\nuse {$namespaceModel};", "use {$namespaceModel};", $stub
- );
-
- $model = class_basename(trim($model, '\\'));
-
- $stub = str_replace('DocDummyModel', Str::snake($model, ' '), $stub);
-
- $stub = str_replace('DummyModel', $model, $stub);
-
- return str_replace('dummyModel', Str::camel($model), $stub);
- }
-
- /**
- * Get the default namespace for the class.
- *
- * @param string $rootNamespace
- * @return string
- */
- protected function getDefaultNamespace($rootNamespace)
- {
- return $rootNamespace.'\Observers';
- }
-
- /**
- * Get the console command arguments.
- *
- * @return array
- */
- protected function getOptions()
- {
- return [
- ['model', 'm', InputOption::VALUE_OPTIONAL, 'The model that the observer applies to.'],
- ];
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/OptimizeClearCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/OptimizeClearCommand.php
deleted file mode 100644
index 0bd92df..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/OptimizeClearCommand.php
+++ /dev/null
@@ -1,38 +0,0 @@
-call('view:clear');
- $this->call('cache:clear');
- $this->call('route:clear');
- $this->call('config:clear');
- $this->call('clear-compiled');
-
- $this->info('Caches cleared successfully!');
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/OptimizeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/OptimizeCommand.php
deleted file mode 100644
index af5d731..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/OptimizeCommand.php
+++ /dev/null
@@ -1,35 +0,0 @@
-call('config:cache');
- $this->call('route:cache');
-
- $this->info('Files cached successfully!');
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/PackageDiscoverCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/PackageDiscoverCommand.php
deleted file mode 100644
index 3ef8f01..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/PackageDiscoverCommand.php
+++ /dev/null
@@ -1,40 +0,0 @@
-build();
-
- foreach (array_keys($manifest->manifest) as $package) {
- $this->line("Discovered Package: {$package}");
- }
-
- $this->info('Package manifest generated successfully.');
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/PolicyMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/PolicyMakeCommand.php
deleted file mode 100644
index fba1e0c..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/PolicyMakeCommand.php
+++ /dev/null
@@ -1,144 +0,0 @@
-replaceUserNamespace(
- parent::buildClass($name)
- );
-
- $model = $this->option('model');
-
- return $model ? $this->replaceModel($stub, $model) : $stub;
- }
-
- /**
- * Replace the User model namespace.
- *
- * @param string $stub
- * @return string
- */
- protected function replaceUserNamespace($stub)
- {
- $model = $this->userProviderModel();
-
- if (! $model) {
- return $stub;
- }
-
- return str_replace(
- $this->rootNamespace().'User',
- $model,
- $stub
- );
- }
-
- /**
- * Replace the model for the given stub.
- *
- * @param string $stub
- * @param string $model
- * @return string
- */
- protected function replaceModel($stub, $model)
- {
- $model = str_replace('/', '\\', $model);
-
- $namespaceModel = $this->laravel->getNamespace().$model;
-
- if (Str::startsWith($model, '\\')) {
- $stub = str_replace('NamespacedDummyModel', trim($model, '\\'), $stub);
- } else {
- $stub = str_replace('NamespacedDummyModel', $namespaceModel, $stub);
- }
-
- $stub = str_replace(
- "use {$namespaceModel};\nuse {$namespaceModel};", "use {$namespaceModel};", $stub
- );
-
- $model = class_basename(trim($model, '\\'));
-
- $dummyUser = class_basename($this->userProviderModel());
-
- $dummyModel = Str::camel($model) === 'user' ? 'model' : $model;
-
- $stub = str_replace('DocDummyModel', Str::snake($dummyModel, ' '), $stub);
-
- $stub = str_replace('DummyModel', $model, $stub);
-
- $stub = str_replace('dummyModel', Str::camel($dummyModel), $stub);
-
- $stub = str_replace('DummyUser', $dummyUser, $stub);
-
- return str_replace('DocDummyPluralModel', Str::snake(Str::plural($dummyModel), ' '), $stub);
- }
-
- /**
- * Get the stub file for the generator.
- *
- * @return string
- */
- protected function getStub()
- {
- return $this->option('model')
- ? __DIR__.'/stubs/policy.stub'
- : __DIR__.'/stubs/policy.plain.stub';
- }
-
- /**
- * Get the default namespace for the class.
- *
- * @param string $rootNamespace
- * @return string
- */
- protected function getDefaultNamespace($rootNamespace)
- {
- return $rootNamespace.'\Policies';
- }
-
- /**
- * Get the console command arguments.
- *
- * @return array
- */
- protected function getOptions()
- {
- return [
- ['model', 'm', InputOption::VALUE_OPTIONAL, 'The model that the policy applies to'],
- ];
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/PresetCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/PresetCommand.php
deleted file mode 100644
index 9c7e6c1..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/PresetCommand.php
+++ /dev/null
@@ -1,96 +0,0 @@
-argument('type'))) {
- return call_user_func(static::$macros[$this->argument('type')], $this);
- }
-
- if (! in_array($this->argument('type'), ['none', 'bootstrap', 'vue', 'react'])) {
- throw new InvalidArgumentException('Invalid preset.');
- }
-
- return $this->{$this->argument('type')}();
- }
-
- /**
- * Install the "fresh" preset.
- *
- * @return void
- */
- protected function none()
- {
- Presets\None::install();
-
- $this->info('Frontend scaffolding removed successfully.');
- }
-
- /**
- * Install the "bootstrap" preset.
- *
- * @return void
- */
- protected function bootstrap()
- {
- Presets\Bootstrap::install();
-
- $this->info('Bootstrap scaffolding installed successfully.');
- $this->comment('Please run "npm install && npm run dev" to compile your fresh scaffolding.');
- }
-
- /**
- * Install the "vue" preset.
- *
- * @return void
- */
- protected function vue()
- {
- Presets\Vue::install();
-
- $this->info('Vue scaffolding installed successfully.');
- $this->comment('Please run "npm install && npm run dev" to compile your fresh scaffolding.');
- }
-
- /**
- * Install the "react" preset.
- *
- * @return void
- */
- protected function react()
- {
- Presets\React::install();
-
- $this->info('React scaffolding installed successfully.');
- $this->comment('Please run "npm install && npm run dev" to compile your fresh scaffolding.');
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/Bootstrap.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/Bootstrap.php
deleted file mode 100644
index 248e2f2..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/Bootstrap.php
+++ /dev/null
@@ -1,44 +0,0 @@
- '^4.0.0',
- 'jquery' => '^3.2',
- 'popper.js' => '^1.12',
- ] + $packages;
- }
-
- /**
- * Update the Sass files for the application.
- *
- * @return void
- */
- protected static function updateSass()
- {
- copy(__DIR__.'/bootstrap-stubs/_variables.scss', resource_path('sass/_variables.scss'));
- copy(__DIR__.'/bootstrap-stubs/app.scss', resource_path('sass/app.scss'));
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/None.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/None.php
deleted file mode 100644
index f3203c4..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/None.php
+++ /dev/null
@@ -1,60 +0,0 @@
-deleteDirectory(resource_path('js/components'));
- $filesystem->delete(resource_path('sass/_variables.scss'));
- $filesystem->deleteDirectory(base_path('node_modules'));
- $filesystem->deleteDirectory(public_path('css'));
- $filesystem->deleteDirectory(public_path('js'));
- });
- }
-
- /**
- * Update the given package array.
- *
- * @param array $packages
- * @return array
- */
- protected static function updatePackageArray(array $packages)
- {
- unset(
- $packages['bootstrap'],
- $packages['jquery'],
- $packages['popper.js'],
- $packages['vue'],
- $packages['@babel/preset-react'],
- $packages['react'],
- $packages['react-dom']
- );
-
- return $packages;
- }
-
- /**
- * Write the stubs for the Sass and JavaScript files.
- *
- * @return void
- */
- protected static function updateBootstrapping()
- {
- file_put_contents(resource_path('sass/app.scss'), ''.PHP_EOL);
- copy(__DIR__.'/none-stubs/app.js', resource_path('js/app.js'));
- copy(__DIR__.'/none-stubs/bootstrap.js', resource_path('js/bootstrap.js'));
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/Preset.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/Preset.php
deleted file mode 100644
index efa0817..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/Preset.php
+++ /dev/null
@@ -1,65 +0,0 @@
-isDirectory($directory = resource_path('js/components'))) {
- $filesystem->makeDirectory($directory, 0755, true);
- }
- }
-
- /**
- * Update the "package.json" file.
- *
- * @param bool $dev
- * @return void
- */
- protected static function updatePackages($dev = true)
- {
- if (! file_exists(base_path('package.json'))) {
- return;
- }
-
- $configurationKey = $dev ? 'devDependencies' : 'dependencies';
-
- $packages = json_decode(file_get_contents(base_path('package.json')), true);
-
- $packages[$configurationKey] = static::updatePackageArray(
- array_key_exists($configurationKey, $packages) ? $packages[$configurationKey] : [],
- $configurationKey
- );
-
- ksort($packages[$configurationKey]);
-
- file_put_contents(
- base_path('package.json'),
- json_encode($packages, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT).PHP_EOL
- );
- }
-
- /**
- * Remove the installed Node modules.
- *
- * @return void
- */
- protected static function removeNodeModules()
- {
- tap(new Filesystem, function ($files) {
- $files->deleteDirectory(base_path('node_modules'));
-
- $files->delete(base_path('yarn.lock'));
- });
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/React.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/React.php
deleted file mode 100644
index b86851f..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/React.php
+++ /dev/null
@@ -1,76 +0,0 @@
- '^7.0.0',
- 'react' => '^16.2.0',
- 'react-dom' => '^16.2.0',
- ] + Arr::except($packages, ['vue']);
- }
-
- /**
- * Update the Webpack configuration.
- *
- * @return void
- */
- protected static function updateWebpackConfiguration()
- {
- copy(__DIR__.'/react-stubs/webpack.mix.js', base_path('webpack.mix.js'));
- }
-
- /**
- * Update the example component.
- *
- * @return void
- */
- protected static function updateComponent()
- {
- (new Filesystem)->delete(
- resource_path('js/components/ExampleComponent.vue')
- );
-
- copy(
- __DIR__.'/react-stubs/Example.js',
- resource_path('js/components/Example.js')
- );
- }
-
- /**
- * Update the bootstrapping files.
- *
- * @return void
- */
- protected static function updateBootstrapping()
- {
- copy(__DIR__.'/react-stubs/app.js', resource_path('js/app.js'));
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/Vue.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/Vue.php
deleted file mode 100644
index d25ffb8..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/Vue.php
+++ /dev/null
@@ -1,76 +0,0 @@
- '^2.5.17'] + Arr::except($packages, [
- 'babel-preset-react',
- 'react',
- 'react-dom',
- ]);
- }
-
- /**
- * Update the Webpack configuration.
- *
- * @return void
- */
- protected static function updateWebpackConfiguration()
- {
- copy(__DIR__.'/vue-stubs/webpack.mix.js', base_path('webpack.mix.js'));
- }
-
- /**
- * Update the example component.
- *
- * @return void
- */
- protected static function updateComponent()
- {
- (new Filesystem)->delete(
- resource_path('js/components/Example.js')
- );
-
- copy(
- __DIR__.'/vue-stubs/ExampleComponent.vue',
- resource_path('js/components/ExampleComponent.vue')
- );
- }
-
- /**
- * Update the bootstrapping files.
- *
- * @return void
- */
- protected static function updateBootstrapping()
- {
- copy(__DIR__.'/vue-stubs/app.js', resource_path('js/app.js'));
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/bootstrap-stubs/_variables.scss b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/bootstrap-stubs/_variables.scss
deleted file mode 100644
index 6799fc4..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/bootstrap-stubs/_variables.scss
+++ /dev/null
@@ -1,20 +0,0 @@
-
-// Body
-$body-bg: #f8fafc;
-
-// Typography
-$font-family-sans-serif: "Nunito", sans-serif;
-$font-size-base: 0.9rem;
-$line-height-base: 1.6;
-
-// Colors
-$blue: #3490dc;
-$indigo: #6574cd;
-$purple: #9561e2;
-$pink: #f66D9b;
-$red: #e3342f;
-$orange: #f6993f;
-$yellow: #ffed4a;
-$green: #38c172;
-$teal: #4dc0b5;
-$cyan: #6cb2eb;
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/bootstrap-stubs/app.scss b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/bootstrap-stubs/app.scss
deleted file mode 100644
index f42e798..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/bootstrap-stubs/app.scss
+++ /dev/null
@@ -1,14 +0,0 @@
-
-// Fonts
-@import url('https://fonts.googleapis.com/css?family=Nunito');
-
-// Variables
-@import 'variables';
-
-// Bootstrap
-@import '~bootstrap/scss/bootstrap';
-
-.navbar-laravel {
- background-color: #fff;
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/none-stubs/app.js b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/none-stubs/app.js
deleted file mode 100644
index e34e8a4..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/none-stubs/app.js
+++ /dev/null
@@ -1,8 +0,0 @@
-
-/**
- * First, we will load all of this project's Javascript utilities and other
- * dependencies. Then, we will be ready to develop a robust and powerful
- * application frontend using useful Laravel and JavaScript libraries.
- */
-
-require('./bootstrap');
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/none-stubs/bootstrap.js b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/none-stubs/bootstrap.js
deleted file mode 100644
index 372bf25..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/none-stubs/bootstrap.js
+++ /dev/null
@@ -1,43 +0,0 @@
-
-window._ = require('lodash');
-
-/**
- * We'll load the axios HTTP library which allows us to easily issue requests
- * to our Laravel back-end. This library automatically handles sending the
- * CSRF token as a header based on the value of the "XSRF" token cookie.
- */
-
-window.axios = require('axios');
-
-window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
-
-/**
- * Next we will register the CSRF Token as a common header with Axios so that
- * all outgoing HTTP requests automatically have it attached. This is just
- * a simple convenience so we don't have to attach every token manually.
- */
-
-let token = document.head.querySelector('meta[name="csrf-token"]');
-
-if (token) {
- window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
-} else {
- console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
-}
-
-/**
- * Echo exposes an expressive API for subscribing to channels and listening
- * for events that are broadcast by Laravel. Echo and event broadcasting
- * allows your team to easily build robust real-time web applications.
- */
-
-// import Echo from 'laravel-echo'
-
-// window.Pusher = require('pusher-js');
-
-// window.Echo = new Echo({
-// broadcaster: 'pusher',
-// key: process.env.MIX_PUSHER_APP_KEY,
-// cluster: process.env.MIX_PUSHER_APP_CLUSTER,
-// encrypted: true
-// });
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/react-stubs/Example.js b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/react-stubs/Example.js
deleted file mode 100644
index 937bb98..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/react-stubs/Example.js
+++ /dev/null
@@ -1,26 +0,0 @@
-import React, { Component } from 'react';
-import ReactDOM from 'react-dom';
-
-export default class Example extends Component {
- render() {
- return (
-
-
-
-
-
Example Component
-
-
- I'm an example component!
-
-
-
-
-
- );
- }
-}
-
-if (document.getElementById('example')) {
- ReactDOM.render(, document.getElementById('example'));
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/react-stubs/app.js b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/react-stubs/app.js
deleted file mode 100644
index 583ecce..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/react-stubs/app.js
+++ /dev/null
@@ -1,16 +0,0 @@
-
-/**
- * First we will load all of this project's JavaScript dependencies which
- * includes React and other helpers. It's a great starting point while
- * building robust, powerful web applications using React + Laravel.
- */
-
-require('./bootstrap');
-
-/**
- * Next, we will create a fresh React component instance and attach it to
- * the page. Then, you may begin adding components to this application
- * or customize the JavaScript scaffolding to fit your unique needs.
- */
-
-require('./components/Example');
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/react-stubs/webpack.mix.js b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/react-stubs/webpack.mix.js
deleted file mode 100644
index cc075aa..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/react-stubs/webpack.mix.js
+++ /dev/null
@@ -1,15 +0,0 @@
-const mix = require('laravel-mix');
-
-/*
- |--------------------------------------------------------------------------
- | Mix Asset Management
- |--------------------------------------------------------------------------
- |
- | Mix provides a clean, fluent API for defining some Webpack build steps
- | for your Laravel application. By default, we are compiling the Sass
- | file for the application as well as bundling up all the JS files.
- |
- */
-
-mix.react('resources/js/app.js', 'public/js')
- .sass('resources/sass/app.scss', 'public/css');
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/vue-stubs/ExampleComponent.vue b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/vue-stubs/ExampleComponent.vue
deleted file mode 100644
index 2805329..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/vue-stubs/ExampleComponent.vue
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
-
Example Component
-
-
- I'm an example component.
-
-
-
-
-
-
-
-
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/vue-stubs/app.js b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/vue-stubs/app.js
deleted file mode 100644
index 32d79b4..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/vue-stubs/app.js
+++ /dev/null
@@ -1,33 +0,0 @@
-
-/**
- * First we will load all of this project's JavaScript dependencies which
- * includes Vue and other libraries. It is a great starting point when
- * building robust, powerful web applications using Vue and Laravel.
- */
-
-require('./bootstrap');
-
-window.Vue = require('vue');
-
-/**
- * The following block of code may be used to automatically register your
- * Vue components. It will recursively scan this directory for the Vue
- * components and automatically register them with their "basename".
- *
- * Eg. ./components/ExampleComponent.vue ->
- */
-
-// const files = require.context('./', true, /\.vue$/i)
-// files.keys().map(key => Vue.component(key.split('/').pop().split('.')[0], files(key).default))
-
-Vue.component('example-component', require('./components/ExampleComponent.vue').default);
-
-/**
- * Next, we will create a fresh Vue application instance and attach it to
- * the page. Then, you may begin adding components to this application
- * or customize the JavaScript scaffolding to fit your unique needs.
- */
-
-const app = new Vue({
- el: '#app'
-});
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/vue-stubs/webpack.mix.js b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/vue-stubs/webpack.mix.js
deleted file mode 100644
index 19a48fa..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/vue-stubs/webpack.mix.js
+++ /dev/null
@@ -1,15 +0,0 @@
-const mix = require('laravel-mix');
-
-/*
- |--------------------------------------------------------------------------
- | Mix Asset Management
- |--------------------------------------------------------------------------
- |
- | Mix provides a clean, fluent API for defining some Webpack build steps
- | for your Laravel application. By default, we are compiling the Sass
- | file for the application as well as bundling up all the JS files.
- |
- */
-
-mix.js('resources/js/app.js', 'public/js')
- .sass('resources/sass/app.scss', 'public/css');
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ProviderMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ProviderMakeCommand.php
deleted file mode 100644
index fa887ed..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ProviderMakeCommand.php
+++ /dev/null
@@ -1,50 +0,0 @@
-data = $data;
- }
-
- /**
- * Handle the job.
- *
- * @param \Illuminate\Contracts\Console\Kernel $kernel
- * @return void
- */
- public function handle(KernelContract $kernel)
- {
- call_user_func_array([$kernel, 'call'], $this->data);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/RequestMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/RequestMakeCommand.php
deleted file mode 100644
index 95b7a87..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/RequestMakeCommand.php
+++ /dev/null
@@ -1,50 +0,0 @@
-collection()) {
- $this->type = 'Resource collection';
- }
-
- parent::handle();
- }
-
- /**
- * Get the stub file for the generator.
- *
- * @return string
- */
- protected function getStub()
- {
- return $this->collection()
- ? __DIR__.'/stubs/resource-collection.stub'
- : __DIR__.'/stubs/resource.stub';
- }
-
- /**
- * Determine if the command is generating a resource collection.
- *
- * @return bool
- */
- protected function collection()
- {
- return $this->option('collection') ||
- Str::endsWith($this->argument('name'), 'Collection');
- }
-
- /**
- * Get the default namespace for the class.
- *
- * @param string $rootNamespace
- * @return string
- */
- protected function getDefaultNamespace($rootNamespace)
- {
- return $rootNamespace.'\Http\Resources';
- }
-
- /**
- * Get the console command options.
- *
- * @return array
- */
- protected function getOptions()
- {
- return [
- ['collection', 'c', InputOption::VALUE_NONE, 'Create a resource collection'],
- ];
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteCacheCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteCacheCommand.php
deleted file mode 100644
index 3c85b87..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteCacheCommand.php
+++ /dev/null
@@ -1,109 +0,0 @@
-files = $files;
- }
-
- /**
- * Execute the console command.
- *
- * @return void
- */
- public function handle()
- {
- $this->call('route:clear');
-
- $routes = $this->getFreshApplicationRoutes();
-
- if (count($routes) === 0) {
- return $this->error("Your application doesn't have any routes.");
- }
-
- foreach ($routes as $route) {
- $route->prepareForSerialization();
- }
-
- $this->files->put(
- $this->laravel->getCachedRoutesPath(), $this->buildRouteCacheFile($routes)
- );
-
- $this->info('Routes cached successfully!');
- }
-
- /**
- * Boot a fresh copy of the application and get the routes.
- *
- * @return \Illuminate\Routing\RouteCollection
- */
- protected function getFreshApplicationRoutes()
- {
- return tap($this->getFreshApplication()['router']->getRoutes(), function ($routes) {
- $routes->refreshNameLookups();
- $routes->refreshActionLookups();
- });
- }
-
- /**
- * Get a fresh application instance.
- *
- * @return \Illuminate\Foundation\Application
- */
- protected function getFreshApplication()
- {
- return tap(require $this->laravel->bootstrapPath().'/app.php', function ($app) {
- $app->make(ConsoleKernelContract::class)->bootstrap();
- });
- }
-
- /**
- * Build the route cache file.
- *
- * @param \Illuminate\Routing\RouteCollection $routes
- * @return string
- */
- protected function buildRouteCacheFile(RouteCollection $routes)
- {
- $stub = $this->files->get(__DIR__.'/stubs/routes.stub');
-
- return str_replace('{{routes}}', base64_encode(serialize($routes)), $stub);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteClearCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteClearCommand.php
deleted file mode 100644
index 03fab1d..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteClearCommand.php
+++ /dev/null
@@ -1,55 +0,0 @@
-files = $files;
- }
-
- /**
- * Execute the console command.
- *
- * @return void
- */
- public function handle()
- {
- $this->files->delete($this->laravel->getCachedRoutesPath());
-
- $this->info('Route cache cleared!');
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteListCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteListCommand.php
deleted file mode 100644
index 12af805..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteListCommand.php
+++ /dev/null
@@ -1,192 +0,0 @@
-router = $router;
- $this->routes = $router->getRoutes();
- }
-
- /**
- * Execute the console command.
- *
- * @return void
- */
- public function handle()
- {
- if (count($this->routes) === 0) {
- return $this->error("Your application doesn't have any routes.");
- }
-
- $this->displayRoutes($this->getRoutes());
- }
-
- /**
- * Compile the routes into a displayable format.
- *
- * @return array
- */
- protected function getRoutes()
- {
- $routes = collect($this->routes)->map(function ($route) {
- return $this->getRouteInformation($route);
- })->all();
-
- if ($sort = $this->option('sort')) {
- $routes = $this->sortRoutes($sort, $routes);
- }
-
- if ($this->option('reverse')) {
- $routes = array_reverse($routes);
- }
-
- return array_filter($routes);
- }
-
- /**
- * Get the route information for a given route.
- *
- * @param \Illuminate\Routing\Route $route
- * @return array
- */
- protected function getRouteInformation(Route $route)
- {
- return $this->filterRoute([
- 'host' => $route->domain(),
- 'method' => implode('|', $route->methods()),
- 'uri' => $route->uri(),
- 'name' => $route->getName(),
- 'action' => ltrim($route->getActionName(), '\\'),
- 'middleware' => $this->getMiddleware($route),
- ]);
- }
-
- /**
- * Sort the routes by a given element.
- *
- * @param string $sort
- * @param array $routes
- * @return array
- */
- protected function sortRoutes($sort, $routes)
- {
- return Arr::sort($routes, function ($route) use ($sort) {
- return $route[$sort];
- });
- }
-
- /**
- * Display the route information on the console.
- *
- * @param array $routes
- * @return void
- */
- protected function displayRoutes(array $routes)
- {
- $this->table($this->headers, $routes);
- }
-
- /**
- * Get before filters.
- *
- * @param \Illuminate\Routing\Route $route
- * @return string
- */
- protected function getMiddleware($route)
- {
- return collect($route->gatherMiddleware())->map(function ($middleware) {
- return $middleware instanceof Closure ? 'Closure' : $middleware;
- })->implode(',');
- }
-
- /**
- * Filter the route by URI and / or name.
- *
- * @param array $route
- * @return array|null
- */
- protected function filterRoute(array $route)
- {
- if (($this->option('name') && ! Str::contains($route['name'], $this->option('name'))) ||
- $this->option('path') && ! Str::contains($route['uri'], $this->option('path')) ||
- $this->option('method') && ! Str::contains($route['method'], strtoupper($this->option('method')))) {
- return;
- }
-
- return $route;
- }
-
- /**
- * Get the console command options.
- *
- * @return array
- */
- protected function getOptions()
- {
- return [
- ['method', null, InputOption::VALUE_OPTIONAL, 'Filter the routes by method'],
-
- ['name', null, InputOption::VALUE_OPTIONAL, 'Filter the routes by name'],
-
- ['path', null, InputOption::VALUE_OPTIONAL, 'Filter the routes by path'],
-
- ['reverse', 'r', InputOption::VALUE_NONE, 'Reverse the ordering of the routes'],
-
- ['sort', null, InputOption::VALUE_OPTIONAL, 'The column (host, method, uri, name, action, middleware) to sort by', 'uri'],
- ];
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/RuleMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/RuleMakeCommand.php
deleted file mode 100644
index 2b69953..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/RuleMakeCommand.php
+++ /dev/null
@@ -1,50 +0,0 @@
-line("Laravel development server started:host()}:{$this->port()}>");
-
- passthru($this->serverCommand(), $status);
-
- return $status;
- }
-
- /**
- * Get the full server command.
- *
- * @return string
- */
- protected function serverCommand()
- {
- return sprintf('%s -S %s:%s %s',
- ProcessUtils::escapeArgument((new PhpExecutableFinder)->find(false)),
- $this->host(),
- $this->port(),
- ProcessUtils::escapeArgument(base_path('server.php'))
- );
- }
-
- /**
- * Get the host for the command.
- *
- * @return string
- */
- protected function host()
- {
- return $this->input->getOption('host');
- }
-
- /**
- * Get the port for the command.
- *
- * @return string
- */
- protected function port()
- {
- return $this->input->getOption('port');
- }
-
- /**
- * Get the console command options.
- *
- * @return array
- */
- protected function getOptions()
- {
- return [
- ['host', null, InputOption::VALUE_OPTIONAL, 'The host address to serve the application on', '127.0.0.1'],
-
- ['port', null, InputOption::VALUE_OPTIONAL, 'The port to serve the application on', 8000],
- ];
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/StorageLinkCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/StorageLinkCommand.php
deleted file mode 100644
index 11e5c14..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/StorageLinkCommand.php
+++ /dev/null
@@ -1,40 +0,0 @@
-error('The "public/storage" directory already exists.');
- }
-
- $this->laravel->make('files')->link(
- storage_path('app/public'), public_path('storage')
- );
-
- $this->info('The [public/storage] directory has been linked.');
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/TestMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/TestMakeCommand.php
deleted file mode 100644
index ea08d7c..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/TestMakeCommand.php
+++ /dev/null
@@ -1,82 +0,0 @@
-option('unit')) {
- return __DIR__.'/stubs/unit-test.stub';
- }
-
- return __DIR__.'/stubs/test.stub';
- }
-
- /**
- * Get the destination class path.
- *
- * @param string $name
- * @return string
- */
- protected function getPath($name)
- {
- $name = Str::replaceFirst($this->rootNamespace(), '', $name);
-
- return base_path('tests').str_replace('\\', '/', $name).'.php';
- }
-
- /**
- * Get the default namespace for the class.
- *
- * @param string $rootNamespace
- * @return string
- */
- protected function getDefaultNamespace($rootNamespace)
- {
- if ($this->option('unit')) {
- return $rootNamespace.'\Unit';
- } else {
- return $rootNamespace.'\Feature';
- }
- }
-
- /**
- * Get the root namespace for the class.
- *
- * @return string
- */
- protected function rootNamespace()
- {
- return 'Tests';
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/UpCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/UpCommand.php
deleted file mode 100644
index 8055456..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/UpCommand.php
+++ /dev/null
@@ -1,34 +0,0 @@
-info('Application is now live.');
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/VendorPublishCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/VendorPublishCommand.php
deleted file mode 100644
index 5c878cd..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/VendorPublishCommand.php
+++ /dev/null
@@ -1,275 +0,0 @@
-files = $files;
- }
-
- /**
- * Execute the console command.
- *
- * @return void
- */
- public function handle()
- {
- $this->determineWhatShouldBePublished();
-
- foreach ($this->tags ?: [null] as $tag) {
- $this->publishTag($tag);
- }
-
- $this->info('Publishing complete.');
- }
-
- /**
- * Determine the provider or tag(s) to publish.
- *
- * @return void
- */
- protected function determineWhatShouldBePublished()
- {
- if ($this->option('all')) {
- return;
- }
-
- [$this->provider, $this->tags] = [
- $this->option('provider'), (array) $this->option('tag'),
- ];
-
- if (! $this->provider && ! $this->tags) {
- $this->promptForProviderOrTag();
- }
- }
-
- /**
- * Prompt for which provider or tag to publish.
- *
- * @return void
- */
- protected function promptForProviderOrTag()
- {
- $choice = $this->choice(
- "Which provider or tag's files would you like to publish?",
- $choices = $this->publishableChoices()
- );
-
- if ($choice == $choices[0] || is_null($choice)) {
- return;
- }
-
- $this->parseChoice($choice);
- }
-
- /**
- * The choices available via the prompt.
- *
- * @return array
- */
- protected function publishableChoices()
- {
- return array_merge(
- ['Publish files from all providers and tags listed below'],
- preg_filter('/^/', 'Provider: ', Arr::sort(ServiceProvider::publishableProviders())),
- preg_filter('/^/', 'Tag: ', Arr::sort(ServiceProvider::publishableGroups()))
- );
- }
-
- /**
- * Parse the answer that was given via the prompt.
- *
- * @param string $choice
- * @return void
- */
- protected function parseChoice($choice)
- {
- [$type, $value] = explode(': ', strip_tags($choice));
-
- if ($type === 'Provider') {
- $this->provider = $value;
- } elseif ($type === 'Tag') {
- $this->tags = [$value];
- }
- }
-
- /**
- * Publishes the assets for a tag.
- *
- * @param string $tag
- * @return mixed
- */
- protected function publishTag($tag)
- {
- foreach ($this->pathsToPublish($tag) as $from => $to) {
- $this->publishItem($from, $to);
- }
- }
-
- /**
- * Get all of the paths to publish.
- *
- * @param string $tag
- * @return array
- */
- protected function pathsToPublish($tag)
- {
- return ServiceProvider::pathsToPublish(
- $this->provider, $tag
- );
- }
-
- /**
- * Publish the given item from and to the given location.
- *
- * @param string $from
- * @param string $to
- * @return void
- */
- protected function publishItem($from, $to)
- {
- if ($this->files->isFile($from)) {
- return $this->publishFile($from, $to);
- } elseif ($this->files->isDirectory($from)) {
- return $this->publishDirectory($from, $to);
- }
-
- $this->error("Can't locate path: <{$from}>");
- }
-
- /**
- * Publish the file to the given path.
- *
- * @param string $from
- * @param string $to
- * @return void
- */
- protected function publishFile($from, $to)
- {
- if (! $this->files->exists($to) || $this->option('force')) {
- $this->createParentDirectory(dirname($to));
-
- $this->files->copy($from, $to);
-
- $this->status($from, $to, 'File');
- }
- }
-
- /**
- * Publish the directory to the given directory.
- *
- * @param string $from
- * @param string $to
- * @return void
- */
- protected function publishDirectory($from, $to)
- {
- $this->moveManagedFiles(new MountManager([
- 'from' => new Flysystem(new LocalAdapter($from)),
- 'to' => new Flysystem(new LocalAdapter($to)),
- ]));
-
- $this->status($from, $to, 'Directory');
- }
-
- /**
- * Move all the files in the given MountManager.
- *
- * @param \League\Flysystem\MountManager $manager
- * @return void
- */
- protected function moveManagedFiles($manager)
- {
- foreach ($manager->listContents('from://', true) as $file) {
- if ($file['type'] === 'file' && (! $manager->has('to://'.$file['path']) || $this->option('force'))) {
- $manager->put('to://'.$file['path'], $manager->read('from://'.$file['path']));
- }
- }
- }
-
- /**
- * Create the directory to house the published files if needed.
- *
- * @param string $directory
- * @return void
- */
- protected function createParentDirectory($directory)
- {
- if (! $this->files->isDirectory($directory)) {
- $this->files->makeDirectory($directory, 0755, true);
- }
- }
-
- /**
- * Write a status message to the console.
- *
- * @param string $from
- * @param string $to
- * @param string $type
- * @return void
- */
- protected function status($from, $to, $type)
- {
- $from = str_replace(base_path(), '', realpath($from));
-
- $to = str_replace(base_path(), '', realpath($to));
-
- $this->line('Copied '.$type.'['.$from.']To['.$to.']');
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ViewCacheCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ViewCacheCommand.php
deleted file mode 100644
index 408d959..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ViewCacheCommand.php
+++ /dev/null
@@ -1,85 +0,0 @@
-paths()->each(function ($path) {
- $this->compileViews($this->bladeFilesIn([$path]));
- });
-
- $this->info('Blade templates cached successfully!');
- }
-
- /**
- * Compile the given view files.
- *
- * @param \Illuminate\Support\Collection $views
- * @return void
- */
- protected function compileViews(Collection $views)
- {
- $compiler = $this->laravel['view']->getEngineResolver()->resolve('blade')->getCompiler();
-
- $views->map(function (SplFileInfo $file) use ($compiler) {
- $compiler->compile($file->getRealPath());
- });
- }
-
- /**
- * Get the Blade files in the given path.
- *
- * @param array $paths
- * @return \Illuminate\Support\Collection
- */
- protected function bladeFilesIn(array $paths)
- {
- return collect(
- Finder::create()
- ->in($paths)
- ->exclude('vendor')
- ->name('*.blade.php')
- ->files()
- );
- }
-
- /**
- * Get all of the possible view paths.
- *
- * @return \Illuminate\Support\Collection
- */
- protected function paths()
- {
- $finder = $this->laravel['view']->getFinder();
-
- return collect($finder->getPaths())->merge(
- collect($finder->getHints())->flatten()
- );
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ViewClearCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ViewClearCommand.php
deleted file mode 100644
index 251e393..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ViewClearCommand.php
+++ /dev/null
@@ -1,66 +0,0 @@
-files = $files;
- }
-
- /**
- * Execute the console command.
- *
- * @return void
- *
- * @throws \RuntimeException
- */
- public function handle()
- {
- $path = $this->laravel['config']['view.compiled'];
-
- if (! $path) {
- throw new RuntimeException('View path not found.');
- }
-
- foreach ($this->files->glob("{$path}/*") as $view) {
- $this->files->delete($view);
- }
-
- $this->info('Compiled views cleared!');
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/channel.stub b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/channel.stub
deleted file mode 100644
index bf261cc..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/channel.stub
+++ /dev/null
@@ -1,29 +0,0 @@
-view('view.name');
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/markdown-mail.stub b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/markdown-mail.stub
deleted file mode 100644
index 25a0cdc..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/markdown-mail.stub
+++ /dev/null
@@ -1,33 +0,0 @@
-markdown('DummyView');
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/markdown-notification.stub b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/markdown-notification.stub
deleted file mode 100644
index f554b2c..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/markdown-notification.stub
+++ /dev/null
@@ -1,58 +0,0 @@
-markdown('DummyView');
- }
-
- /**
- * Get the array representation of the notification.
- *
- * @param mixed $notifiable
- * @return array
- */
- public function toArray($notifiable)
- {
- return [
- //
- ];
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/markdown.stub b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/markdown.stub
deleted file mode 100644
index bc41428..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/markdown.stub
+++ /dev/null
@@ -1,12 +0,0 @@
-@component('mail::message')
-# Introduction
-
-The body of your message.
-
-@component('mail::button', ['url' => ''])
-Button Text
-@endcomponent
-
-Thanks,
-{{ config('app.name') }}
-@endcomponent
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/model.stub b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/model.stub
deleted file mode 100644
index f01a833..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/model.stub
+++ /dev/null
@@ -1,10 +0,0 @@
-line('The introduction to the notification.')
- ->action('Notification Action', url('/'))
- ->line('Thank you for using our application!');
- }
-
- /**
- * Get the array representation of the notification.
- *
- * @param mixed $notifiable
- * @return array
- */
- public function toArray($notifiable)
- {
- return [
- //
- ];
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/observer.plain.stub b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/observer.plain.stub
deleted file mode 100644
index daae325..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/observer.plain.stub
+++ /dev/null
@@ -1,8 +0,0 @@
-setRoutes(
- unserialize(base64_decode('{{routes}}'))
-);
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/rule.stub b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/rule.stub
deleted file mode 100644
index 826af0d..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/rule.stub
+++ /dev/null
@@ -1,40 +0,0 @@
-assertTrue(true);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/unit-test.stub b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/unit-test.stub
deleted file mode 100644
index 173fb8d..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/unit-test.stub
+++ /dev/null
@@ -1,20 +0,0 @@
-assertTrue(true);
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/EnvironmentDetector.php b/vendor/laravel/framework/src/Illuminate/Foundation/EnvironmentDetector.php
deleted file mode 100644
index 205f73b..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/EnvironmentDetector.php
+++ /dev/null
@@ -1,69 +0,0 @@
-detectConsoleEnvironment($callback, $consoleArgs);
- }
-
- return $this->detectWebEnvironment($callback);
- }
-
- /**
- * Set the application environment for a web request.
- *
- * @param \Closure $callback
- * @return string
- */
- protected function detectWebEnvironment(Closure $callback)
- {
- return call_user_func($callback);
- }
-
- /**
- * Set the application environment from command-line arguments.
- *
- * @param \Closure $callback
- * @param array $args
- * @return string
- */
- protected function detectConsoleEnvironment(Closure $callback, array $args)
- {
- // First we will check if an environment argument was passed via console arguments
- // and if it was that automatically overrides as the environment. Otherwise, we
- // will check the environment as a "web" request like a typical HTTP request.
- if (! is_null($value = $this->getEnvironmentArgument($args))) {
- return head(array_slice(explode('=', $value), 1));
- }
-
- return $this->detectWebEnvironment($callback);
- }
-
- /**
- * Get the environment argument from the console.
- *
- * @param array $args
- * @return string|null
- */
- protected function getEnvironmentArgument(array $args)
- {
- return Arr::first($args, function ($value) {
- return Str::startsWith($value, '--env');
- });
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Events/Dispatchable.php b/vendor/laravel/framework/src/Illuminate/Foundation/Events/Dispatchable.php
deleted file mode 100644
index 0018295..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Events/Dispatchable.php
+++ /dev/null
@@ -1,26 +0,0 @@
-locale = $locale;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php b/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php
deleted file mode 100644
index 4a2d285..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php
+++ /dev/null
@@ -1,482 +0,0 @@
-container = $container;
- }
-
- /**
- * Report or log an exception.
- *
- * @param \Exception $e
- * @return mixed
- *
- * @throws \Exception
- */
- public function report(Exception $e)
- {
- if ($this->shouldntReport($e)) {
- return;
- }
-
- if (method_exists($e, 'report')) {
- return $e->report();
- }
-
- try {
- $logger = $this->container->make(LoggerInterface::class);
- } catch (Exception $ex) {
- throw $e;
- }
-
- $logger->error(
- $e->getMessage(),
- array_merge($this->context(), ['exception' => $e]
- ));
- }
-
- /**
- * Determine if the exception should be reported.
- *
- * @param \Exception $e
- * @return bool
- */
- public function shouldReport(Exception $e)
- {
- return ! $this->shouldntReport($e);
- }
-
- /**
- * Determine if the exception is in the "do not report" list.
- *
- * @param \Exception $e
- * @return bool
- */
- protected function shouldntReport(Exception $e)
- {
- $dontReport = array_merge($this->dontReport, $this->internalDontReport);
-
- return ! is_null(Arr::first($dontReport, function ($type) use ($e) {
- return $e instanceof $type;
- }));
- }
-
- /**
- * Get the default context variables for logging.
- *
- * @return array
- */
- protected function context()
- {
- try {
- return array_filter([
- 'userId' => Auth::id(),
- 'email' => Auth::user() ? Auth::user()->email : null,
- ]);
- } catch (Throwable $e) {
- return [];
- }
- }
-
- /**
- * Render an exception into a response.
- *
- * @param \Illuminate\Http\Request $request
- * @param \Exception $e
- * @return \Illuminate\Http\Response|\Symfony\Component\HttpFoundation\Response
- */
- public function render($request, Exception $e)
- {
- if (method_exists($e, 'render') && $response = $e->render($request)) {
- return Router::toResponse($request, $response);
- } elseif ($e instanceof Responsable) {
- return $e->toResponse($request);
- }
-
- $e = $this->prepareException($e);
-
- if ($e instanceof HttpResponseException) {
- return $e->getResponse();
- } elseif ($e instanceof AuthenticationException) {
- return $this->unauthenticated($request, $e);
- } elseif ($e instanceof ValidationException) {
- return $this->convertValidationExceptionToResponse($e, $request);
- }
-
- return $request->expectsJson()
- ? $this->prepareJsonResponse($request, $e)
- : $this->prepareResponse($request, $e);
- }
-
- /**
- * Prepare exception for rendering.
- *
- * @param \Exception $e
- * @return \Exception
- */
- protected function prepareException(Exception $e)
- {
- if ($e instanceof ModelNotFoundException) {
- $e = new NotFoundHttpException($e->getMessage(), $e);
- } elseif ($e instanceof AuthorizationException) {
- $e = new AccessDeniedHttpException($e->getMessage(), $e);
- } elseif ($e instanceof TokenMismatchException) {
- $e = new HttpException(419, $e->getMessage(), $e);
- }
-
- return $e;
- }
-
- /**
- * Convert an authentication exception into a response.
- *
- * @param \Illuminate\Http\Request $request
- * @param \Illuminate\Auth\AuthenticationException $exception
- * @return \Illuminate\Http\Response
- */
- protected function unauthenticated($request, AuthenticationException $exception)
- {
- return $request->expectsJson()
- ? response()->json(['message' => $exception->getMessage()], 401)
- : redirect()->guest($exception->redirectTo() ?? route('login'));
- }
-
- /**
- * Create a response object from the given validation exception.
- *
- * @param \Illuminate\Validation\ValidationException $e
- * @param \Illuminate\Http\Request $request
- * @return \Symfony\Component\HttpFoundation\Response
- */
- protected function convertValidationExceptionToResponse(ValidationException $e, $request)
- {
- if ($e->response) {
- return $e->response;
- }
-
- return $request->expectsJson()
- ? $this->invalidJson($request, $e)
- : $this->invalid($request, $e);
- }
-
- /**
- * Convert a validation exception into a response.
- *
- * @param \Illuminate\Http\Request $request
- * @param \Illuminate\Validation\ValidationException $exception
- * @return \Illuminate\Http\Response
- */
- protected function invalid($request, ValidationException $exception)
- {
- return redirect($exception->redirectTo ?? url()->previous())
- ->withInput($request->except($this->dontFlash))
- ->withErrors($exception->errors(), $exception->errorBag);
- }
-
- /**
- * Convert a validation exception into a JSON response.
- *
- * @param \Illuminate\Http\Request $request
- * @param \Illuminate\Validation\ValidationException $exception
- * @return \Illuminate\Http\JsonResponse
- */
- protected function invalidJson($request, ValidationException $exception)
- {
- return response()->json([
- 'message' => $exception->getMessage(),
- 'errors' => $exception->errors(),
- ], $exception->status);
- }
-
- /**
- * Prepare a response for the given exception.
- *
- * @param \Illuminate\Http\Request $request
- * @param \Exception $e
- * @return \Symfony\Component\HttpFoundation\Response
- */
- protected function prepareResponse($request, Exception $e)
- {
- if (! $this->isHttpException($e) && config('app.debug')) {
- return $this->toIlluminateResponse($this->convertExceptionToResponse($e), $e);
- }
-
- if (! $this->isHttpException($e)) {
- $e = new HttpException(500, $e->getMessage());
- }
-
- return $this->toIlluminateResponse(
- $this->renderHttpException($e), $e
- );
- }
-
- /**
- * Create a Symfony response for the given exception.
- *
- * @param \Exception $e
- * @return \Symfony\Component\HttpFoundation\Response
- */
- protected function convertExceptionToResponse(Exception $e)
- {
- return SymfonyResponse::create(
- $this->renderExceptionContent($e),
- $this->isHttpException($e) ? $e->getStatusCode() : 500,
- $this->isHttpException($e) ? $e->getHeaders() : []
- );
- }
-
- /**
- * Get the response content for the given exception.
- *
- * @param \Exception $e
- * @return string
- */
- protected function renderExceptionContent(Exception $e)
- {
- try {
- return config('app.debug') && class_exists(Whoops::class)
- ? $this->renderExceptionWithWhoops($e)
- : $this->renderExceptionWithSymfony($e, config('app.debug'));
- } catch (Exception $e) {
- return $this->renderExceptionWithSymfony($e, config('app.debug'));
- }
- }
-
- /**
- * Render an exception to a string using "Whoops".
- *
- * @param \Exception $e
- * @return string
- */
- protected function renderExceptionWithWhoops(Exception $e)
- {
- return tap(new Whoops, function ($whoops) {
- $whoops->pushHandler($this->whoopsHandler());
-
- $whoops->writeToOutput(false);
-
- $whoops->allowQuit(false);
- })->handleException($e);
- }
-
- /**
- * Get the Whoops handler for the application.
- *
- * @return \Whoops\Handler\Handler
- */
- protected function whoopsHandler()
- {
- return (new WhoopsHandler)->forDebug();
- }
-
- /**
- * Render an exception to a string using Symfony.
- *
- * @param \Exception $e
- * @param bool $debug
- * @return string
- */
- protected function renderExceptionWithSymfony(Exception $e, $debug)
- {
- return (new SymfonyExceptionHandler($debug))->getHtml(
- FlattenException::create($e)
- );
- }
-
- /**
- * Render the given HttpException.
- *
- * @param \Symfony\Component\HttpKernel\Exception\HttpException $e
- * @return \Symfony\Component\HttpFoundation\Response
- */
- protected function renderHttpException(HttpException $e)
- {
- $this->registerErrorViewPaths();
-
- if (view()->exists($view = "errors::{$e->getStatusCode()}")) {
- return response()->view($view, [
- 'errors' => new ViewErrorBag,
- 'exception' => $e,
- ], $e->getStatusCode(), $e->getHeaders());
- }
-
- return $this->convertExceptionToResponse($e);
- }
-
- /**
- * Register the error template hint paths.
- *
- * @return void
- */
- protected function registerErrorViewPaths()
- {
- $paths = collect(config('view.paths'));
-
- View::replaceNamespace('errors', $paths->map(function ($path) {
- return "{$path}/errors";
- })->push(__DIR__.'/views')->all());
- }
-
- /**
- * Map the given exception into an Illuminate response.
- *
- * @param \Symfony\Component\HttpFoundation\Response $response
- * @param \Exception $e
- * @return \Illuminate\Http\Response
- */
- protected function toIlluminateResponse($response, Exception $e)
- {
- if ($response instanceof SymfonyRedirectResponse) {
- $response = new RedirectResponse(
- $response->getTargetUrl(), $response->getStatusCode(), $response->headers->all()
- );
- } else {
- $response = new Response(
- $response->getContent(), $response->getStatusCode(), $response->headers->all()
- );
- }
-
- return $response->withException($e);
- }
-
- /**
- * Prepare a JSON response for the given exception.
- *
- * @param \Illuminate\Http\Request $request
- * @param \Exception $e
- * @return \Illuminate\Http\JsonResponse
- */
- protected function prepareJsonResponse($request, Exception $e)
- {
- return new JsonResponse(
- $this->convertExceptionToArray($e),
- $this->isHttpException($e) ? $e->getStatusCode() : 500,
- $this->isHttpException($e) ? $e->getHeaders() : [],
- JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES
- );
- }
-
- /**
- * Convert the given exception to an array.
- *
- * @param \Exception $e
- * @return array
- */
- protected function convertExceptionToArray(Exception $e)
- {
- return config('app.debug') ? [
- 'message' => $e->getMessage(),
- 'exception' => get_class($e),
- 'file' => $e->getFile(),
- 'line' => $e->getLine(),
- 'trace' => collect($e->getTrace())->map(function ($trace) {
- return Arr::except($trace, ['args']);
- })->all(),
- ] : [
- 'message' => $this->isHttpException($e) ? $e->getMessage() : 'Server Error',
- ];
- }
-
- /**
- * Render an exception to the console.
- *
- * @param \Symfony\Component\Console\Output\OutputInterface $output
- * @param \Exception $e
- * @return void
- */
- public function renderForConsole($output, Exception $e)
- {
- (new ConsoleApplication)->renderException($e, $output);
- }
-
- /**
- * Determine if the given exception is an HTTP exception.
- *
- * @param \Exception $e
- * @return bool
- */
- protected function isHttpException(Exception $e)
- {
- return $e instanceof HttpExceptionInterface;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/WhoopsHandler.php b/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/WhoopsHandler.php
deleted file mode 100644
index b94a7ac..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/WhoopsHandler.php
+++ /dev/null
@@ -1,86 +0,0 @@
-handleUnconditionally(true);
-
- $this->registerApplicationPaths($handler)
- ->registerBlacklist($handler)
- ->registerEditor($handler);
- });
- }
-
- /**
- * Register the application paths with the handler.
- *
- * @param \Whoops\Handler\PrettyPageHandler $handler
- * @return $this
- */
- protected function registerApplicationPaths($handler)
- {
- $handler->setApplicationPaths(
- array_flip($this->directoriesExceptVendor())
- );
-
- return $this;
- }
-
- /**
- * Get the application paths except for the "vendor" directory.
- *
- * @return array
- */
- protected function directoriesExceptVendor()
- {
- return Arr::except(
- array_flip((new Filesystem)->directories(base_path())),
- [base_path('vendor')]
- );
- }
-
- /**
- * Register the blacklist with the handler.
- *
- * @param \Whoops\Handler\PrettyPageHandler $handler
- * @return $this
- */
- protected function registerBlacklist($handler)
- {
- foreach (config('app.debug_blacklist', []) as $key => $secrets) {
- foreach ($secrets as $secret) {
- $handler->blacklist($key, $secret);
- }
- }
-
- return $this;
- }
-
- /**
- * Register the editor with the handler.
- *
- * @param \Whoops\Handler\PrettyPageHandler $handler
- * @return $this
- */
- protected function registerEditor($handler)
- {
- if (config('app.editor', false)) {
- $handler->setEditor(config('app.editor'));
- }
-
- return $this;
- }
-}
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/401.blade.php b/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/401.blade.php
deleted file mode 100644
index e606036..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/401.blade.php
+++ /dev/null
@@ -1,11 +0,0 @@
-@extends('errors::illustrated-layout')
-
-@section('code', '401')
-@section('title', __('Unauthorized'))
-
-@section('image')
-
-
-@endsection
-
-@section('message', __('Sorry, you are not authorized to access this page.'))
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/403.blade.php b/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/403.blade.php
deleted file mode 100644
index aea05cf..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/403.blade.php
+++ /dev/null
@@ -1,11 +0,0 @@
-@extends('errors::illustrated-layout')
-
-@section('code', '403')
-@section('title', __('Forbidden'))
-
-@section('image')
-
-
-@endsection
-
-@section('message', __($exception->getMessage() ?: 'Sorry, you are forbidden from accessing this page.'))
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/404.blade.php b/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/404.blade.php
deleted file mode 100644
index 2a00449..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/404.blade.php
+++ /dev/null
@@ -1,11 +0,0 @@
-@extends('errors::illustrated-layout')
-
-@section('code', '404')
-@section('title', __('Page Not Found'))
-
-@section('image')
-
-
-@endsection
-
-@section('message', __('Sorry, the page you are looking for could not be found.'))
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/419.blade.php b/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/419.blade.php
deleted file mode 100644
index 32044f2..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/419.blade.php
+++ /dev/null
@@ -1,11 +0,0 @@
-@extends('errors::illustrated-layout')
-
-@section('code', '419')
-@section('title', __('Page Expired'))
-
-@section('image')
-
-
-@endsection
-
-@section('message', __('Sorry, your session has expired. Please refresh and try again.'))
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/429.blade.php b/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/429.blade.php
deleted file mode 100644
index 9bbbb8b..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/429.blade.php
+++ /dev/null
@@ -1,11 +0,0 @@
-@extends('errors::illustrated-layout')
-
-@section('code', '429')
-@section('title', __('Too Many Requests'))
-
-@section('image')
-
-
-@endsection
-
-@section('message', __('Sorry, you are making too many requests to our servers.'))
diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/500.blade.php b/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/500.blade.php
deleted file mode 100644
index 9cc3aee..0000000
--- a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/500.blade.php
+++ /dev/null
@@ -1,11 +0,0 @@
-@extends('errors::illustrated-layout')
-
-@section('code', '500')
-@section('title', __('Error'))
-
-@section('image')
-