diff --git a/_ide_helper.php b/_ide_helper.php index bf992929..d948352b 100644 --- a/_ide_helper.php +++ b/_ide_helper.php @@ -5,7 +5,7 @@ /** * A helper file for Laravel, to provide autocomplete information to your IDE - * Generated for Laravel 11.41.3. + * Generated for Laravel 11.45.1. * * This file should not be included in your code, only analyzed by your IDE! * @@ -663,9 +663,10 @@ public static function registerDeferredProvider($provider, $service = null) /** * Resolve the given type from the container. * - * @param string $abstract + * @template TClass of object + * @param string|class-string $abstract * @param array $parameters - * @return mixed + * @return ($abstract is class-string ? TClass : mixed) * @throws \Illuminate\Contracts\Container\BindingResolutionException * @static */ @@ -1464,9 +1465,10 @@ public static function extend($abstract, $closure) /** * Register an existing instance as shared in the container. * + * @template TInstance of mixed * @param string $abstract - * @param mixed $instance - * @return mixed + * @param TInstance $instance + * @return TInstance * @static */ public static function instance($abstract, $instance) @@ -1587,8 +1589,9 @@ public static function call($callback, $parameters = [], $defaultMethod = null) /** * Get a closure to resolve the given type from the container. * - * @param string $abstract - * @return \Closure + * @template TClass of object + * @param string|class-string $abstract + * @return ($abstract is class-string ? \Closure(): TClass : \Closure(): mixed) * @static */ public static function factory($abstract) @@ -1601,9 +1604,10 @@ public static function factory($abstract) /** * An alias function name for make(). * - * @param string|callable $abstract + * @template TClass of object + * @param string|class-string|callable $abstract * @param array $parameters - * @return mixed + * @return ($abstract is class-string ? TClass : mixed) * @throws \Illuminate\Contracts\Container\BindingResolutionException * @static */ @@ -1615,13 +1619,11 @@ public static function makeWith($abstract, $parameters = []) } /** - * Finds an entry of the container by its identifier and returns it. + * {@inheritdoc} * - * @return mixed - * @param string $id Identifier of the entry to look for. - * @throws NotFoundExceptionInterface No entry was found for **this** identifier. - * @throws ContainerExceptionInterface Error while retrieving the entry. - * @return mixed Entry. + * @template TClass of object + * @param string|class-string $id + * @return ($id is class-string ? TClass : mixed) * @static */ public static function get($id) @@ -1634,8 +1636,9 @@ public static function get($id) /** * Instantiate a concrete instance of the given type. * - * @param \Closure|string $concrete - * @return mixed + * @template TClass of object + * @param \Closure(static, array): TClass|class-string $concrete + * @return TClass * @throws \Illuminate\Contracts\Container\BindingResolutionException * @throws \Illuminate\Contracts\Container\CircularDependencyException * @static @@ -3318,6 +3321,20 @@ public static function precompiler($precompiler) $instance->precompiler($precompiler); } + /** + * Execute the given callback using a custom echo format. + * + * @param string $format + * @param callable $callback + * @return string + * @static + */ + public static function usingEchoFormat($format, $callback) + { + /** @var \Illuminate\View\Compilers\BladeCompiler $instance */ + return $instance->usingEchoFormat($format, $callback); + } + /** * Set the echo format to be used by the compiler. * @@ -5638,6 +5655,19 @@ public static function has($key) return $instance->has($key); } + /** + * Determine if the given key is missing. + * + * @param string $key + * @return bool + * @static + */ + public static function missing($key) + { + /** @var \Illuminate\Log\Context\Repository $instance */ + return $instance->missing($key); + } + /** * Determine if the given key exists within the hidden context data. * @@ -5651,6 +5681,19 @@ public static function hasHidden($key) return $instance->hasHidden($key); } + /** + * Determine if the given key is missing within the hidden context data. + * + * @param string $key + * @return bool + * @static + */ + public static function missingHidden($key) + { + /** @var \Illuminate\Log\Context\Repository $instance */ + return $instance->missingHidden($key); + } + /** * Retrieve all the context data. * @@ -9300,7 +9343,7 @@ public static function denyIf($condition, $message = null, $code = null) /** * Define a new ability. * - * @param \BackedEnum|string $ability + * @param \UnitEnum|string $ability * @param callable|array|string $callback * @return \Illuminate\Auth\Access\Gate * @throws \InvalidArgumentException @@ -9370,7 +9413,7 @@ public static function after($callback) /** * Determine if all of the given abilities should be granted for the current user. * - * @param iterable|\BackedEnum|string $ability + * @param iterable|\UnitEnum|string $ability * @param array|mixed $arguments * @return bool * @static @@ -9384,7 +9427,7 @@ public static function allows($ability, $arguments = []) /** * Determine if any of the given abilities should be denied for the current user. * - * @param iterable|\BackedEnum|string $ability + * @param iterable|\UnitEnum|string $ability * @param array|mixed $arguments * @return bool * @static @@ -9398,7 +9441,7 @@ public static function denies($ability, $arguments = []) /** * Determine if all of the given abilities should be granted for the current user. * - * @param iterable|\BackedEnum|string $abilities + * @param iterable|\UnitEnum|string $abilities * @param array|mixed $arguments * @return bool * @static @@ -9412,7 +9455,7 @@ public static function check($abilities, $arguments = []) /** * Determine if any one of the given abilities should be granted for the current user. * - * @param iterable|\BackedEnum|string $abilities + * @param iterable|\UnitEnum|string $abilities * @param array|mixed $arguments * @return bool * @static @@ -9426,7 +9469,7 @@ public static function any($abilities, $arguments = []) /** * Determine if all of the given abilities should be denied for the current user. * - * @param iterable|\BackedEnum|string $abilities + * @param iterable|\UnitEnum|string $abilities * @param array|mixed $arguments * @return bool * @static @@ -9440,7 +9483,7 @@ public static function none($abilities, $arguments = []) /** * Determine if the given ability should be granted for the current user. * - * @param \BackedEnum|string $ability + * @param \UnitEnum|string $ability * @param array|mixed $arguments * @return \Illuminate\Auth\Access\Response * @throws \Illuminate\Auth\Access\AuthorizationException @@ -9455,7 +9498,7 @@ public static function authorize($ability, $arguments = []) /** * Inspect the user for the given ability. * - * @param \BackedEnum|string $ability + * @param \UnitEnum|string $ability * @param array|mixed $arguments * @return \Illuminate\Auth\Access\Response * @static @@ -11899,6 +11942,7 @@ public static function flushMacros() * @method static void deleteToken(\Illuminate\Contracts\Auth\CanResetPassword $user) * @method static bool tokenExists(\Illuminate\Contracts\Auth\CanResetPassword $user, string $token) * @method static \Illuminate\Auth\Passwords\TokenRepositoryInterface getRepository() + * @method static \Illuminate\Support\Timebox getTimebox() * @see \Illuminate\Auth\Passwords\PasswordBrokerManager * @see \Illuminate\Auth\Passwords\PasswordBroker */ @@ -11957,6 +12001,7 @@ public static function setDefaultDriver($name) * @method static \Illuminate\Process\PendingProcess options(array $options) * @method static \Illuminate\Contracts\Process\ProcessResult run(array|string|null $command = null, callable|null $output = null) * @method static \Illuminate\Process\InvokedProcess start(array|string|null $command = null, callable|null $output = null) + * @method static bool supportsTty() * @method static \Illuminate\Process\PendingProcess withFakeHandlers(array $fakeHandlers) * @method static \Illuminate\Process\PendingProcess|mixed when(\Closure|mixed|null $value = null, callable|null $callback = null, callable|null $default = null) * @method static \Illuminate\Process\PendingProcess|mixed unless(\Closure|mixed|null $value = null, callable|null $callback = null, callable|null $default = null) @@ -12619,6 +12664,19 @@ public static function pushed($job, $callback = null) return $instance->pushed($job, $callback); } + /** + * Get all of the raw pushes matching a truth-test callback. + * + * @param null|\Closure(string, ?string, array): bool $callback + * @return \Illuminate\Support\Collection + * @static + */ + public static function pushedRaw($callback = null) + { + /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */ + return $instance->pushedRaw($callback); + } + /** * Determine if there are any stored jobs for a given class. * @@ -12775,6 +12833,18 @@ public static function pushedJobs() return $instance->pushedJobs(); } + /** + * Get the payloads that were pushed raw. + * + * @return list + * @static + */ + public static function rawPushes() + { + /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */ + return $instance->rawPushes(); + } + /** * Specify if jobs should be serialized and restored when being "pushed" to the queue. * @@ -15725,7 +15795,7 @@ public static function whenMissing($key, $callback, $default = null) } /** - * Retrieve data from the instnce as a Stringable instance. + * Retrieve data from the instance as a Stringable instance. * * @param string $key * @param mixed $default @@ -16064,6 +16134,21 @@ public static function jsonp($callback, $data = [], $status = 200, $headers = [] return $instance->jsonp($callback, $data, $status, $headers, $options); } + /** + * Create a new event stream response. + * + * @param \Closure $callback + * @param array $headers + * @param string $endStreamWith + * @return \Symfony\Component\HttpFoundation\StreamedResponse + * @static + */ + public static function eventStream($callback, $headers = [], $endStreamWith = '') + { + /** @var \Illuminate\Routing\ResponseFactory $instance */ + return $instance->eventStream($callback, $headers, $endStreamWith); + } + /** * Create a new streamed response instance. * @@ -16285,6 +16370,7 @@ public static function flushMacros() * @method static \Illuminate\Routing\RouteRegistrar whereUuid(array|string $parameters) * @method static \Illuminate\Routing\RouteRegistrar whereIn(array|string $parameters, array $values) * @method static \Illuminate\Routing\RouteRegistrar as(string $value) + * @method static \Illuminate\Routing\RouteRegistrar can(\UnitEnum|string $ability, array|string $models = []) * @method static \Illuminate\Routing\RouteRegistrar controller(string $controller) * @method static \Illuminate\Routing\RouteRegistrar domain(\BackedEnum|string $value) * @method static \Illuminate\Routing\RouteRegistrar middleware(array|string|null $middleware) @@ -19096,7 +19182,7 @@ class Storage { * Get a filesystem instance. * * @param string|null $name - * @return \Illuminate\Filesystem\LocalFilesystemAdapter + * @return \Illuminate\Filesystem\AwsS3V3Adapter * @static */ public static function drive($name = null) @@ -19109,7 +19195,7 @@ public static function drive($name = null) * Get a filesystem instance. * * @param string|null $name - * @return \Illuminate\Filesystem\LocalFilesystemAdapter + * @return \Illuminate\Filesystem\AwsS3V3Adapter * @static */ public static function disk($name = null) @@ -19134,7 +19220,7 @@ public static function cloud() * Build an on-demand disk. * * @param string|array $config - * @return \Illuminate\Filesystem\LocalFilesystemAdapter + * @return \Illuminate\Filesystem\AwsS3V3Adapter * @static */ public static function build($config) @@ -19148,7 +19234,7 @@ public static function build($config) * * @param array $config * @param string $name - * @return \Illuminate\Filesystem\LocalFilesystemAdapter + * @return \Illuminate\Filesystem\AwsS3V3Adapter * @static */ public static function createLocalDriver($config, $name = 'local') @@ -19161,7 +19247,7 @@ public static function createLocalDriver($config, $name = 'local') * Create an instance of the ftp driver. * * @param array $config - * @return \Illuminate\Filesystem\LocalFilesystemAdapter + * @return \Illuminate\Filesystem\AwsS3V3Adapter * @static */ public static function createFtpDriver($config) @@ -19174,7 +19260,7 @@ public static function createFtpDriver($config) * Create an instance of the sftp driver. * * @param array $config - * @return \Illuminate\Filesystem\LocalFilesystemAdapter + * @return \Illuminate\Filesystem\AwsS3V3Adapter * @static */ public static function createSftpDriver($config) @@ -19200,7 +19286,7 @@ public static function createS3Driver($config) * Create a scoped driver. * * @param array $config - * @return \Illuminate\Filesystem\LocalFilesystemAdapter + * @return \Illuminate\Filesystem\AwsS3V3Adapter * @static */ public static function createScopedDriver($config) @@ -19300,6 +19386,20 @@ public static function setApplication($app) return $instance->setApplication($app); } + /** + * Get the URL for the file at the given path. + * + * @param string $path + * @return string + * @throws \RuntimeException + * @static + */ + public static function url($path) + { + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ + return $instance->url($path); + } + /** * Determine if temporary URLs can be generated. * @@ -19308,7 +19408,7 @@ public static function setApplication($app) */ public static function providesTemporaryUrls() { - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->providesTemporaryUrls(); } @@ -19323,35 +19423,35 @@ public static function providesTemporaryUrls() */ public static function temporaryUrl($path, $expiration, $options = []) { - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->temporaryUrl($path, $expiration, $options); } /** - * Specify the name of the disk the adapter is managing. + * Get a temporary upload URL for the file at the given path. * - * @param string $disk - * @return \Illuminate\Filesystem\LocalFilesystemAdapter + * @param string $path + * @param \DateTimeInterface $expiration + * @param array $options + * @return array * @static */ - public static function diskName($disk) + public static function temporaryUploadUrl($path, $expiration, $options = []) { - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ - return $instance->diskName($disk); + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ + return $instance->temporaryUploadUrl($path, $expiration, $options); } /** - * Indiate that signed URLs should serve the corresponding files. + * Get the underlying S3 client. * - * @param bool $serve - * @param \Closure|null $urlGeneratorResolver - * @return \Illuminate\Filesystem\LocalFilesystemAdapter + * @return \Aws\S3\S3Client * @static */ - public static function shouldServeSignedUrls($serve = true, $urlGeneratorResolver = null) + public static function getClient() { - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ - return $instance->shouldServeSignedUrls($serve, $urlGeneratorResolver); + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ + return $instance->getClient(); } /** @@ -19359,13 +19459,13 @@ public static function shouldServeSignedUrls($serve = true, $urlGeneratorResolve * * @param string|array $path * @param string|null $content - * @return \Illuminate\Filesystem\LocalFilesystemAdapter + * @return \Illuminate\Filesystem\AwsS3V3Adapter * @static */ public static function assertExists($path, $content = null) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->assertExists($path, $content); } @@ -19375,13 +19475,13 @@ public static function assertExists($path, $content = null) * @param string $path * @param int $count * @param bool $recursive - * @return \Illuminate\Filesystem\LocalFilesystemAdapter + * @return \Illuminate\Filesystem\AwsS3V3Adapter * @static */ public static function assertCount($path, $count, $recursive = false) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->assertCount($path, $count, $recursive); } @@ -19389,13 +19489,13 @@ public static function assertCount($path, $count, $recursive = false) * Assert that the given file or directory does not exist. * * @param string|array $path - * @return \Illuminate\Filesystem\LocalFilesystemAdapter + * @return \Illuminate\Filesystem\AwsS3V3Adapter * @static */ public static function assertMissing($path) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->assertMissing($path); } @@ -19403,13 +19503,13 @@ public static function assertMissing($path) * Assert that the given directory is empty. * * @param string $path - * @return \Illuminate\Filesystem\LocalFilesystemAdapter + * @return \Illuminate\Filesystem\AwsS3V3Adapter * @static */ public static function assertDirectoryEmpty($path) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->assertDirectoryEmpty($path); } @@ -19423,7 +19523,7 @@ public static function assertDirectoryEmpty($path) public static function exists($path) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->exists($path); } @@ -19437,7 +19537,7 @@ public static function exists($path) public static function missing($path) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->missing($path); } @@ -19451,7 +19551,7 @@ public static function missing($path) public static function fileExists($path) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->fileExists($path); } @@ -19465,7 +19565,7 @@ public static function fileExists($path) public static function fileMissing($path) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->fileMissing($path); } @@ -19479,7 +19579,7 @@ public static function fileMissing($path) public static function directoryExists($path) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->directoryExists($path); } @@ -19493,7 +19593,7 @@ public static function directoryExists($path) public static function directoryMissing($path) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->directoryMissing($path); } @@ -19507,7 +19607,7 @@ public static function directoryMissing($path) public static function path($path) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->path($path); } @@ -19521,7 +19621,7 @@ public static function path($path) public static function get($path) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->get($path); } @@ -19536,7 +19636,7 @@ public static function get($path) public static function json($path, $flags = 0) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->json($path, $flags); } @@ -19553,7 +19653,7 @@ public static function json($path, $flags = 0) public static function response($path, $name = null, $headers = [], $disposition = 'inline') { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->response($path, $name, $headers, $disposition); } @@ -19570,7 +19670,7 @@ public static function response($path, $name = null, $headers = [], $disposition public static function serve($request, $path, $name = null, $headers = []) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->serve($request, $path, $name, $headers); } @@ -19586,7 +19686,7 @@ public static function serve($request, $path, $name = null, $headers = []) public static function download($path, $name = null, $headers = []) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->download($path, $name, $headers); } @@ -19602,7 +19702,7 @@ public static function download($path, $name = null, $headers = []) public static function put($path, $contents, $options = []) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->put($path, $contents, $options); } @@ -19618,7 +19718,7 @@ public static function put($path, $contents, $options = []) public static function putFile($path, $file = null, $options = []) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->putFile($path, $file, $options); } @@ -19635,7 +19735,7 @@ public static function putFile($path, $file = null, $options = []) public static function putFileAs($path, $file, $name = null, $options = []) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->putFileAs($path, $file, $name, $options); } @@ -19649,7 +19749,7 @@ public static function putFileAs($path, $file, $name = null, $options = []) public static function getVisibility($path) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->getVisibility($path); } @@ -19664,7 +19764,7 @@ public static function getVisibility($path) public static function setVisibility($path, $visibility) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->setVisibility($path, $visibility); } @@ -19681,7 +19781,7 @@ public static function prepend($path, $data, $separator = ' ') { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->prepend($path, $data, $separator); } @@ -19698,7 +19798,7 @@ public static function append($path, $data, $separator = ' ') { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->append($path, $data, $separator); } @@ -19712,7 +19812,7 @@ public static function append($path, $data, $separator = ' public static function delete($paths) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->delete($paths); } @@ -19727,7 +19827,7 @@ public static function delete($paths) public static function copy($from, $to) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->copy($from, $to); } @@ -19742,7 +19842,7 @@ public static function copy($from, $to) public static function move($from, $to) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->move($from, $to); } @@ -19756,7 +19856,7 @@ public static function move($from, $to) public static function size($path) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->size($path); } @@ -19770,7 +19870,7 @@ public static function size($path) public static function checksum($path, $options = []) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->checksum($path, $options); } @@ -19784,7 +19884,7 @@ public static function checksum($path, $options = []) public static function mimeType($path) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->mimeType($path); } @@ -19798,7 +19898,7 @@ public static function mimeType($path) public static function lastModified($path) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->lastModified($path); } @@ -19812,7 +19912,7 @@ public static function lastModified($path) public static function readStream($path) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->readStream($path); } @@ -19828,42 +19928,10 @@ public static function readStream($path) public static function writeStream($path, $resource, $options = []) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->writeStream($path, $resource, $options); } - /** - * Get the URL for the file at the given path. - * - * @param string $path - * @return string - * @throws \RuntimeException - * @static - */ - public static function url($path) - { - //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ - return $instance->url($path); - } - - /** - * Get a temporary upload URL for the file at the given path. - * - * @param string $path - * @param \DateTimeInterface $expiration - * @param array $options - * @return array - * @throws \RuntimeException - * @static - */ - public static function temporaryUploadUrl($path, $expiration, $options = []) - { - //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ - return $instance->temporaryUploadUrl($path, $expiration, $options); - } - /** * Get an array of all files in a directory. * @@ -19875,7 +19943,7 @@ public static function temporaryUploadUrl($path, $expiration, $options = []) public static function files($directory = null, $recursive = false) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->files($directory, $recursive); } @@ -19889,7 +19957,7 @@ public static function files($directory = null, $recursive = false) public static function allFiles($directory = null) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->allFiles($directory); } @@ -19904,7 +19972,7 @@ public static function allFiles($directory = null) public static function directories($directory = null, $recursive = false) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->directories($directory, $recursive); } @@ -19918,7 +19986,7 @@ public static function directories($directory = null, $recursive = false) public static function allDirectories($directory = null) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->allDirectories($directory); } @@ -19932,7 +20000,7 @@ public static function allDirectories($directory = null) public static function makeDirectory($path) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->makeDirectory($path); } @@ -19946,7 +20014,7 @@ public static function makeDirectory($path) public static function deleteDirectory($directory) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->deleteDirectory($directory); } @@ -19959,7 +20027,7 @@ public static function deleteDirectory($directory) public static function getDriver() { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->getDriver(); } @@ -19972,7 +20040,7 @@ public static function getDriver() public static function getAdapter() { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->getAdapter(); } @@ -19985,7 +20053,7 @@ public static function getAdapter() public static function getConfig() { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->getConfig(); } @@ -19999,7 +20067,7 @@ public static function getConfig() public static function serveUsing($callback) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ $instance->serveUsing($callback); } @@ -20013,7 +20081,7 @@ public static function serveUsing($callback) public static function buildTemporaryUrlsUsing($callback) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ $instance->buildTemporaryUrlsUsing($callback); } @@ -20030,7 +20098,7 @@ public static function buildTemporaryUrlsUsing($callback) */ public static function when($value = null, $callback = null, $default = null) { - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->when($value, $callback, $default); } @@ -20047,7 +20115,7 @@ public static function when($value = null, $callback = null, $default = null) */ public static function unless($value = null, $callback = null, $default = null) { - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->unless($value, $callback, $default); } @@ -20063,7 +20131,7 @@ public static function unless($value = null, $callback = null, $default = null) public static function macro($name, $macro) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - \Illuminate\Filesystem\LocalFilesystemAdapter::macro($name, $macro); + \Illuminate\Filesystem\AwsS3V3Adapter::macro($name, $macro); } /** @@ -20078,7 +20146,7 @@ public static function macro($name, $macro) public static function mixin($mixin, $replace = true) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - \Illuminate\Filesystem\LocalFilesystemAdapter::mixin($mixin, $replace); + \Illuminate\Filesystem\AwsS3V3Adapter::mixin($mixin, $replace); } /** @@ -20091,7 +20159,7 @@ public static function mixin($mixin, $replace = true) public static function hasMacro($name) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - return \Illuminate\Filesystem\LocalFilesystemAdapter::hasMacro($name); + return \Illuminate\Filesystem\AwsS3V3Adapter::hasMacro($name); } /** @@ -20103,7 +20171,7 @@ public static function hasMacro($name) public static function flushMacros() { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - \Illuminate\Filesystem\LocalFilesystemAdapter::flushMacros(); + \Illuminate\Filesystem\AwsS3V3Adapter::flushMacros(); } /** @@ -20118,7 +20186,7 @@ public static function flushMacros() public static function macroCall($method, $parameters) { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter - /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\AwsS3V3Adapter $instance */ return $instance->macroCall($method, $parameters); } @@ -20523,11 +20591,25 @@ public static function forceHttps($force = true) $instance->forceHttps($force); } + /** + * Set the URL origin for all generated URLs. + * + * @param string|null $root + * @return void + * @static + */ + public static function useOrigin($root) + { + /** @var \Illuminate\Routing\UrlGenerator $instance */ + $instance->useOrigin($root); + } + /** * Set the forced root URL. * * @param string|null $root * @return void + * @deprecated Use useOrigin * @static */ public static function forceRootUrl($root) @@ -20536,6 +20618,19 @@ public static function forceRootUrl($root) $instance->forceRootUrl($root); } + /** + * Set the URL origin for all generated asset URLs. + * + * @param string|null $root + * @return void + * @static + */ + public static function useAssetOrigin($root) + { + /** @var \Illuminate\Routing\UrlGenerator $instance */ + $instance->useAssetOrigin($root); + } + /** * Set a callback to be used to format the host of generated URLs. * @@ -22342,6 +22437,43 @@ public static function flushMacros() } } +namespace AnourValar\EloquentSerialize\Facades { + /** + * + * + */ + class EloquentSerializeFacade { + /** + * Pack + * + * @param \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Eloquent\Relations\Relation $builder + * @return string + * @throws \RuntimeException + * @static + */ + public static function serialize($builder) + { + /** @var \AnourValar\EloquentSerialize\Service $instance */ + return $instance->serialize($builder); + } + + /** + * Unpack + * + * @param mixed $package + * @throws \LogicException + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function unserialize($package) + { + /** @var \AnourValar\EloquentSerialize\Service $instance */ + return $instance->unserialize($package); + } + + } + } + namespace Barryvdh\Debugbar\Facades { /** * @@ -23095,2060 +23227,6472 @@ public static function getContainer() } } -namespace Illuminate\Support { +namespace Livewire { /** * * - * @template TKey of array-key - * @template-covariant TValue - * @implements \ArrayAccess - * @implements \Illuminate\Support\Enumerable + * @see \Livewire\LivewireManager */ - class Collection { + class Livewire { /** * * - * @see \Barryvdh\Debugbar\ServiceProvider::register() * @static */ - public static function debug() + public static function setProvider($provider) { - return \Illuminate\Support\Collection::debug(); + /** @var \Livewire\LivewireManager $instance */ + return $instance->setProvider($provider); } - } - } - -namespace Illuminate\Http { - /** - * - * - */ - class Request { /** * * - * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestValidation() - * @param array $rules - * @param mixed $params * @static */ - public static function validate($rules, ...$params) + public static function provide($callback) { - return \Illuminate\Http\Request::validate($rules, ...$params); + /** @var \Livewire\LivewireManager $instance */ + return $instance->provide($callback); } /** * * - * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestValidation() - * @param string $errorBag - * @param array $rules - * @param mixed $params * @static */ - public static function validateWithBag($errorBag, $rules, ...$params) + public static function component($name, $class = null) { - return \Illuminate\Http\Request::validateWithBag($errorBag, $rules, ...$params); + /** @var \Livewire\LivewireManager $instance */ + return $instance->component($name, $class); } /** * * - * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation() - * @param mixed $absolute * @static */ - public static function hasValidSignature($absolute = true) + public static function componentHook($hook) { - return \Illuminate\Http\Request::hasValidSignature($absolute); + /** @var \Livewire\LivewireManager $instance */ + return $instance->componentHook($hook); } /** * * - * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation() * @static */ - public static function hasValidRelativeSignature() + public static function propertySynthesizer($synth) { - return \Illuminate\Http\Request::hasValidRelativeSignature(); + /** @var \Livewire\LivewireManager $instance */ + return $instance->propertySynthesizer($synth); } /** * * - * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation() - * @param mixed $ignoreQuery - * @param mixed $absolute * @static */ - public static function hasValidSignatureWhileIgnoring($ignoreQuery = [], $absolute = true) + public static function directive($name, $callback) { - return \Illuminate\Http\Request::hasValidSignatureWhileIgnoring($ignoreQuery, $absolute); + /** @var \Livewire\LivewireManager $instance */ + return $instance->directive($name, $callback); } /** * * - * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation() - * @param mixed $ignoreQuery * @static */ - public static function hasValidRelativeSignatureWhileIgnoring($ignoreQuery = []) + public static function precompiler($callback) { - return \Illuminate\Http\Request::hasValidRelativeSignatureWhileIgnoring($ignoreQuery); + /** @var \Livewire\LivewireManager $instance */ + return $instance->precompiler($callback); } /** * * - * @see \Inertia\ServiceProvider::registerRequestMacro() * @static */ - public static function inertia() + public static function new($name, $id = null) { - return \Illuminate\Http\Request::inertia(); + /** @var \Livewire\LivewireManager $instance */ + return $instance->new($name, $id); } - } - /** - * - * - */ - class RedirectResponse { /** * * - * @see \Laravel\Jetstream\JetstreamServiceProvider::boot() - * @param mixed $message * @static */ - public static function banner($message) + public static function isDiscoverable($componentNameOrClass) { - return \Illuminate\Http\RedirectResponse::banner($message); + /** @var \Livewire\LivewireManager $instance */ + return $instance->isDiscoverable($componentNameOrClass); } /** * * - * @see \Laravel\Jetstream\JetstreamServiceProvider::boot() - * @param mixed $message * @static */ - public static function warningBanner($message) + public static function resolveMissingComponent($resolver) { - return \Illuminate\Http\RedirectResponse::warningBanner($message); + /** @var \Livewire\LivewireManager $instance */ + return $instance->resolveMissingComponent($resolver); } /** * * - * @see \Laravel\Jetstream\JetstreamServiceProvider::boot() - * @param mixed $message * @static */ - public static function dangerBanner($message) + public static function mount($name, $params = [], $key = null) { - return \Illuminate\Http\RedirectResponse::dangerBanner($message); + /** @var \Livewire\LivewireManager $instance */ + return $instance->mount($name, $params, $key); } - } - } + /** + * + * + * @static + */ + public static function snapshot($component) + { + /** @var \Livewire\LivewireManager $instance */ + return $instance->snapshot($component); + } -namespace Illuminate\Routing { - /** - * - * - * @mixin \Illuminate\Routing\RouteRegistrar - */ - class Router { /** * * - * @see \Inertia\ServiceProvider::registerRouterMacro() - * @param mixed $uri - * @param mixed $component - * @param mixed $props * @static */ - public static function inertia($uri, $component, $props = []) + public static function fromSnapshot($snapshot) { - return \Illuminate\Routing\Router::inertia($uri, $component, $props); + /** @var \Livewire\LivewireManager $instance */ + return $instance->fromSnapshot($snapshot); } - } - } - -namespace Illuminate\Testing { - /** - * - * - * @template TResponse of \Symfony\Component\HttpFoundation\Response - * @mixin \Illuminate\Http\Response - */ - class TestResponse { /** * * - * @see \Inertia\Testing\TestResponseMacros::assertInertia() - * @param \Closure|null $callback * @static */ - public static function assertInertia($callback = null) + public static function listen($eventName, $callback) { - return \Illuminate\Testing\TestResponse::assertInertia($callback); + /** @var \Livewire\LivewireManager $instance */ + return $instance->listen($eventName, $callback); } /** * * - * @see \Inertia\Testing\TestResponseMacros::inertiaPage() * @static */ - public static function inertiaPage() + public static function current() { - return \Illuminate\Testing\TestResponse::inertiaPage(); + /** @var \Livewire\LivewireManager $instance */ + return $instance->current(); } - } - } - -namespace Illuminate\Database\Eloquent\Factories { - /** - * - * - * @template TModel of \Illuminate\Database\Eloquent\Model - * @method $this trashed() - */ - class Factory { /** * * - * @see \Spatie\Translatable\TranslatableServiceProvider::packageRegistered() - * @param array|string $locales - * @param mixed|null $value * @static */ - public static function translations($locales, $value) + public static function findSynth($keyOrTarget, $component) { - return \Illuminate\Database\Eloquent\Factories\Factory::translations($locales, $value); + /** @var \Livewire\LivewireManager $instance */ + return $instance->findSynth($keyOrTarget, $component); } - } - } - - -namespace { - class App extends \Illuminate\Support\Facades\App {} - class Arr extends \Illuminate\Support\Arr {} - class Artisan extends \Illuminate\Support\Facades\Artisan {} - class Auth extends \Illuminate\Support\Facades\Auth {} - class Blade extends \Illuminate\Support\Facades\Blade {} - class Broadcast extends \Illuminate\Support\Facades\Broadcast {} - class Bus extends \Illuminate\Support\Facades\Bus {} - class Cache extends \Illuminate\Support\Facades\Cache {} - class Concurrency extends \Illuminate\Support\Facades\Concurrency {} - class Config extends \Illuminate\Support\Facades\Config {} - class Context extends \Illuminate\Support\Facades\Context {} - class Cookie extends \Illuminate\Support\Facades\Cookie {} - class Crypt extends \Illuminate\Support\Facades\Crypt {} - class Date extends \Illuminate\Support\Facades\Date {} - class DB extends \Illuminate\Support\Facades\DB {} - - /** - * - * - * @template TCollection of static - * @template TModel of static - * @template TValue of static - * @template TValue of static - */ - class Eloquent extends \Illuminate\Database\Eloquent\Model { /** - * Create and return an un-saved model instance. + /** + * * - * @param array $attributes - * @return TModel * @static */ - public static function make($attributes = []) + public static function update($snapshot, $diff, $calls) { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->make($attributes); + /** @var \Livewire\LivewireManager $instance */ + return $instance->update($snapshot, $diff, $calls); } /** - * Register a new global scope. + * * - * @param string $identifier - * @param \Illuminate\Database\Eloquent\Scope|\Closure $scope - * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function withGlobalScope($identifier, $scope) + public static function updateProperty($component, $path, $value) { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->withGlobalScope($identifier, $scope); + /** @var \Livewire\LivewireManager $instance */ + return $instance->updateProperty($component, $path, $value); } /** - * Remove a registered global scope. + * * - * @param \Illuminate\Database\Eloquent\Scope|string $scope - * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function withoutGlobalScope($scope) + public static function isLivewireRequest() { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->withoutGlobalScope($scope); + /** @var \Livewire\LivewireManager $instance */ + return $instance->isLivewireRequest(); } /** - * Remove all or passed registered global scopes. + * * - * @param array|null $scopes - * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function withoutGlobalScopes($scopes = null) + public static function componentHasBeenRendered() { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->withoutGlobalScopes($scopes); + /** @var \Livewire\LivewireManager $instance */ + return $instance->componentHasBeenRendered(); } /** - * Get an array of global scopes that were removed from the query. + * * - * @return array * @static */ - public static function removedScopes() + public static function forceAssetInjection() { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->removedScopes(); + /** @var \Livewire\LivewireManager $instance */ + return $instance->forceAssetInjection(); } /** - * Add a where clause on the primary key to the query. + * * - * @param mixed $id - * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function whereKey($id) + public static function setUpdateRoute($callback) { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->whereKey($id); + /** @var \Livewire\LivewireManager $instance */ + return $instance->setUpdateRoute($callback); } /** - * Add a where clause on the primary key to the query. + * * - * @param mixed $id - * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function whereKeyNot($id) + public static function getUpdateUri() { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->whereKeyNot($id); + /** @var \Livewire\LivewireManager $instance */ + return $instance->getUpdateUri(); } /** - * Add a basic where clause to the query. + * * - * @param (\Closure(static): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column - * @param mixed $operator - * @param mixed $value - * @param string $boolean - * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function where($column, $operator = null, $value = null, $boolean = 'and') + public static function setScriptRoute($callback) { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->where($column, $operator, $value, $boolean); + /** @var \Livewire\LivewireManager $instance */ + return $instance->setScriptRoute($callback); } /** - * Add a basic where clause to the query, and return the first result. + * * - * @param (\Closure(static): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column - * @param mixed $operator - * @param mixed $value - * @param string $boolean - * @return TModel|null * @static */ - public static function firstWhere($column, $operator = null, $value = null, $boolean = 'and') + public static function useScriptTagAttributes($attributes) { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->firstWhere($column, $operator, $value, $boolean); + /** @var \Livewire\LivewireManager $instance */ + return $instance->useScriptTagAttributes($attributes); } /** - * Add an "or where" clause to the query. + * * - * @param (\Closure(static): mixed)|array|string|\Illuminate\Contracts\Database\Query\Expression $column - * @param mixed $operator - * @param mixed $value - * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function orWhere($column, $operator = null, $value = null) + public static function withUrlParams($params) { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->orWhere($column, $operator, $value); + /** @var \Livewire\LivewireManager $instance */ + return $instance->withUrlParams($params); } /** - * Add a basic "where not" clause to the query. + * * - * @param (\Closure(static): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column - * @param mixed $operator - * @param mixed $value - * @param string $boolean - * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function whereNot($column, $operator = null, $value = null, $boolean = 'and') + public static function withQueryParams($params) { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->whereNot($column, $operator, $value, $boolean); + /** @var \Livewire\LivewireManager $instance */ + return $instance->withQueryParams($params); } /** - * Add an "or where not" clause to the query. + * * - * @param (\Closure(static): mixed)|array|string|\Illuminate\Contracts\Database\Query\Expression $column - * @param mixed $operator - * @param mixed $value - * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function orWhereNot($column, $operator = null, $value = null) + public static function withCookie($name, $value) { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->orWhereNot($column, $operator, $value); + /** @var \Livewire\LivewireManager $instance */ + return $instance->withCookie($name, $value); } /** - * Add an "order by" clause for a timestamp to the query. + * * - * @param string|\Illuminate\Contracts\Database\Query\Expression $column - * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function latest($column = null) + public static function withCookies($cookies) { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->latest($column); + /** @var \Livewire\LivewireManager $instance */ + return $instance->withCookies($cookies); } /** - * Add an "order by" clause for a timestamp to the query. + * * - * @param string|\Illuminate\Contracts\Database\Query\Expression $column - * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function oldest($column = null) + public static function withHeaders($headers) { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->oldest($column); + /** @var \Livewire\LivewireManager $instance */ + return $instance->withHeaders($headers); } /** - * Create a collection of models from plain arrays. + * * - * @param array $items - * @return \Illuminate\Database\Eloquent\Collection * @static */ - public static function hydrate($items) + public static function withoutLazyLoading() { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->hydrate($items); + /** @var \Livewire\LivewireManager $instance */ + return $instance->withoutLazyLoading(); } /** - * Create a collection of models from a raw query. + * * - * @param string $query - * @param array $bindings - * @return \Illuminate\Database\Eloquent\Collection * @static */ - public static function fromQuery($query, $bindings = []) + public static function test($name, $params = []) { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->fromQuery($query, $bindings); + /** @var \Livewire\LivewireManager $instance */ + return $instance->test($name, $params); } /** - * Find a model by its primary key. + * * - * @param mixed $id - * @param array|string $columns - * @return ($id is (\Illuminate\Contracts\Support\Arrayable|array) ? \Illuminate\Database\Eloquent\Collection : TModel|null) * @static */ - public static function find($id, $columns = []) + public static function visit($name) { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->find($id, $columns); + /** @var \Livewire\LivewireManager $instance */ + return $instance->visit($name); } /** - * Find multiple models by their primary keys. + * * - * @param \Illuminate\Contracts\Support\Arrayable|array $ids - * @param array|string $columns - * @return \Illuminate\Database\Eloquent\Collection * @static */ - public static function findMany($ids, $columns = []) + public static function actingAs($user, $driver = null) { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->findMany($ids, $columns); + /** @var \Livewire\LivewireManager $instance */ + return $instance->actingAs($user, $driver); } /** - * Find a model by its primary key or throw an exception. + * * - * @param mixed $id - * @param array|string $columns - * @return ($id is (\Illuminate\Contracts\Support\Arrayable|array) ? \Illuminate\Database\Eloquent\Collection : TModel) - * @throws \Illuminate\Database\Eloquent\ModelNotFoundException * @static */ - public static function findOrFail($id, $columns = []) + public static function isRunningServerless() { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->findOrFail($id, $columns); + /** @var \Livewire\LivewireManager $instance */ + return $instance->isRunningServerless(); } /** - * Find a model by its primary key or return fresh model instance. + * * - * @param mixed $id - * @param array|string $columns - * @return ($id is (\Illuminate\Contracts\Support\Arrayable|array) ? \Illuminate\Database\Eloquent\Collection : TModel) * @static */ - public static function findOrNew($id, $columns = []) + public static function addPersistentMiddleware($middleware) { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->findOrNew($id, $columns); + /** @var \Livewire\LivewireManager $instance */ + return $instance->addPersistentMiddleware($middleware); } /** - * Find a model by its primary key or call a callback. + * * - * @template TValue - * @param mixed $id - * @param (\Closure(): TValue)|list|string $columns - * @param (\Closure(): TValue)|null $callback - * @return ( $id is (\Illuminate\Contracts\Support\Arrayable|array) - * ? \Illuminate\Database\Eloquent\Collection - * : TModel|TValue - * ) * @static */ - public static function findOr($id, $columns = [], $callback = null) + public static function setPersistentMiddleware($middleware) { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->findOr($id, $columns, $callback); + /** @var \Livewire\LivewireManager $instance */ + return $instance->setPersistentMiddleware($middleware); } /** - * Get the first record matching the attributes or instantiate it. + * * - * @param array $attributes - * @param array $values - * @return TModel * @static */ - public static function firstOrNew($attributes = [], $values = []) + public static function getPersistentMiddleware() { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->firstOrNew($attributes, $values); + /** @var \Livewire\LivewireManager $instance */ + return $instance->getPersistentMiddleware(); } /** - * Get the first record matching the attributes. If the record is not found, create it. + * * - * @param array $attributes - * @param array $values - * @return TModel * @static */ - public static function firstOrCreate($attributes = [], $values = []) + public static function flushState() { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ + /** @var \Livewire\LivewireManager $instance */ + return $instance->flushState(); + } + + /** + * + * + * @static + */ + public static function originalUrl() + { + /** @var \Livewire\LivewireManager $instance */ + return $instance->originalUrl(); + } + + /** + * + * + * @static + */ + public static function originalPath() + { + /** @var \Livewire\LivewireManager $instance */ + return $instance->originalPath(); + } + + /** + * + * + * @static + */ + public static function originalMethod() + { + /** @var \Livewire\LivewireManager $instance */ + return $instance->originalMethod(); + } + + } + } + +namespace Spatie\SignalAwareCommand\Facades { + /** + * + * + * @see \Spatie\SignalAwareCommand\Signal + */ + class Signal { + /** + * + * + * @static + */ + public static function handle($signal, $callable) + { + /** @var \Spatie\SignalAwareCommand\Signal $instance */ + return $instance->handle($signal, $callable); + } + + /** + * + * + * @static + */ + public static function executeSignalHandlers($signal, $command) + { + /** @var \Spatie\SignalAwareCommand\Signal $instance */ + return $instance->executeSignalHandlers($signal, $command); + } + + /** + * + * + * @static + */ + public static function clearHandlers($signal = null) + { + /** @var \Spatie\SignalAwareCommand\Signal $instance */ + return $instance->clearHandlers($signal); + } + + } + } + +namespace Yaza\LaravelGoogleDriveStorage\Facades { + /** + * + * + * @see \Yaza\LaravelGoogleDriveStorage\LaravelGoogleDriveStorage + */ + class LaravelGoogleDriveStorage { + } + } + +namespace Illuminate\Support { + /** + * + * + * @template TKey of array-key + * @template-covariant TValue + * @implements \ArrayAccess + * @implements \Illuminate\Support\Enumerable + */ + class Collection { + /** + * + * + * @see \Barryvdh\Debugbar\ServiceProvider::register() + * @static + */ + public static function debug() + { + return \Illuminate\Support\Collection::debug(); + } + + } + /** + * + * + */ + class Str { + /** + * + * + * @see \Filament\Support\SupportServiceProvider::packageBooted() + * @param string $html + * @return string + * @static + */ + public static function sanitizeHtml($html) + { + return \Illuminate\Support\Str::sanitizeHtml($html); + } + + /** + * + * + * @see \Filament\Support\SupportServiceProvider::packageBooted() + * @param string $value + * @return string + * @static + */ + public static function ucwords($value) + { + return \Illuminate\Support\Str::ucwords($value); + } + + } + /** + * + * + */ + class Stringable { + /** + * + * + * @see \Filament\Support\SupportServiceProvider::packageBooted() + * @return \Illuminate\Support\Stringable + * @static + */ + public static function sanitizeHtml() + { + return \Illuminate\Support\Stringable::sanitizeHtml(); + } + + /** + * + * + * @see \Filament\Support\SupportServiceProvider::packageBooted() + * @return \Illuminate\Support\Stringable + * @static + */ + public static function ucwords() + { + return \Illuminate\Support\Stringable::ucwords(); + } + + } + } + +namespace Illuminate\Http { + /** + * + * + */ + class Request { + /** + * + * + * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestValidation() + * @param array $rules + * @param mixed $params + * @static + */ + public static function validate($rules, ...$params) + { + return \Illuminate\Http\Request::validate($rules, ...$params); + } + + /** + * + * + * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestValidation() + * @param string $errorBag + * @param array $rules + * @param mixed $params + * @static + */ + public static function validateWithBag($errorBag, $rules, ...$params) + { + return \Illuminate\Http\Request::validateWithBag($errorBag, $rules, ...$params); + } + + /** + * + * + * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation() + * @param mixed $absolute + * @static + */ + public static function hasValidSignature($absolute = true) + { + return \Illuminate\Http\Request::hasValidSignature($absolute); + } + + /** + * + * + * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation() + * @static + */ + public static function hasValidRelativeSignature() + { + return \Illuminate\Http\Request::hasValidRelativeSignature(); + } + + /** + * + * + * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation() + * @param mixed $ignoreQuery + * @param mixed $absolute + * @static + */ + public static function hasValidSignatureWhileIgnoring($ignoreQuery = [], $absolute = true) + { + return \Illuminate\Http\Request::hasValidSignatureWhileIgnoring($ignoreQuery, $absolute); + } + + /** + * + * + * @see \Illuminate\Foundation\Providers\FoundationServiceProvider::registerRequestSignatureValidation() + * @param mixed $ignoreQuery + * @static + */ + public static function hasValidRelativeSignatureWhileIgnoring($ignoreQuery = []) + { + return \Illuminate\Http\Request::hasValidRelativeSignatureWhileIgnoring($ignoreQuery); + } + + /** + * + * + * @see \Inertia\ServiceProvider::registerRequestMacro() + * @static + */ + public static function inertia() + { + return \Illuminate\Http\Request::inertia(); + } + + } + /** + * + * + */ + class RedirectResponse { + /** + * + * + * @see \Laravel\Jetstream\JetstreamServiceProvider::boot() + * @param mixed $message + * @static + */ + public static function banner($message) + { + return \Illuminate\Http\RedirectResponse::banner($message); + } + + /** + * + * + * @see \Laravel\Jetstream\JetstreamServiceProvider::boot() + * @param mixed $message + * @static + */ + public static function warningBanner($message) + { + return \Illuminate\Http\RedirectResponse::warningBanner($message); + } + + /** + * + * + * @see \Laravel\Jetstream\JetstreamServiceProvider::boot() + * @param mixed $message + * @static + */ + public static function dangerBanner($message) + { + return \Illuminate\Http\RedirectResponse::dangerBanner($message); + } + + } + } + +namespace Illuminate\Routing { + /** + * + * + * @mixin \Illuminate\Routing\RouteRegistrar + */ + class Router { + /** + * + * + * @see \Inertia\ServiceProvider::registerRouterMacro() + * @param mixed $uri + * @param mixed $component + * @param mixed $props + * @static + */ + public static function inertia($uri, $component, $props = []) + { + return \Illuminate\Routing\Router::inertia($uri, $component, $props); + } + + } + /** + * + * + */ + class Route { + /** + * + * + * @see \Livewire\Features\SupportLazyLoading\SupportLazyLoading::registerRouteMacro() + * @param mixed $enabled + * @static + */ + public static function lazy($enabled = true) + { + return \Illuminate\Routing\Route::lazy($enabled); + } + + } + } + +namespace Illuminate\Testing { + /** + * + * + * @template TResponse of \Symfony\Component\HttpFoundation\Response + * @mixin \Illuminate\Http\Response + */ + class TestResponse { + /** + * + * + * @see \Inertia\Testing\TestResponseMacros::assertInertia() + * @param \Closure|null $callback + * @static + */ + public static function assertInertia($callback = null) + { + return \Illuminate\Testing\TestResponse::assertInertia($callback); + } + + /** + * + * + * @see \Inertia\Testing\TestResponseMacros::inertiaPage() + * @static + */ + public static function inertiaPage() + { + return \Illuminate\Testing\TestResponse::inertiaPage(); + } + + } + } + +namespace Illuminate\Database\Query { + /** + * + * + */ + class Builder { + /** + * + * + * @see \Kirschbaum\PowerJoins\Mixins\QueryBuilderExtraMethods::getGroupBy() + * @static + */ + public static function getGroupBy() + { + return \Illuminate\Database\Query\Builder::getGroupBy(); + } + + /** + * + * + * @see \Kirschbaum\PowerJoins\Mixins\QueryBuilderExtraMethods::getSelect() + * @static + */ + public static function getSelect() + { + return \Illuminate\Database\Query\Builder::getSelect(); + } + + } + } + +namespace Illuminate\Database\Eloquent\Relations { + /** + * + * + * @template TRelatedModel of \Illuminate\Database\Eloquent\Model + * @template TDeclaringModel of \Illuminate\Database\Eloquent\Model + * @template TResult + * @mixin \Illuminate\Database\Eloquent\Builder + */ + class Relation { + /** + * + * + * @see \Kirschbaum\PowerJoins\Mixins\RelationshipsExtraMethods::performJoinForEloquentPowerJoins() + * @param mixed $builder + * @param mixed $joinType + * @param mixed $callback + * @param mixed $alias + * @param bool $disableExtraConditions + * @param string|null $morphable + * @param bool $hasCheck + * @static + */ + public static function performJoinForEloquentPowerJoins($builder, $joinType = 'leftJoin', $callback = null, $alias = null, $disableExtraConditions = false, $morphable = null, $hasCheck = false) + { + return \Illuminate\Database\Eloquent\Relations\Relation::performJoinForEloquentPowerJoins($builder, $joinType, $callback, $alias, $disableExtraConditions, $morphable, $hasCheck); + } + + /** + * + * + * @see \Kirschbaum\PowerJoins\Mixins\RelationshipsExtraMethods::performJoinForEloquentPowerJoinsForBelongsTo() + * @param mixed $query + * @param mixed $joinType + * @param mixed $callback + * @param mixed $alias + * @param bool $disableExtraConditions + * @static + */ + public static function performJoinForEloquentPowerJoinsForBelongsTo($query, $joinType, $callback = null, $alias = null, $disableExtraConditions = false) + { + return \Illuminate\Database\Eloquent\Relations\Relation::performJoinForEloquentPowerJoinsForBelongsTo($query, $joinType, $callback, $alias, $disableExtraConditions); + } + + /** + * + * + * @see \Kirschbaum\PowerJoins\Mixins\RelationshipsExtraMethods::performJoinForEloquentPowerJoinsForBelongsToMany() + * @param mixed $builder + * @param mixed $joinType + * @param mixed $callback + * @param mixed $alias + * @param bool $disableExtraConditions + * @static + */ + public static function performJoinForEloquentPowerJoinsForBelongsToMany($builder, $joinType, $callback = null, $alias = null, $disableExtraConditions = false) + { + return \Illuminate\Database\Eloquent\Relations\Relation::performJoinForEloquentPowerJoinsForBelongsToMany($builder, $joinType, $callback, $alias, $disableExtraConditions); + } + + /** + * + * + * @see \Kirschbaum\PowerJoins\Mixins\RelationshipsExtraMethods::performJoinForEloquentPowerJoinsForMorphToMany() + * @param mixed $builder + * @param mixed $joinType + * @param mixed $callback + * @param mixed $alias + * @param bool $disableExtraConditions + * @static + */ + public static function performJoinForEloquentPowerJoinsForMorphToMany($builder, $joinType, $callback = null, $alias = null, $disableExtraConditions = false) + { + return \Illuminate\Database\Eloquent\Relations\Relation::performJoinForEloquentPowerJoinsForMorphToMany($builder, $joinType, $callback, $alias, $disableExtraConditions); + } + + /** + * + * + * @see \Kirschbaum\PowerJoins\Mixins\RelationshipsExtraMethods::performJoinForEloquentPowerJoinsForMorph() + * @param mixed $builder + * @param mixed $joinType + * @param mixed $callback + * @param mixed $alias + * @param bool $disableExtraConditions + * @static + */ + public static function performJoinForEloquentPowerJoinsForMorph($builder, $joinType, $callback = null, $alias = null, $disableExtraConditions = false) + { + return \Illuminate\Database\Eloquent\Relations\Relation::performJoinForEloquentPowerJoinsForMorph($builder, $joinType, $callback, $alias, $disableExtraConditions); + } + + /** + * + * + * @see \Kirschbaum\PowerJoins\Mixins\RelationshipsExtraMethods::performJoinForEloquentPowerJoinsForMorphTo() + * @param mixed $builder + * @param mixed $joinType + * @param mixed $callback + * @param mixed $alias + * @param bool $disableExtraConditions + * @param string|null $morphable + * @static + */ + public static function performJoinForEloquentPowerJoinsForMorphTo($builder, $joinType, $callback = null, $alias = null, $disableExtraConditions = false, $morphable = null) + { + return \Illuminate\Database\Eloquent\Relations\Relation::performJoinForEloquentPowerJoinsForMorphTo($builder, $joinType, $callback, $alias, $disableExtraConditions, $morphable); + } + + /** + * + * + * @see \Kirschbaum\PowerJoins\Mixins\RelationshipsExtraMethods::performJoinForEloquentPowerJoinsForHasMany() + * @param mixed $builder + * @param mixed $joinType + * @param mixed $callback + * @param mixed $alias + * @param bool $disableExtraConditions + * @param bool $hasCheck + * @static + */ + public static function performJoinForEloquentPowerJoinsForHasMany($builder, $joinType, $callback = null, $alias = null, $disableExtraConditions = false, $hasCheck = false) + { + return \Illuminate\Database\Eloquent\Relations\Relation::performJoinForEloquentPowerJoinsForHasMany($builder, $joinType, $callback, $alias, $disableExtraConditions, $hasCheck); + } + + /** + * + * + * @see \Kirschbaum\PowerJoins\Mixins\RelationshipsExtraMethods::performJoinForEloquentPowerJoinsForHasManyThrough() + * @param mixed $builder + * @param mixed $joinType + * @param mixed $callback + * @param mixed $alias + * @param bool $disableExtraConditions + * @static + */ + public static function performJoinForEloquentPowerJoinsForHasManyThrough($builder, $joinType, $callback = null, $alias = null, $disableExtraConditions = false) + { + return \Illuminate\Database\Eloquent\Relations\Relation::performJoinForEloquentPowerJoinsForHasManyThrough($builder, $joinType, $callback, $alias, $disableExtraConditions); + } + + /** + * + * + * @see \Kirschbaum\PowerJoins\Mixins\RelationshipsExtraMethods::performHavingForEloquentPowerJoins() + * @param mixed $builder + * @param mixed $operator + * @param mixed $count + * @param string|null $morphable + * @static + */ + public static function performHavingForEloquentPowerJoins($builder, $operator, $count, $morphable = null) + { + return \Illuminate\Database\Eloquent\Relations\Relation::performHavingForEloquentPowerJoins($builder, $operator, $count, $morphable); + } + + /** + * + * + * @see \Kirschbaum\PowerJoins\Mixins\RelationshipsExtraMethods::usesSoftDeletes() + * @param mixed $model + * @static + */ + public static function usesSoftDeletes($model) + { + return \Illuminate\Database\Eloquent\Relations\Relation::usesSoftDeletes($model); + } + + /** + * + * + * @see \Kirschbaum\PowerJoins\Mixins\RelationshipsExtraMethods::getThroughParent() + * @static + */ + public static function getThroughParent() + { + return \Illuminate\Database\Eloquent\Relations\Relation::getThroughParent(); + } + + /** + * + * + * @see \Kirschbaum\PowerJoins\Mixins\RelationshipsExtraMethods::getFarParent() + * @static + */ + public static function getFarParent() + { + return \Illuminate\Database\Eloquent\Relations\Relation::getFarParent(); + } + + /** + * + * + * @see \Kirschbaum\PowerJoins\Mixins\RelationshipsExtraMethods::applyExtraConditions() + * @param \Kirschbaum\PowerJoins\PowerJoinClause $join + * @static + */ + public static function applyExtraConditions($join) + { + return \Illuminate\Database\Eloquent\Relations\Relation::applyExtraConditions($join); + } + + /** + * + * + * @see \Kirschbaum\PowerJoins\Mixins\RelationshipsExtraMethods::applyBasicCondition() + * @param mixed $join + * @param mixed $condition + * @static + */ + public static function applyBasicCondition($join, $condition) + { + return \Illuminate\Database\Eloquent\Relations\Relation::applyBasicCondition($join, $condition); + } + + /** + * + * + * @see \Kirschbaum\PowerJoins\Mixins\RelationshipsExtraMethods::applyNullCondition() + * @param mixed $join + * @param mixed $condition + * @static + */ + public static function applyNullCondition($join, $condition) + { + return \Illuminate\Database\Eloquent\Relations\Relation::applyNullCondition($join, $condition); + } + + /** + * + * + * @see \Kirschbaum\PowerJoins\Mixins\RelationshipsExtraMethods::applyNotNullCondition() + * @param mixed $join + * @param mixed $condition + * @static + */ + public static function applyNotNullCondition($join, $condition) + { + return \Illuminate\Database\Eloquent\Relations\Relation::applyNotNullCondition($join, $condition); + } + + /** + * + * + * @see \Kirschbaum\PowerJoins\Mixins\RelationshipsExtraMethods::applyNestedCondition() + * @param mixed $join + * @param mixed $condition + * @static + */ + public static function applyNestedCondition($join, $condition) + { + return \Illuminate\Database\Eloquent\Relations\Relation::applyNestedCondition($join, $condition); + } + + /** + * + * + * @see \Kirschbaum\PowerJoins\Mixins\RelationshipsExtraMethods::shouldNotApplyExtraCondition() + * @param mixed $condition + * @static + */ + public static function shouldNotApplyExtraCondition($condition) + { + return \Illuminate\Database\Eloquent\Relations\Relation::shouldNotApplyExtraCondition($condition); + } + + /** + * + * + * @see \Kirschbaum\PowerJoins\Mixins\RelationshipsExtraMethods::getPowerJoinExistenceCompareKey() + * @static + */ + public static function getPowerJoinExistenceCompareKey() + { + return \Illuminate\Database\Eloquent\Relations\Relation::getPowerJoinExistenceCompareKey(); + } + + } + } + +namespace Illuminate\Database\Eloquent\Factories { + /** + * + * + * @template TModel of \Illuminate\Database\Eloquent\Model + * @method $this trashed() + */ + class Factory { + /** + * + * + * @see \Spatie\Translatable\TranslatableServiceProvider::packageRegistered() + * @param array|string $locales + * @param mixed|null $value + * @static + */ + public static function translations($locales, $value) + { + return \Illuminate\Database\Eloquent\Factories\Factory::translations($locales, $value); + } + + } + } + +namespace Livewire\Features\SupportTesting { + /** + * + * + * @mixin \Illuminate\Testing\TestResponse + */ + class Testable { + /** + * + * + * @see \Filament\Actions\Testing\TestsActions::mountAction() + * @param array|string $name + * @param array $arguments + * @return static + * @static + */ + public static function mountAction($name, $arguments = []) + { + return \Livewire\Features\SupportTesting\Testable::mountAction($name, $arguments); + } + + /** + * + * + * @see \Filament\Actions\Testing\TestsActions::unmountAction() + * @return static + * @static + */ + public static function unmountAction() + { + return \Livewire\Features\SupportTesting\Testable::unmountAction(); + } + + /** + * + * + * @see \Filament\Actions\Testing\TestsActions::setActionData() + * @param array $data + * @return static + * @static + */ + public static function setActionData($data) + { + return \Livewire\Features\SupportTesting\Testable::setActionData($data); + } + + /** + * + * + * @see \Filament\Actions\Testing\TestsActions::assertActionDataSet() + * @param array $data + * @return static + * @static + */ + public static function assertActionDataSet($data) + { + return \Livewire\Features\SupportTesting\Testable::assertActionDataSet($data); + } + + /** + * + * + * @see \Filament\Actions\Testing\TestsActions::callAction() + * @param array|string $name + * @param array $data + * @param array $arguments + * @return static + * @static + */ + public static function callAction($name, $data = [], $arguments = []) + { + return \Livewire\Features\SupportTesting\Testable::callAction($name, $data, $arguments); + } + + /** + * + * + * @see \Filament\Actions\Testing\TestsActions::callMountedAction() + * @param array $arguments + * @return static + * @static + */ + public static function callMountedAction($arguments = []) + { + return \Livewire\Features\SupportTesting\Testable::callMountedAction($arguments); + } + + /** + * + * + * @see \Filament\Actions\Testing\TestsActions::assertActionExists() + * @param array|string $name + * @return static + * @static + */ + public static function assertActionExists($name) + { + return \Livewire\Features\SupportTesting\Testable::assertActionExists($name); + } + + /** + * + * + * @see \Filament\Actions\Testing\TestsActions::assertActionDoesNotExist() + * @param array|string $name + * @return static + * @static + */ + public static function assertActionDoesNotExist($name) + { + return \Livewire\Features\SupportTesting\Testable::assertActionDoesNotExist($name); + } + + /** + * + * + * @see \Filament\Actions\Testing\TestsActions::assertActionVisible() + * @param array|string $name + * @param array $arguments + * @return static + * @static + */ + public static function assertActionVisible($name, $arguments = []) + { + return \Livewire\Features\SupportTesting\Testable::assertActionVisible($name, $arguments); + } + + /** + * + * + * @see \Filament\Actions\Testing\TestsActions::assertActionHidden() + * @param array|string $name + * @param array $arguments + * @return static + * @static + */ + public static function assertActionHidden($name, $arguments = []) + { + return \Livewire\Features\SupportTesting\Testable::assertActionHidden($name, $arguments); + } + + /** + * + * + * @see \Filament\Actions\Testing\TestsActions::assertActionEnabled() + * @param array|string $name + * @return static + * @static + */ + public static function assertActionEnabled($name) + { + return \Livewire\Features\SupportTesting\Testable::assertActionEnabled($name); + } + + /** + * + * + * @see \Filament\Actions\Testing\TestsActions::assertActionDisabled() + * @param array|string $name + * @return static + * @static + */ + public static function assertActionDisabled($name) + { + return \Livewire\Features\SupportTesting\Testable::assertActionDisabled($name); + } + + /** + * + * + * @see \Filament\Actions\Testing\TestsActions::assertActionHasIcon() + * @param array|string $name + * @param string $icon + * @param mixed $record + * @return static + * @static + */ + public static function assertActionHasIcon($name, $icon, $record = null) + { + return \Livewire\Features\SupportTesting\Testable::assertActionHasIcon($name, $icon, $record); + } + + /** + * + * + * @see \Filament\Actions\Testing\TestsActions::assertActionDoesNotHaveIcon() + * @param array|string $name + * @param string $icon + * @param mixed $record + * @return static + * @static + */ + public static function assertActionDoesNotHaveIcon($name, $icon, $record = null) + { + return \Livewire\Features\SupportTesting\Testable::assertActionDoesNotHaveIcon($name, $icon, $record); + } + + /** + * + * + * @see \Filament\Actions\Testing\TestsActions::assertActionHasLabel() + * @param array|string $name + * @param string $label + * @param mixed $record + * @return static + * @static + */ + public static function assertActionHasLabel($name, $label, $record = null) + { + return \Livewire\Features\SupportTesting\Testable::assertActionHasLabel($name, $label, $record); + } + + /** + * + * + * @see \Filament\Actions\Testing\TestsActions::assertActionDoesNotHaveLabel() + * @param array|string $name + * @param string $label + * @param mixed $record + * @return static + * @static + */ + public static function assertActionDoesNotHaveLabel($name, $label, $record = null) + { + return \Livewire\Features\SupportTesting\Testable::assertActionDoesNotHaveLabel($name, $label, $record); + } + + /** + * + * + * @see \Filament\Actions\Testing\TestsActions::assertActionHasColor() + * @param array|string $name + * @param array|string $color + * @param mixed $record + * @return static + * @static + */ + public static function assertActionHasColor($name, $color, $record = null) + { + return \Livewire\Features\SupportTesting\Testable::assertActionHasColor($name, $color, $record); + } + + /** + * + * + * @see \Filament\Actions\Testing\TestsActions::assertActionDoesNotHaveColor() + * @param array|string $name + * @param array|string $color + * @param mixed $record + * @return static + * @static + */ + public static function assertActionDoesNotHaveColor($name, $color, $record = null) + { + return \Livewire\Features\SupportTesting\Testable::assertActionDoesNotHaveColor($name, $color, $record); + } + + /** + * + * + * @see \Filament\Actions\Testing\TestsActions::assertActionHasUrl() + * @param array|string $name + * @param string $url + * @param mixed $record + * @return static + * @static + */ + public static function assertActionHasUrl($name, $url, $record = null) + { + return \Livewire\Features\SupportTesting\Testable::assertActionHasUrl($name, $url, $record); + } + + /** + * + * + * @see \Filament\Actions\Testing\TestsActions::assertActionDoesNotHaveUrl() + * @param array|string $name + * @param string $url + * @param mixed $record + * @return static + * @static + */ + public static function assertActionDoesNotHaveUrl($name, $url, $record = null) + { + return \Livewire\Features\SupportTesting\Testable::assertActionDoesNotHaveUrl($name, $url, $record); + } + + /** + * + * + * @see \Filament\Actions\Testing\TestsActions::assertActionShouldOpenUrlInNewTab() + * @param array|string $name + * @param mixed $record + * @return static + * @static + */ + public static function assertActionShouldOpenUrlInNewTab($name, $record = null) + { + return \Livewire\Features\SupportTesting\Testable::assertActionShouldOpenUrlInNewTab($name, $record); + } + + /** + * + * + * @see \Filament\Actions\Testing\TestsActions::assertActionShouldNotOpenUrlInNewTab() + * @param array|string $name + * @param mixed $record + * @return static + * @static + */ + public static function assertActionShouldNotOpenUrlInNewTab($name, $record = null) + { + return \Livewire\Features\SupportTesting\Testable::assertActionShouldNotOpenUrlInNewTab($name, $record); + } + + /** + * + * + * @see \Filament\Actions\Testing\TestsActions::assertActionMounted() + * @param array|string $name + * @return static + * @static + */ + public static function assertActionMounted($name) + { + return \Livewire\Features\SupportTesting\Testable::assertActionMounted($name); + } + + /** + * + * + * @see \Filament\Actions\Testing\TestsActions::assertActionNotMounted() + * @param array|string $name + * @return static + * @static + */ + public static function assertActionNotMounted($name) + { + return \Livewire\Features\SupportTesting\Testable::assertActionNotMounted($name); + } + + /** + * + * + * @see \Filament\Actions\Testing\TestsActions::assertActionMounted() + * @param array|string $name + * @return static + * @static + */ + public static function assertActionHalted($name) + { + return \Livewire\Features\SupportTesting\Testable::assertActionHalted($name); + } + + /** + * + * + * @see \Filament\Actions\Testing\TestsActions::assertActionMounted() + * @param array|string $name + * @return static + * @static + */ + public static function assertActionHeld($name) + { + return \Livewire\Features\SupportTesting\Testable::assertActionHeld($name); + } + + /** + * + * + * @see \Filament\Actions\Testing\TestsActions::assertHasActionErrors() + * @param array $keys + * @return static + * @static + */ + public static function assertHasActionErrors($keys = []) + { + return \Livewire\Features\SupportTesting\Testable::assertHasActionErrors($keys); + } + + /** + * + * + * @see \Filament\Actions\Testing\TestsActions::assertHasNoActionErrors() + * @param array $keys + * @return static + * @static + */ + public static function assertHasNoActionErrors($keys = []) + { + return \Livewire\Features\SupportTesting\Testable::assertHasNoActionErrors($keys); + } + + /** + * + * + * @see \Filament\Actions\Testing\TestsActions::assertActionListInOrder() + * @param array $names + * @param array $actions + * @param string $actionType + * @param string $actionClass + * @return self + * @static + */ + public static function assertActionListInOrder($names, $actions, $actionType, $actionClass) + { + return \Livewire\Features\SupportTesting\Testable::assertActionListInOrder($names, $actions, $actionType, $actionClass); + } + + /** + * + * + * @see \Filament\Actions\Testing\TestsActions::parseActionName() + * @param string $name + * @return string + * @static + */ + public static function parseActionName($name) + { + return \Livewire\Features\SupportTesting\Testable::parseActionName($name); + } + + /** + * + * + * @see \Filament\Actions\Testing\TestsActions::parseNestedActionName() + * @param array|string $name + * @return array + * @static + */ + public static function parseNestedActionName($name) + { + return \Livewire\Features\SupportTesting\Testable::parseNestedActionName($name); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsForms::fillForm() + * @param \Closure|array $state + * @param string $formName + * @return static + * @static + */ + public static function fillForm($state = [], $formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::fillForm($state, $formName); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsForms::assertFormSet() + * @param \Closure|array $state + * @param string $formName + * @return static + * @static + */ + public static function assertFormSet($state, $formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::assertFormSet($state, $formName); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsForms::assertHasFormErrors() + * @param array $keys + * @param string $formName + * @return static + * @static + */ + public static function assertHasFormErrors($keys = [], $formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::assertHasFormErrors($keys, $formName); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsForms::assertHasNoFormErrors() + * @param array $keys + * @param string $formName + * @return static + * @static + */ + public static function assertHasNoFormErrors($keys = [], $formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::assertHasNoFormErrors($keys, $formName); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsForms::assertFormExists() + * @param string $name + * @return static + * @static + */ + public static function assertFormExists($name = 'form') + { + return \Livewire\Features\SupportTesting\Testable::assertFormExists($name); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsForms::assertFormComponentExists() + * @param string $componentKey + * @param \Closure|string $formName + * @param \Closure|null $checkComponentUsing + * @return static + * @static + */ + public static function assertFormComponentExists($componentKey, $formName = 'form', $checkComponentUsing = null) + { + return \Livewire\Features\SupportTesting\Testable::assertFormComponentExists($componentKey, $formName, $checkComponentUsing); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsForms::assertFormComponentDoesNotExist() + * @param string $componentKey + * @param string $formName + * @return static + * @static + */ + public static function assertFormComponentDoesNotExist($componentKey, $formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::assertFormComponentDoesNotExist($componentKey, $formName); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsForms::assertFormFieldExists() + * @param string $fieldName + * @param \Closure|string $formName + * @param \Closure|null $checkFieldUsing + * @return static + * @static + */ + public static function assertFormFieldExists($fieldName, $formName = 'form', $checkFieldUsing = null) + { + return \Livewire\Features\SupportTesting\Testable::assertFormFieldExists($fieldName, $formName, $checkFieldUsing); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsForms::assertFormFieldDoesNotExist() + * @param string $fieldName + * @param string $formName + * @return static + * @static + */ + public static function assertFormFieldDoesNotExist($fieldName, $formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::assertFormFieldDoesNotExist($fieldName, $formName); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsForms::assertFormFieldIsDisabled() + * @param string $fieldName + * @param string $formName + * @return static + * @static + */ + public static function assertFormFieldIsDisabled($fieldName, $formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::assertFormFieldIsDisabled($fieldName, $formName); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsForms::assertFormFieldIsEnabled() + * @param string $fieldName + * @param string $formName + * @return static + * @static + */ + public static function assertFormFieldIsEnabled($fieldName, $formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::assertFormFieldIsEnabled($fieldName, $formName); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsForms::assertFormFieldIsReadOnly() + * @param string $fieldName + * @param string $formName + * @return static + * @static + */ + public static function assertFormFieldIsReadOnly($fieldName, $formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::assertFormFieldIsReadOnly($fieldName, $formName); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsForms::assertFormFieldIsHidden() + * @param string $fieldName + * @param string $formName + * @return static + * @static + */ + public static function assertFormFieldIsHidden($fieldName, $formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::assertFormFieldIsHidden($fieldName, $formName); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsForms::assertFormFieldIsVisible() + * @param string $fieldName + * @param string $formName + * @return static + * @static + */ + public static function assertFormFieldIsVisible($fieldName, $formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::assertFormFieldIsVisible($fieldName, $formName); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsForms::assertWizardStepExists() + * @param int $step + * @param string $formName + * @return static + * @static + */ + public static function assertWizardStepExists($step, $formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::assertWizardStepExists($step, $formName); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsForms::assertWizardCurrentStep() + * @param int $step + * @param string $formName + * @return static + * @static + */ + public static function assertWizardCurrentStep($step, $formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::assertWizardCurrentStep($step, $formName); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsForms::goToWizardStep() + * @param int $step + * @param string $formName + * @return static + * @static + */ + public static function goToWizardStep($step, $formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::goToWizardStep($step, $formName); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsForms::goToNextWizardStep() + * @param string $formName + * @return static + * @static + */ + public static function goToNextWizardStep($formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::goToNextWizardStep($formName); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsForms::goToPreviousWizardStep() + * @param string $formName + * @return static + * @static + */ + public static function goToPreviousWizardStep($formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::goToPreviousWizardStep($formName); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsComponentActions::mountFormComponentAction() + * @param array|string $component + * @param array|string $name + * @param array $arguments + * @param string $formName + * @return static + * @static + */ + public static function mountFormComponentAction($component, $name, $arguments = [], $formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::mountFormComponentAction($component, $name, $arguments, $formName); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsComponentActions::unmountFormComponentAction() + * @return static + * @static + */ + public static function unmountFormComponentAction() + { + return \Livewire\Features\SupportTesting\Testable::unmountFormComponentAction(); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsComponentActions::setFormComponentActionData() + * @param array $data + * @return static + * @static + */ + public static function setFormComponentActionData($data) + { + return \Livewire\Features\SupportTesting\Testable::setFormComponentActionData($data); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsComponentActions::assertFormComponentActionDataSet() + * @param array $data + * @return static + * @static + */ + public static function assertFormComponentActionDataSet($data) + { + return \Livewire\Features\SupportTesting\Testable::assertFormComponentActionDataSet($data); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsComponentActions::callFormComponentAction() + * @param array|string $component + * @param array|string $name + * @param array $data + * @param array $arguments + * @param string $formName + * @return static + * @static + */ + public static function callFormComponentAction($component, $name, $data = [], $arguments = [], $formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::callFormComponentAction($component, $name, $data, $arguments, $formName); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsComponentActions::callMountedFormComponentAction() + * @param array $arguments + * @return static + * @static + */ + public static function callMountedFormComponentAction($arguments = []) + { + return \Livewire\Features\SupportTesting\Testable::callMountedFormComponentAction($arguments); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsComponentActions::assertFormComponentActionExists() + * @param array|string $component + * @param array|string $name + * @param string $formName + * @return static + * @static + */ + public static function assertFormComponentActionExists($component, $name, $formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::assertFormComponentActionExists($component, $name, $formName); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsComponentActions::assertFormComponentActionDoesNotExist() + * @param array|string $component + * @param array|string $name + * @param string $formName + * @return static + * @static + */ + public static function assertFormComponentActionDoesNotExist($component, $name, $formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::assertFormComponentActionDoesNotExist($component, $name, $formName); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsComponentActions::assertFormComponentActionVisible() + * @param array|string $component + * @param array|string $name + * @param array $arguments + * @param string $formName + * @return static + * @static + */ + public static function assertFormComponentActionVisible($component, $name, $arguments = [], $formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::assertFormComponentActionVisible($component, $name, $arguments, $formName); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsComponentActions::assertFormComponentActionHidden() + * @param array|string $component + * @param array|string $name + * @param array $arguments + * @param string $formName + * @return static + * @static + */ + public static function assertFormComponentActionHidden($component, $name, $arguments = [], $formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::assertFormComponentActionHidden($component, $name, $arguments, $formName); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsComponentActions::assertFormComponentActionEnabled() + * @param array|string $component + * @param array|string $name + * @param array $arguments + * @param string $formName + * @return static + * @static + */ + public static function assertFormComponentActionEnabled($component, $name, $arguments = [], $formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::assertFormComponentActionEnabled($component, $name, $arguments, $formName); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsComponentActions::assertFormComponentActionDisabled() + * @param array|string $component + * @param array|string $name + * @param array $arguments + * @param string $formName + * @return static + * @static + */ + public static function assertFormComponentActionDisabled($component, $name, $arguments = [], $formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::assertFormComponentActionDisabled($component, $name, $arguments, $formName); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsComponentActions::assertFormComponentActionHasIcon() + * @param array|string $component + * @param array|string $name + * @param string $icon + * @param array $arguments + * @param string $formName + * @return static + * @static + */ + public static function assertFormComponentActionHasIcon($component, $name, $icon, $arguments = [], $formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::assertFormComponentActionHasIcon($component, $name, $icon, $arguments, $formName); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsComponentActions::assertFormComponentActionDoesNotHaveIcon() + * @param array|string $component + * @param array|string $name + * @param string $icon + * @param array $arguments + * @param string $formName + * @return static + * @static + */ + public static function assertFormComponentActionDoesNotHaveIcon($component, $name, $icon, $arguments = [], $formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::assertFormComponentActionDoesNotHaveIcon($component, $name, $icon, $arguments, $formName); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsComponentActions::assertFormComponentActionHasLabel() + * @param array|string $component + * @param array|string $name + * @param string $label + * @param array $arguments + * @param string $formName + * @return static + * @static + */ + public static function assertFormComponentActionHasLabel($component, $name, $label, $arguments = [], $formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::assertFormComponentActionHasLabel($component, $name, $label, $arguments, $formName); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsComponentActions::assertFormComponentActionDoesNotHaveLabel() + * @param array|string $component + * @param array|string $name + * @param string $label + * @param array $arguments + * @param string $formName + * @return static + * @static + */ + public static function assertFormComponentActionDoesNotHaveLabel($component, $name, $label, $arguments = [], $formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::assertFormComponentActionDoesNotHaveLabel($component, $name, $label, $arguments, $formName); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsComponentActions::assertFormComponentActionHasColor() + * @param array|string $component + * @param array|string $name + * @param array|string $color + * @param array $arguments + * @param string $formName + * @return static + * @static + */ + public static function assertFormComponentActionHasColor($component, $name, $color, $arguments = [], $formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::assertFormComponentActionHasColor($component, $name, $color, $arguments, $formName); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsComponentActions::assertFormComponentActionDoesNotHaveColor() + * @param array|string $component + * @param array|string $name + * @param array|string $color + * @param array $arguments + * @param string $formName + * @return static + * @static + */ + public static function assertFormComponentActionDoesNotHaveColor($component, $name, $color, $arguments = [], $formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::assertFormComponentActionDoesNotHaveColor($component, $name, $color, $arguments, $formName); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsComponentActions::assertFormComponentActionHasUrl() + * @param array|string $component + * @param array|string $name + * @param string $url + * @param array $arguments + * @param string $formName + * @return static + * @static + */ + public static function assertFormComponentActionHasUrl($component, $name, $url, $arguments = [], $formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::assertFormComponentActionHasUrl($component, $name, $url, $arguments, $formName); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsComponentActions::assertFormComponentActionDoesNotHaveUrl() + * @param array|string $component + * @param array|string $name + * @param string $url + * @param array $arguments + * @param string $formName + * @return static + * @static + */ + public static function assertFormComponentActionDoesNotHaveUrl($component, $name, $url, $arguments = [], $formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::assertFormComponentActionDoesNotHaveUrl($component, $name, $url, $arguments, $formName); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsComponentActions::assertFormComponentActionShouldOpenUrlInNewTab() + * @param array|string $component + * @param array|string $name + * @param array $arguments + * @param string $formName + * @return static + * @static + */ + public static function assertFormComponentActionShouldOpenUrlInNewTab($component, $name, $arguments = [], $formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::assertFormComponentActionShouldOpenUrlInNewTab($component, $name, $arguments, $formName); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsComponentActions::assertFormComponentActionShouldNotOpenUrlInNewTab() + * @param array|string $component + * @param array|string $name + * @param array $arguments + * @param string $formName + * @return static + * @static + */ + public static function assertFormComponentActionShouldNotOpenUrlInNewTab($component, $name, $arguments = [], $formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::assertFormComponentActionShouldNotOpenUrlInNewTab($component, $name, $arguments, $formName); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsComponentActions::assertFormComponentActionMounted() + * @param array|string $component + * @param array|string $name + * @param string $formName + * @return static + * @static + */ + public static function assertFormComponentActionMounted($component, $name, $formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::assertFormComponentActionMounted($component, $name, $formName); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsComponentActions::assertFormComponentActionNotMounted() + * @param array|string $component + * @param array|string $name + * @param string $formName + * @return static + * @static + */ + public static function assertFormComponentActionNotMounted($component, $name, $formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::assertFormComponentActionNotMounted($component, $name, $formName); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsComponentActions::assertFormComponentActionMounted() + * @param array|string $component + * @param array|string $name + * @param string $formName + * @return static + * @static + */ + public static function assertFormComponentActionHalted($component, $name, $formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::assertFormComponentActionHalted($component, $name, $formName); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsComponentActions::assertHasFormComponentActionErrors() + * @param array $keys + * @return static + * @static + */ + public static function assertHasFormComponentActionErrors($keys = []) + { + return \Livewire\Features\SupportTesting\Testable::assertHasFormComponentActionErrors($keys); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsComponentActions::assertHasNoFormComponentActionErrors() + * @param array $keys + * @return static + * @static + */ + public static function assertHasNoFormComponentActionErrors($keys = []) + { + return \Livewire\Features\SupportTesting\Testable::assertHasNoFormComponentActionErrors($keys); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsComponentActions::getNestedFormComponentActionComponentAndName() + * @param array|string $component + * @param array|string $name + * @param string $formName + * @param array $arguments + * @return array + * @static + */ + public static function getNestedFormComponentActionComponentAndName($component, $name, $formName = 'form', $arguments = []) + { + return \Livewire\Features\SupportTesting\Testable::getNestedFormComponentActionComponentAndName($component, $name, $formName, $arguments); + } + + /** + * + * + * @see \Filament\Forms\Testing\TestsComponentActions::parseNestedFormComponentActionComponentAndName() + * @param array|string $component + * @param array|string $name + * @param string $formName + * @return array + * @static + */ + public static function parseNestedFormComponentActionComponentAndName($component, $name, $formName = 'form') + { + return \Livewire\Features\SupportTesting\Testable::parseNestedFormComponentActionComponentAndName($component, $name, $formName); + } + + /** + * + * + * @see \Filament\Infolists\Testing\TestsActions::mountInfolistAction() + * @param string $component + * @param array|string $name + * @param string $infolistName + * @return static + * @static + */ + public static function mountInfolistAction($component, $name, $infolistName = 'infolist') + { + return \Livewire\Features\SupportTesting\Testable::mountInfolistAction($component, $name, $infolistName); + } + + /** + * + * + * @see \Filament\Infolists\Testing\TestsActions::unmountInfolistAction() + * @return static + * @static + */ + public static function unmountInfolistAction() + { + return \Livewire\Features\SupportTesting\Testable::unmountInfolistAction(); + } + + /** + * + * + * @see \Filament\Infolists\Testing\TestsActions::setInfolistActionData() + * @param array $data + * @return static + * @static + */ + public static function setInfolistActionData($data) + { + return \Livewire\Features\SupportTesting\Testable::setInfolistActionData($data); + } + + /** + * + * + * @see \Filament\Infolists\Testing\TestsActions::assertInfolistActionDataSet() + * @param array $data + * @return static + * @static + */ + public static function assertInfolistActionDataSet($data) + { + return \Livewire\Features\SupportTesting\Testable::assertInfolistActionDataSet($data); + } + + /** + * + * + * @see \Filament\Infolists\Testing\TestsActions::callInfolistAction() + * @param string $component + * @param array|string $name + * @param array $data + * @param array $arguments + * @param string $infolistName + * @return static + * @static + */ + public static function callInfolistAction($component, $name, $data = [], $arguments = [], $infolistName = 'infolist') + { + return \Livewire\Features\SupportTesting\Testable::callInfolistAction($component, $name, $data, $arguments, $infolistName); + } + + /** + * + * + * @see \Filament\Infolists\Testing\TestsActions::callMountedInfolistAction() + * @param array $arguments + * @return static + * @static + */ + public static function callMountedInfolistAction($arguments = []) + { + return \Livewire\Features\SupportTesting\Testable::callMountedInfolistAction($arguments); + } + + /** + * + * + * @see \Filament\Infolists\Testing\TestsActions::assertInfolistActionExists() + * @param string $component + * @param array|string $name + * @param string $infolistName + * @return static + * @static + */ + public static function assertInfolistActionExists($component, $name, $infolistName = 'infolist') + { + return \Livewire\Features\SupportTesting\Testable::assertInfolistActionExists($component, $name, $infolistName); + } + + /** + * + * + * @see \Filament\Infolists\Testing\TestsActions::assertInfolistActionDoesNotExist() + * @param string $component + * @param array|string $name + * @param string $infolistName + * @return static + * @static + */ + public static function assertInfolistActionDoesNotExist($component, $name, $infolistName = 'infolist') + { + return \Livewire\Features\SupportTesting\Testable::assertInfolistActionDoesNotExist($component, $name, $infolistName); + } + + /** + * + * + * @see \Filament\Infolists\Testing\TestsActions::assertInfolistActionVisible() + * @param string $component + * @param array|string $name + * @param string $infolistName + * @return static + * @static + */ + public static function assertInfolistActionVisible($component, $name, $infolistName = 'infolist') + { + return \Livewire\Features\SupportTesting\Testable::assertInfolistActionVisible($component, $name, $infolistName); + } + + /** + * + * + * @see \Filament\Infolists\Testing\TestsActions::assertInfolistActionHidden() + * @param string $component + * @param array|string $name + * @param string $infolistName + * @return static + * @static + */ + public static function assertInfolistActionHidden($component, $name, $infolistName = 'infolist') + { + return \Livewire\Features\SupportTesting\Testable::assertInfolistActionHidden($component, $name, $infolistName); + } + + /** + * + * + * @see \Filament\Infolists\Testing\TestsActions::assertInfolistActionEnabled() + * @param string $component + * @param array|string $name + * @param string $infolistName + * @return static + * @static + */ + public static function assertInfolistActionEnabled($component, $name, $infolistName = 'infolist') + { + return \Livewire\Features\SupportTesting\Testable::assertInfolistActionEnabled($component, $name, $infolistName); + } + + /** + * + * + * @see \Filament\Infolists\Testing\TestsActions::assertInfolistActionDisabled() + * @param string $component + * @param array|string $name + * @param string $infolistName + * @return static + * @static + */ + public static function assertInfolistActionDisabled($component, $name, $infolistName = 'infolist') + { + return \Livewire\Features\SupportTesting\Testable::assertInfolistActionDisabled($component, $name, $infolistName); + } + + /** + * + * + * @see \Filament\Infolists\Testing\TestsActions::assertInfolistActionHasIcon() + * @param string $component + * @param array|string $name + * @param string $icon + * @param string $infolistName + * @return static + * @static + */ + public static function assertInfolistActionHasIcon($component, $name, $icon, $infolistName = 'infolist') + { + return \Livewire\Features\SupportTesting\Testable::assertInfolistActionHasIcon($component, $name, $icon, $infolistName); + } + + /** + * + * + * @see \Filament\Infolists\Testing\TestsActions::assertInfolistActionDoesNotHaveIcon() + * @param string $component + * @param array|string $name + * @param string $icon + * @param string $infolistName + * @return static + * @static + */ + public static function assertInfolistActionDoesNotHaveIcon($component, $name, $icon, $infolistName = 'infolist') + { + return \Livewire\Features\SupportTesting\Testable::assertInfolistActionDoesNotHaveIcon($component, $name, $icon, $infolistName); + } + + /** + * + * + * @see \Filament\Infolists\Testing\TestsActions::assertInfolistActionHasLabel() + * @param string $component + * @param array|string $name + * @param string $label + * @param string $infolistName + * @return static + * @static + */ + public static function assertInfolistActionHasLabel($component, $name, $label, $infolistName = 'infolist') + { + return \Livewire\Features\SupportTesting\Testable::assertInfolistActionHasLabel($component, $name, $label, $infolistName); + } + + /** + * + * + * @see \Filament\Infolists\Testing\TestsActions::assertInfolistActionDoesNotHaveLabel() + * @param string $component + * @param array|string $name + * @param string $label + * @param string $infolistName + * @return static + * @static + */ + public static function assertInfolistActionDoesNotHaveLabel($component, $name, $label, $infolistName = 'infolist') + { + return \Livewire\Features\SupportTesting\Testable::assertInfolistActionDoesNotHaveLabel($component, $name, $label, $infolistName); + } + + /** + * + * + * @see \Filament\Infolists\Testing\TestsActions::assertInfolistActionHasColor() + * @param string $component + * @param array|string $name + * @param array|string $color + * @param string $infolistName + * @return static + * @static + */ + public static function assertInfolistActionHasColor($component, $name, $color, $infolistName = 'infolist') + { + return \Livewire\Features\SupportTesting\Testable::assertInfolistActionHasColor($component, $name, $color, $infolistName); + } + + /** + * + * + * @see \Filament\Infolists\Testing\TestsActions::assertInfolistActionDoesNotHaveColor() + * @param string $component + * @param array|string $name + * @param array|string $color + * @param string $infolistName + * @return static + * @static + */ + public static function assertInfolistActionDoesNotHaveColor($component, $name, $color, $infolistName = 'infolist') + { + return \Livewire\Features\SupportTesting\Testable::assertInfolistActionDoesNotHaveColor($component, $name, $color, $infolistName); + } + + /** + * + * + * @see \Filament\Infolists\Testing\TestsActions::assertInfolistActionHasUrl() + * @param string $component + * @param array|string $name + * @param string $url + * @param string $infolistName + * @return static + * @static + */ + public static function assertInfolistActionHasUrl($component, $name, $url, $infolistName = 'infolist') + { + return \Livewire\Features\SupportTesting\Testable::assertInfolistActionHasUrl($component, $name, $url, $infolistName); + } + + /** + * + * + * @see \Filament\Infolists\Testing\TestsActions::assertInfolistActionDoesNotHaveUrl() + * @param string $component + * @param array|string $name + * @param string $url + * @param string $infolistName + * @return static + * @static + */ + public static function assertInfolistActionDoesNotHaveUrl($component, $name, $url, $infolistName = 'infolist') + { + return \Livewire\Features\SupportTesting\Testable::assertInfolistActionDoesNotHaveUrl($component, $name, $url, $infolistName); + } + + /** + * + * + * @see \Filament\Infolists\Testing\TestsActions::assertInfolistActionShouldOpenUrlInNewTab() + * @param string $component + * @param array|string $name + * @param string $infolistName + * @return static + * @static + */ + public static function assertInfolistActionShouldOpenUrlInNewTab($component, $name, $infolistName = 'infolist') + { + return \Livewire\Features\SupportTesting\Testable::assertInfolistActionShouldOpenUrlInNewTab($component, $name, $infolistName); + } + + /** + * + * + * @see \Filament\Infolists\Testing\TestsActions::assertInfolistActionShouldNotOpenUrlInNewTab() + * @param string $component + * @param array|string $name + * @param string $infolistName + * @return static + * @static + */ + public static function assertInfolistActionShouldNotOpenUrlInNewTab($component, $name, $infolistName = 'infolist') + { + return \Livewire\Features\SupportTesting\Testable::assertInfolistActionShouldNotOpenUrlInNewTab($component, $name, $infolistName); + } + + /** + * + * + * @see \Filament\Infolists\Testing\TestsActions::assertInfolistActionMounted() + * @param string $component + * @param array|string $name + * @param string $infolistName + * @return static + * @static + */ + public static function assertInfolistActionMounted($component, $name, $infolistName = 'infolist') + { + return \Livewire\Features\SupportTesting\Testable::assertInfolistActionMounted($component, $name, $infolistName); + } + + /** + * + * + * @see \Filament\Infolists\Testing\TestsActions::assertInfolistActionNotMounted() + * @param string $component + * @param array|string $name + * @param string $infolistName + * @return static + * @static + */ + public static function assertInfolistActionNotMounted($component, $name, $infolistName = 'infolist') + { + return \Livewire\Features\SupportTesting\Testable::assertInfolistActionNotMounted($component, $name, $infolistName); + } + + /** + * + * + * @see \Filament\Infolists\Testing\TestsActions::assertInfolistActionMounted() + * @param string $component + * @param array|string $name + * @param string $infolistName + * @return static + * @static + */ + public static function assertInfolistActionHalted($component, $name, $infolistName = 'infolist') + { + return \Livewire\Features\SupportTesting\Testable::assertInfolistActionHalted($component, $name, $infolistName); + } + + /** + * + * + * @see \Filament\Infolists\Testing\TestsActions::assertHasInfolistActionErrors() + * @param array $keys + * @return static + * @static + */ + public static function assertHasInfolistActionErrors($keys = []) + { + return \Livewire\Features\SupportTesting\Testable::assertHasInfolistActionErrors($keys); + } + + /** + * + * + * @see \Filament\Infolists\Testing\TestsActions::assertHasNoInfolistActionErrors() + * @param array $keys + * @return static + * @static + */ + public static function assertHasNoInfolistActionErrors($keys = []) + { + return \Livewire\Features\SupportTesting\Testable::assertHasNoInfolistActionErrors($keys); + } + + /** + * + * + * @see \Filament\Infolists\Testing\TestsActions::getNestedInfolistActionComponentAndName() + * @param string $component + * @param array|string $name + * @param string $infolistName + * @return array + * @static + */ + public static function getNestedInfolistActionComponentAndName($component, $name, $infolistName = 'infolist') + { + return \Livewire\Features\SupportTesting\Testable::getNestedInfolistActionComponentAndName($component, $name, $infolistName); + } + + /** + * + * + * @see \Filament\Notifications\Testing\TestsNotifications::assertNotified() + * @param \Filament\Notifications\Notification|string|null $notification + * @return static + * @static + */ + public static function assertNotified($notification = null) + { + return \Livewire\Features\SupportTesting\Testable::assertNotified($notification); + } + + /** + * + * + * @see \Filament\Notifications\Testing\TestsNotifications::assertNotNotified() + * @param \Filament\Notifications\Notification|string|null $notification + * @return static + * @static + */ + public static function assertNotNotified($notification = null) + { + return \Livewire\Features\SupportTesting\Testable::assertNotNotified($notification); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsActions::mountTableAction() + * @param array|string $name + * @param mixed $record + * @return static + * @static + */ + public static function mountTableAction($name, $record = null) + { + return \Livewire\Features\SupportTesting\Testable::mountTableAction($name, $record); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsActions::unmountTableAction() + * @return static + * @static + */ + public static function unmountTableAction() + { + return \Livewire\Features\SupportTesting\Testable::unmountTableAction(); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsActions::setTableActionData() + * @param array $data + * @return static + * @static + */ + public static function setTableActionData($data) + { + return \Livewire\Features\SupportTesting\Testable::setTableActionData($data); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsActions::assertTableActionDataSet() + * @param \Closure|array $state + * @return static + * @static + */ + public static function assertTableActionDataSet($state) + { + return \Livewire\Features\SupportTesting\Testable::assertTableActionDataSet($state); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsActions::callTableAction() + * @param array|string $name + * @param mixed $record + * @param array $data + * @param array $arguments + * @return static + * @static + */ + public static function callTableAction($name, $record = null, $data = [], $arguments = []) + { + return \Livewire\Features\SupportTesting\Testable::callTableAction($name, $record, $data, $arguments); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsActions::callMountedTableAction() + * @param array $arguments + * @return static + * @static + */ + public static function callMountedTableAction($arguments = []) + { + return \Livewire\Features\SupportTesting\Testable::callMountedTableAction($arguments); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsActions::assertTableActionExists() + * @param array|string $name + * @param \Closure|null $checkActionUsing + * @param mixed $record + * @return static + * @static + */ + public static function assertTableActionExists($name, $checkActionUsing = null, $record = null) + { + return \Livewire\Features\SupportTesting\Testable::assertTableActionExists($name, $checkActionUsing, $record); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsActions::assertTableActionDoesNotExist() + * @param array|string $name + * @param \Closure|null $checkActionUsing + * @param mixed $record + * @return static + * @static + */ + public static function assertTableActionDoesNotExist($name, $checkActionUsing = null, $record = null) + { + return \Livewire\Features\SupportTesting\Testable::assertTableActionDoesNotExist($name, $checkActionUsing, $record); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsActions::assertTableActionsExistInOrder() + * @param array $names + * @return static + * @static + */ + public static function assertTableActionsExistInOrder($names) + { + return \Livewire\Features\SupportTesting\Testable::assertTableActionsExistInOrder($names); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsActions::assertTableHeaderActionsExistInOrder() + * @param array $names + * @return static + * @static + */ + public static function assertTableHeaderActionsExistInOrder($names) + { + return \Livewire\Features\SupportTesting\Testable::assertTableHeaderActionsExistInOrder($names); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsActions::assertTableEmptyStateActionsExistInOrder() + * @param array $names + * @return static + * @static + */ + public static function assertTableEmptyStateActionsExistInOrder($names) + { + return \Livewire\Features\SupportTesting\Testable::assertTableEmptyStateActionsExistInOrder($names); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsActions::assertTableActionVisible() + * @param array|string $name + * @param mixed $record + * @return static + * @static + */ + public static function assertTableActionVisible($name, $record = null) + { + return \Livewire\Features\SupportTesting\Testable::assertTableActionVisible($name, $record); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsActions::assertTableActionHidden() + * @param array|string $name + * @param mixed $record + * @return static + * @static + */ + public static function assertTableActionHidden($name, $record = null) + { + return \Livewire\Features\SupportTesting\Testable::assertTableActionHidden($name, $record); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsActions::assertTableActionEnabled() + * @param array|string $name + * @param mixed $record + * @return static + * @static + */ + public static function assertTableActionEnabled($name, $record = null) + { + return \Livewire\Features\SupportTesting\Testable::assertTableActionEnabled($name, $record); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsActions::assertTableActionDisabled() + * @param array|string $name + * @param mixed $record + * @return static + * @static + */ + public static function assertTableActionDisabled($name, $record = null) + { + return \Livewire\Features\SupportTesting\Testable::assertTableActionDisabled($name, $record); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsActions::assertTableActionHasIcon() + * @param array|string $name + * @param string $icon + * @param mixed $record + * @return static + * @static + */ + public static function assertTableActionHasIcon($name, $icon, $record = null) + { + return \Livewire\Features\SupportTesting\Testable::assertTableActionHasIcon($name, $icon, $record); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsActions::assertTableActionDoesNotHaveIcon() + * @param array|string $name + * @param string $icon + * @param mixed $record + * @return static + * @static + */ + public static function assertTableActionDoesNotHaveIcon($name, $icon, $record = null) + { + return \Livewire\Features\SupportTesting\Testable::assertTableActionDoesNotHaveIcon($name, $icon, $record); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsActions::assertTableActionHasLabel() + * @param array|string $name + * @param string $label + * @param mixed $record + * @return static + * @static + */ + public static function assertTableActionHasLabel($name, $label, $record = null) + { + return \Livewire\Features\SupportTesting\Testable::assertTableActionHasLabel($name, $label, $record); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsActions::assertTableActionDoesNotHaveLabel() + * @param array|string $name + * @param string $label + * @param mixed $record + * @return static + * @static + */ + public static function assertTableActionDoesNotHaveLabel($name, $label, $record = null) + { + return \Livewire\Features\SupportTesting\Testable::assertTableActionDoesNotHaveLabel($name, $label, $record); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsActions::assertTableActionHasColor() + * @param array|string $name + * @param array|string $color + * @param mixed $record + * @return static + * @static + */ + public static function assertTableActionHasColor($name, $color, $record = null) + { + return \Livewire\Features\SupportTesting\Testable::assertTableActionHasColor($name, $color, $record); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsActions::assertTableActionDoesNotHaveColor() + * @param array|string $name + * @param array|string $color + * @param mixed $record + * @return static + * @static + */ + public static function assertTableActionDoesNotHaveColor($name, $color, $record = null) + { + return \Livewire\Features\SupportTesting\Testable::assertTableActionDoesNotHaveColor($name, $color, $record); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsActions::assertTableActionHasUrl() + * @param array|string $name + * @param string $url + * @param mixed $record + * @return static + * @static + */ + public static function assertTableActionHasUrl($name, $url, $record = null) + { + return \Livewire\Features\SupportTesting\Testable::assertTableActionHasUrl($name, $url, $record); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsActions::assertTableActionDoesNotHaveUrl() + * @param array|string $name + * @param string $url + * @param mixed $record + * @return static + * @static + */ + public static function assertTableActionDoesNotHaveUrl($name, $url, $record = null) + { + return \Livewire\Features\SupportTesting\Testable::assertTableActionDoesNotHaveUrl($name, $url, $record); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsActions::assertTableActionShouldOpenUrlInNewTab() + * @param array|string $name + * @param mixed $record + * @return static + * @static + */ + public static function assertTableActionShouldOpenUrlInNewTab($name, $record = null) + { + return \Livewire\Features\SupportTesting\Testable::assertTableActionShouldOpenUrlInNewTab($name, $record); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsActions::assertTableActionShouldNotOpenUrlInNewTab() + * @param array|string $name + * @param mixed $record + * @return static + * @static + */ + public static function assertTableActionShouldNotOpenUrlInNewTab($name, $record = null) + { + return \Livewire\Features\SupportTesting\Testable::assertTableActionShouldNotOpenUrlInNewTab($name, $record); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsActions::assertTableActionMounted() + * @param array|string $name + * @return static + * @static + */ + public static function assertTableActionMounted($name) + { + return \Livewire\Features\SupportTesting\Testable::assertTableActionMounted($name); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsActions::assertTableActionNotMounted() + * @param array|string $name + * @return static + * @static + */ + public static function assertTableActionNotMounted($name) + { + return \Livewire\Features\SupportTesting\Testable::assertTableActionNotMounted($name); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsActions::assertTableActionMounted() + * @param array|string $name + * @return static + * @static + */ + public static function assertTableActionHalted($name) + { + return \Livewire\Features\SupportTesting\Testable::assertTableActionHalted($name); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsActions::assertTableActionMounted() + * @param array|string $name + * @return static + * @static + */ + public static function assertTableActionHeld($name) + { + return \Livewire\Features\SupportTesting\Testable::assertTableActionHeld($name); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsActions::assertHasTableActionErrors() + * @param array $keys + * @return static + * @static + */ + public static function assertHasTableActionErrors($keys = []) + { + return \Livewire\Features\SupportTesting\Testable::assertHasTableActionErrors($keys); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsActions::assertHasNoTableActionErrors() + * @param array $keys + * @return static + * @static + */ + public static function assertHasNoTableActionErrors($keys = []) + { + return \Livewire\Features\SupportTesting\Testable::assertHasNoTableActionErrors($keys); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsBulkActions::mountTableBulkAction() + * @param string $name + * @param \Illuminate\Support\Collection|array $records + * @return static + * @static + */ + public static function mountTableBulkAction($name, $records) + { + return \Livewire\Features\SupportTesting\Testable::mountTableBulkAction($name, $records); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsBulkActions::setTableBulkActionData() + * @param array $data + * @return static + * @static + */ + public static function setTableBulkActionData($data) + { + return \Livewire\Features\SupportTesting\Testable::setTableBulkActionData($data); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsBulkActions::assertTableBulkActionDataSet() + * @param \Closure|array $state + * @return static + * @static + */ + public static function assertTableBulkActionDataSet($state) + { + return \Livewire\Features\SupportTesting\Testable::assertTableBulkActionDataSet($state); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsBulkActions::callTableBulkAction() + * @param string $name + * @param \Illuminate\Support\Collection|array $records + * @param array $data + * @param array $arguments + * @return static + * @static + */ + public static function callTableBulkAction($name, $records, $data = [], $arguments = []) + { + return \Livewire\Features\SupportTesting\Testable::callTableBulkAction($name, $records, $data, $arguments); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsBulkActions::callMountedTableBulkAction() + * @param array $arguments + * @return static + * @static + */ + public static function callMountedTableBulkAction($arguments = []) + { + return \Livewire\Features\SupportTesting\Testable::callMountedTableBulkAction($arguments); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsBulkActions::assertTableBulkActionExists() + * @param string $name + * @return static + * @static + */ + public static function assertTableBulkActionExists($name) + { + return \Livewire\Features\SupportTesting\Testable::assertTableBulkActionExists($name); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsBulkActions::assertTableBulkActionDoesNotExist() + * @param string $name + * @return static + * @static + */ + public static function assertTableBulkActionDoesNotExist($name) + { + return \Livewire\Features\SupportTesting\Testable::assertTableBulkActionDoesNotExist($name); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsBulkActions::assertTableBulkActionsExistInOrder() + * @param array $names + * @return static + * @static + */ + public static function assertTableBulkActionsExistInOrder($names) + { + return \Livewire\Features\SupportTesting\Testable::assertTableBulkActionsExistInOrder($names); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsBulkActions::assertTableBulkActionVisible() + * @param string $name + * @return static + * @static + */ + public static function assertTableBulkActionVisible($name) + { + return \Livewire\Features\SupportTesting\Testable::assertTableBulkActionVisible($name); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsBulkActions::assertTableBulkActionHidden() + * @param string $name + * @return static + * @static + */ + public static function assertTableBulkActionHidden($name) + { + return \Livewire\Features\SupportTesting\Testable::assertTableBulkActionHidden($name); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsBulkActions::assertTableBulkActionEnabled() + * @param string $name + * @return static + * @static + */ + public static function assertTableBulkActionEnabled($name) + { + return \Livewire\Features\SupportTesting\Testable::assertTableBulkActionEnabled($name); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsBulkActions::assertTableBulkActionDisabled() + * @param string $name + * @return static + * @static + */ + public static function assertTableBulkActionDisabled($name) + { + return \Livewire\Features\SupportTesting\Testable::assertTableBulkActionDisabled($name); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsBulkActions::assertTableBulkActionHasIcon() + * @param string $name + * @param string $icon + * @param mixed $record + * @return static + * @static + */ + public static function assertTableBulkActionHasIcon($name, $icon, $record = null) + { + return \Livewire\Features\SupportTesting\Testable::assertTableBulkActionHasIcon($name, $icon, $record); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsBulkActions::assertTableBulkActionDoesNotHaveIcon() + * @param string $name + * @param string $icon + * @param mixed $record + * @return static + * @static + */ + public static function assertTableBulkActionDoesNotHaveIcon($name, $icon, $record = null) + { + return \Livewire\Features\SupportTesting\Testable::assertTableBulkActionDoesNotHaveIcon($name, $icon, $record); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsBulkActions::assertTableBulkActionHasLabel() + * @param string $name + * @param string $label + * @param mixed $record + * @return static + * @static + */ + public static function assertTableBulkActionHasLabel($name, $label, $record = null) + { + return \Livewire\Features\SupportTesting\Testable::assertTableBulkActionHasLabel($name, $label, $record); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsBulkActions::assertTableBulkActionDoesNotHaveLabel() + * @param string $name + * @param string $label + * @param mixed $record + * @return static + * @static + */ + public static function assertTableBulkActionDoesNotHaveLabel($name, $label, $record = null) + { + return \Livewire\Features\SupportTesting\Testable::assertTableBulkActionDoesNotHaveLabel($name, $label, $record); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsBulkActions::assertTableBulkActionHasColor() + * @param string $name + * @param array|string $color + * @param mixed $record + * @return static + * @static + */ + public static function assertTableBulkActionHasColor($name, $color, $record = null) + { + return \Livewire\Features\SupportTesting\Testable::assertTableBulkActionHasColor($name, $color, $record); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsBulkActions::assertTableBulkActionDoesNotHaveColor() + * @param string $name + * @param array|string $color + * @param mixed $record + * @return static + * @static + */ + public static function assertTableBulkActionDoesNotHaveColor($name, $color, $record = null) + { + return \Livewire\Features\SupportTesting\Testable::assertTableBulkActionDoesNotHaveColor($name, $color, $record); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsBulkActions::assertTableBulkActionMounted() + * @param string $name + * @return static + * @static + */ + public static function assertTableBulkActionMounted($name) + { + return \Livewire\Features\SupportTesting\Testable::assertTableBulkActionMounted($name); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsBulkActions::assertTableBulkActionNotMounted() + * @param string $name + * @return static + * @static + */ + public static function assertTableBulkActionNotMounted($name) + { + return \Livewire\Features\SupportTesting\Testable::assertTableBulkActionNotMounted($name); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsBulkActions::assertTableBulkActionMounted() + * @param string $name + * @return static + * @static + */ + public static function assertTableBulkActionHalted($name) + { + return \Livewire\Features\SupportTesting\Testable::assertTableBulkActionHalted($name); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsBulkActions::assertTableBulkActionMounted() + * @param string $name + * @return static + * @static + */ + public static function assertTableBulkActionHeld($name) + { + return \Livewire\Features\SupportTesting\Testable::assertTableBulkActionHeld($name); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsBulkActions::assertHasTableBulkActionErrors() + * @param array $keys + * @return static + * @static + */ + public static function assertHasTableBulkActionErrors($keys = []) + { + return \Livewire\Features\SupportTesting\Testable::assertHasTableBulkActionErrors($keys); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsBulkActions::assertHasNoTableBulkActionErrors() + * @param array $keys + * @return static + * @static + */ + public static function assertHasNoTableBulkActionErrors($keys = []) + { + return \Livewire\Features\SupportTesting\Testable::assertHasNoTableBulkActionErrors($keys); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsColumns::assertCanRenderTableColumn() + * @param string $name + * @return static + * @static + */ + public static function assertCanRenderTableColumn($name) + { + return \Livewire\Features\SupportTesting\Testable::assertCanRenderTableColumn($name); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsColumns::assertCanNotRenderTableColumn() + * @param string $name + * @return static + * @static + */ + public static function assertCanNotRenderTableColumn($name) + { + return \Livewire\Features\SupportTesting\Testable::assertCanNotRenderTableColumn($name); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsColumns::assertTableColumnExists() + * @param string $name + * @param \Closure|null $checkColumnUsing + * @param mixed $record + * @return static + * @static + */ + public static function assertTableColumnExists($name, $checkColumnUsing = null, $record = null) + { + return \Livewire\Features\SupportTesting\Testable::assertTableColumnExists($name, $checkColumnUsing, $record); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsColumns::assertTableColumnDoesNotExist() + * @param string $name + * @param \Closure|null $checkColumnUsing + * @param mixed $record + * @return static + * @static + */ + public static function assertTableColumnDoesNotExist($name, $checkColumnUsing = null, $record = null) + { + return \Livewire\Features\SupportTesting\Testable::assertTableColumnDoesNotExist($name, $checkColumnUsing, $record); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsColumns::assertTableColumnVisible() + * @param string $name + * @return static + * @static + */ + public static function assertTableColumnVisible($name) + { + return \Livewire\Features\SupportTesting\Testable::assertTableColumnVisible($name); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsColumns::assertTableColumnHidden() + * @param string $name + * @return static + * @static + */ + public static function assertTableColumnHidden($name) + { + return \Livewire\Features\SupportTesting\Testable::assertTableColumnHidden($name); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsColumns::assertTableColumnStateSet() + * @param string $name + * @param mixed $value + * @param mixed $record + * @return static + * @static + */ + public static function assertTableColumnStateSet($name, $value, $record) + { + return \Livewire\Features\SupportTesting\Testable::assertTableColumnStateSet($name, $value, $record); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsColumns::assertTableColumnStateNotSet() + * @param string $name + * @param mixed $value + * @param mixed $record + * @return static + * @static + */ + public static function assertTableColumnStateNotSet($name, $value, $record) + { + return \Livewire\Features\SupportTesting\Testable::assertTableColumnStateNotSet($name, $value, $record); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsColumns::assertTableColumnFormattedStateSet() + * @param string $name + * @param mixed $value + * @param mixed $record + * @return static + * @static + */ + public static function assertTableColumnFormattedStateSet($name, $value, $record) + { + return \Livewire\Features\SupportTesting\Testable::assertTableColumnFormattedStateSet($name, $value, $record); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsColumns::assertTableColumnFormattedStateNotSet() + * @param string $name + * @param mixed $value + * @param mixed $record + * @return static + * @static + */ + public static function assertTableColumnFormattedStateNotSet($name, $value, $record) + { + return \Livewire\Features\SupportTesting\Testable::assertTableColumnFormattedStateNotSet($name, $value, $record); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsColumns::assertTableColumnHasExtraAttributes() + * @param string $name + * @param array $attributes + * @param mixed $record + * @static + */ + public static function assertTableColumnHasExtraAttributes($name, $attributes, $record) + { + return \Livewire\Features\SupportTesting\Testable::assertTableColumnHasExtraAttributes($name, $attributes, $record); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsColumns::assertTableColumnDoesNotHaveExtraAttributes() + * @param string $name + * @param array $attributes + * @param mixed $record + * @static + */ + public static function assertTableColumnDoesNotHaveExtraAttributes($name, $attributes, $record) + { + return \Livewire\Features\SupportTesting\Testable::assertTableColumnDoesNotHaveExtraAttributes($name, $attributes, $record); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsColumns::assertTableColumnHasDescription() + * @param string $name + * @param mixed $description + * @param mixed $record + * @param string $position + * @static + */ + public static function assertTableColumnHasDescription($name, $description, $record, $position = 'below') + { + return \Livewire\Features\SupportTesting\Testable::assertTableColumnHasDescription($name, $description, $record, $position); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsColumns::assertTableColumnDoesNotHaveDescription() + * @param string $name + * @param mixed $description + * @param mixed $record + * @param string $position + * @static + */ + public static function assertTableColumnDoesNotHaveDescription($name, $description, $record, $position = 'below') + { + return \Livewire\Features\SupportTesting\Testable::assertTableColumnDoesNotHaveDescription($name, $description, $record, $position); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsColumns::assertTableSelectColumnHasOptions() + * @param string $name + * @param array $options + * @param mixed $record + * @static + */ + public static function assertTableSelectColumnHasOptions($name, $options, $record) + { + return \Livewire\Features\SupportTesting\Testable::assertTableSelectColumnHasOptions($name, $options, $record); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsColumns::assertTableSelectColumnDoesNotHaveOptions() + * @param string $name + * @param array $options + * @param mixed $record + * @static + */ + public static function assertTableSelectColumnDoesNotHaveOptions($name, $options, $record) + { + return \Livewire\Features\SupportTesting\Testable::assertTableSelectColumnDoesNotHaveOptions($name, $options, $record); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsColumns::callTableColumnAction() + * @param string $name + * @param mixed $record + * @return static + * @static + */ + public static function callTableColumnAction($name, $record = null) + { + return \Livewire\Features\SupportTesting\Testable::callTableColumnAction($name, $record); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsColumns::sortTable() + * @param string|null $name + * @param string|null $direction + * @return static + * @static + */ + public static function sortTable($name = null, $direction = null) + { + return \Livewire\Features\SupportTesting\Testable::sortTable($name, $direction); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsColumns::searchTable() + * @param string|null $search + * @return static + * @static + */ + public static function searchTable($search = null) + { + return \Livewire\Features\SupportTesting\Testable::searchTable($search); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsColumns::searchTableColumns() + * @param array $searches + * @return static + * @static + */ + public static function searchTableColumns($searches) + { + return \Livewire\Features\SupportTesting\Testable::searchTableColumns($searches); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsFilters::filterTable() + * @param string $name + * @param mixed $data + * @return static + * @static + */ + public static function filterTable($name, $data = null) + { + return \Livewire\Features\SupportTesting\Testable::filterTable($name, $data); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsFilters::resetTableFilters() + * @return static + * @static + */ + public static function resetTableFilters() + { + return \Livewire\Features\SupportTesting\Testable::resetTableFilters(); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsFilters::removeTableFilter() + * @param string $filter + * @param string|null $field + * @return static + * @static + */ + public static function removeTableFilter($filter, $field = null) + { + return \Livewire\Features\SupportTesting\Testable::removeTableFilter($filter, $field); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsFilters::removeTableFilters() + * @return static + * @static + */ + public static function removeTableFilters() + { + return \Livewire\Features\SupportTesting\Testable::removeTableFilters(); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsFilters::assertTableFilterExists() + * @param string $name + * @param \Closure|null $checkFilterUsing + * @return static + * @static + */ + public static function assertTableFilterExists($name, $checkFilterUsing = null) + { + return \Livewire\Features\SupportTesting\Testable::assertTableFilterExists($name, $checkFilterUsing); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsFilters::assertTableFilterVisible() + * @param string $name + * @return static + * @static + */ + public static function assertTableFilterVisible($name) + { + return \Livewire\Features\SupportTesting\Testable::assertTableFilterVisible($name); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsFilters::assertTableFilterHidden() + * @param string $name + * @return static + * @static + */ + public static function assertTableFilterHidden($name) + { + return \Livewire\Features\SupportTesting\Testable::assertTableFilterHidden($name); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsRecords::assertCanSeeTableRecords() + * @param \Illuminate\Support\Collection|array $records + * @param bool $inOrder + * @return static + * @static + */ + public static function assertCanSeeTableRecords($records, $inOrder = false) + { + return \Livewire\Features\SupportTesting\Testable::assertCanSeeTableRecords($records, $inOrder); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsRecords::assertCanNotSeeTableRecords() + * @param \Illuminate\Support\Collection|array $records + * @return static + * @static + */ + public static function assertCanNotSeeTableRecords($records) + { + return \Livewire\Features\SupportTesting\Testable::assertCanNotSeeTableRecords($records); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsRecords::assertCountTableRecords() + * @param int $count + * @return static + * @static + */ + public static function assertCountTableRecords($count) + { + return \Livewire\Features\SupportTesting\Testable::assertCountTableRecords($count); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsRecords::loadTable() + * @return static + * @static + */ + public static function loadTable() + { + return \Livewire\Features\SupportTesting\Testable::loadTable(); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsSummaries::assertTableColumnSummarySet() + * @param string $columnName + * @param string $summarizerId + * @param mixed $state + * @param bool $isCurrentPaginationPageOnly + * @return static + * @static + */ + public static function assertTableColumnSummarySet($columnName, $summarizerId, $state, $isCurrentPaginationPageOnly = false) + { + return \Livewire\Features\SupportTesting\Testable::assertTableColumnSummarySet($columnName, $summarizerId, $state, $isCurrentPaginationPageOnly); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsSummaries::assertTableColumnSummaryNotSet() + * @param string $columnName + * @param string $summarizerId + * @param mixed $state + * @param bool $isCurrentPaginationPageOnly + * @return static + * @static + */ + public static function assertTableColumnSummaryNotSet($columnName, $summarizerId, $state, $isCurrentPaginationPageOnly = false) + { + return \Livewire\Features\SupportTesting\Testable::assertTableColumnSummaryNotSet($columnName, $summarizerId, $state, $isCurrentPaginationPageOnly); + } + + /** + * + * + * @see \Filament\Tables\Testing\TestsSummaries::assertTableColumnSummarizerExists() + * @param string $columnName + * @param string $summarizerId + * @return static + * @static + */ + public static function assertTableColumnSummarizerExists($columnName, $summarizerId) + { + return \Livewire\Features\SupportTesting\Testable::assertTableColumnSummarizerExists($columnName, $summarizerId); + } + + } + } + +namespace Illuminate\View { + /** + * + * + */ + class ComponentAttributeBag { + /** + * + * + * @see \Livewire\Features\SupportBladeAttributes\SupportBladeAttributes::provide() + * @param mixed $name + * @static + */ + public static function wire($name) + { + return \Illuminate\View\ComponentAttributeBag::wire($name); + } + + } + /** + * + * + */ + class View { + /** + * + * + * @see \Livewire\Features\SupportPageComponents\SupportPageComponents::registerLayoutViewMacros() + * @param mixed $data + * @static + */ + public static function layoutData($data = []) + { + return \Illuminate\View\View::layoutData($data); + } + + /** + * + * + * @see \Livewire\Features\SupportPageComponents\SupportPageComponents::registerLayoutViewMacros() + * @param mixed $section + * @static + */ + public static function section($section) + { + return \Illuminate\View\View::section($section); + } + + /** + * + * + * @see \Livewire\Features\SupportPageComponents\SupportPageComponents::registerLayoutViewMacros() + * @param mixed $title + * @static + */ + public static function title($title) + { + return \Illuminate\View\View::title($title); + } + + /** + * + * + * @see \Livewire\Features\SupportPageComponents\SupportPageComponents::registerLayoutViewMacros() + * @param mixed $slot + * @static + */ + public static function slot($slot) + { + return \Illuminate\View\View::slot($slot); + } + + /** + * + * + * @see \Livewire\Features\SupportPageComponents\SupportPageComponents::registerLayoutViewMacros() + * @param mixed $view + * @param mixed $params + * @static + */ + public static function extends($view, $params = []) + { + return \Illuminate\View\View::extends($view, $params); + } + + /** + * + * + * @see \Livewire\Features\SupportPageComponents\SupportPageComponents::registerLayoutViewMacros() + * @param mixed $view + * @param mixed $params + * @static + */ + public static function layout($view, $params = []) + { + return \Illuminate\View\View::layout($view, $params); + } + + /** + * + * + * @see \Livewire\Features\SupportPageComponents\SupportPageComponents::registerLayoutViewMacros() + * @param callable $callback + * @static + */ + public static function response($callback) + { + return \Illuminate\View\View::response($callback); + } + + } + } + + +namespace { + class App extends \Illuminate\Support\Facades\App {} + class Arr extends \Illuminate\Support\Arr {} + class Artisan extends \Illuminate\Support\Facades\Artisan {} + class Auth extends \Illuminate\Support\Facades\Auth {} + class Blade extends \Illuminate\Support\Facades\Blade {} + class Broadcast extends \Illuminate\Support\Facades\Broadcast {} + class Bus extends \Illuminate\Support\Facades\Bus {} + class Cache extends \Illuminate\Support\Facades\Cache {} + class Concurrency extends \Illuminate\Support\Facades\Concurrency {} + class Config extends \Illuminate\Support\Facades\Config {} + class Context extends \Illuminate\Support\Facades\Context {} + class Cookie extends \Illuminate\Support\Facades\Cookie {} + class Crypt extends \Illuminate\Support\Facades\Crypt {} + class Date extends \Illuminate\Support\Facades\Date {} + class DB extends \Illuminate\Support\Facades\DB {} + + /** + * + * + * @template TCollection of static + * @template TModel of static + * @template TValue of static + * @template TValue of static + */ + class Eloquent extends \Illuminate\Database\Eloquent\Model { /** + * Create and return an un-saved model instance. + * + * @param array $attributes + * @return TModel + * @static + */ + public static function make($attributes = []) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->make($attributes); + } + + /** + * Register a new global scope. + * + * @param string $identifier + * @param \Illuminate\Database\Eloquent\Scope|\Closure $scope + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function withGlobalScope($identifier, $scope) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->withGlobalScope($identifier, $scope); + } + + /** + * Remove a registered global scope. + * + * @param \Illuminate\Database\Eloquent\Scope|string $scope + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function withoutGlobalScope($scope) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->withoutGlobalScope($scope); + } + + /** + * Remove all or passed registered global scopes. + * + * @param array|null $scopes + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function withoutGlobalScopes($scopes = null) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->withoutGlobalScopes($scopes); + } + + /** + * Get an array of global scopes that were removed from the query. + * + * @return array + * @static + */ + public static function removedScopes() + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->removedScopes(); + } + + /** + * Add a where clause on the primary key to the query. + * + * @param mixed $id + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function whereKey($id) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->whereKey($id); + } + + /** + * Add a where clause on the primary key to the query. + * + * @param mixed $id + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function whereKeyNot($id) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->whereKeyNot($id); + } + + /** + * Add a basic where clause to the query. + * + * @param (\Closure(static): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column + * @param mixed $operator + * @param mixed $value + * @param string $boolean + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function where($column, $operator = null, $value = null, $boolean = 'and') + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->where($column, $operator, $value, $boolean); + } + + /** + * Add a basic where clause to the query, and return the first result. + * + * @param (\Closure(static): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column + * @param mixed $operator + * @param mixed $value + * @param string $boolean + * @return TModel|null + * @static + */ + public static function firstWhere($column, $operator = null, $value = null, $boolean = 'and') + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->firstWhere($column, $operator, $value, $boolean); + } + + /** + * Add an "or where" clause to the query. + * + * @param (\Closure(static): mixed)|array|string|\Illuminate\Contracts\Database\Query\Expression $column + * @param mixed $operator + * @param mixed $value + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function orWhere($column, $operator = null, $value = null) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->orWhere($column, $operator, $value); + } + + /** + * Add a basic "where not" clause to the query. + * + * @param (\Closure(static): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column + * @param mixed $operator + * @param mixed $value + * @param string $boolean + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function whereNot($column, $operator = null, $value = null, $boolean = 'and') + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->whereNot($column, $operator, $value, $boolean); + } + + /** + * Add an "or where not" clause to the query. + * + * @param (\Closure(static): mixed)|array|string|\Illuminate\Contracts\Database\Query\Expression $column + * @param mixed $operator + * @param mixed $value + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function orWhereNot($column, $operator = null, $value = null) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->orWhereNot($column, $operator, $value); + } + + /** + * Add an "order by" clause for a timestamp to the query. + * + * @param string|\Illuminate\Contracts\Database\Query\Expression $column + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function latest($column = null) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->latest($column); + } + + /** + * Add an "order by" clause for a timestamp to the query. + * + * @param string|\Illuminate\Contracts\Database\Query\Expression $column + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function oldest($column = null) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->oldest($column); + } + + /** + * Create a collection of models from plain arrays. + * + * @param array $items + * @return \Illuminate\Database\Eloquent\Collection + * @static + */ + public static function hydrate($items) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->hydrate($items); + } + + /** + * Create a collection of models from a raw query. + * + * @param string $query + * @param array $bindings + * @return \Illuminate\Database\Eloquent\Collection + * @static + */ + public static function fromQuery($query, $bindings = []) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->fromQuery($query, $bindings); + } + + /** + * Find a model by its primary key. + * + * @param mixed $id + * @param array|string $columns + * @return ($id is (\Illuminate\Contracts\Support\Arrayable|array) ? \Illuminate\Database\Eloquent\Collection : TModel|null) + * @static + */ + public static function find($id, $columns = []) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->find($id, $columns); + } + + /** + * Find a sole model by its primary key. + * + * @param mixed $id + * @param array|string $columns + * @return TModel + * @throws \Illuminate\Database\Eloquent\ModelNotFoundException + * @throws \Illuminate\Database\MultipleRecordsFoundException + * @static + */ + public static function findSole($id, $columns = []) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->findSole($id, $columns); + } + + /** + * Find multiple models by their primary keys. + * + * @param \Illuminate\Contracts\Support\Arrayable|array $ids + * @param array|string $columns + * @return \Illuminate\Database\Eloquent\Collection + * @static + */ + public static function findMany($ids, $columns = []) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->findMany($ids, $columns); + } + + /** + * Find a model by its primary key or throw an exception. + * + * @param mixed $id + * @param array|string $columns + * @return ($id is (\Illuminate\Contracts\Support\Arrayable|array) ? \Illuminate\Database\Eloquent\Collection : TModel) + * @throws \Illuminate\Database\Eloquent\ModelNotFoundException + * @static + */ + public static function findOrFail($id, $columns = []) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->findOrFail($id, $columns); + } + + /** + * Find a model by its primary key or return fresh model instance. + * + * @param mixed $id + * @param array|string $columns + * @return ($id is (\Illuminate\Contracts\Support\Arrayable|array) ? \Illuminate\Database\Eloquent\Collection : TModel) + * @static + */ + public static function findOrNew($id, $columns = []) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->findOrNew($id, $columns); + } + + /** + * Find a model by its primary key or call a callback. + * + * @template TValue + * @param mixed $id + * @param (\Closure(): TValue)|list|string $columns + * @param (\Closure(): TValue)|null $callback + * @return ( $id is (\Illuminate\Contracts\Support\Arrayable|array) + * ? \Illuminate\Database\Eloquent\Collection + * : TModel|TValue + * ) + * @static + */ + public static function findOr($id, $columns = [], $callback = null) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->findOr($id, $columns, $callback); + } + + /** + * Get the first record matching the attributes or instantiate it. + * + * @param array $attributes + * @param array $values + * @return TModel + * @static + */ + public static function firstOrNew($attributes = [], $values = []) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->firstOrNew($attributes, $values); + } + + /** + * Get the first record matching the attributes. If the record is not found, create it. + * + * @param array $attributes + * @param array $values + * @return TModel + * @static + */ + public static function firstOrCreate($attributes = [], $values = []) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ return $instance->firstOrCreate($attributes, $values); } /** - * Attempt to create the record. If a unique constraint violation occurs, attempt to find the matching record. + * Attempt to create the record. If a unique constraint violation occurs, attempt to find the matching record. + * + * @param array $attributes + * @param array $values + * @return TModel + * @static + */ + public static function createOrFirst($attributes = [], $values = []) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->createOrFirst($attributes, $values); + } + + /** + * Create or update a record matching the attributes, and fill it with values. + * + * @param array $attributes + * @param array $values + * @return TModel + * @static + */ + public static function updateOrCreate($attributes, $values = []) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->updateOrCreate($attributes, $values); + } + + /** + * Create a record matching the attributes, or increment the existing record. + * + * @param array $attributes + * @param string $column + * @param int|float $default + * @param int|float $step + * @param array $extra + * @return TModel + * @static + */ + public static function incrementOrCreate($attributes, $column = 'count', $default = 1, $step = 1, $extra = []) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->incrementOrCreate($attributes, $column, $default, $step, $extra); + } + + /** + * Execute the query and get the first result or throw an exception. + * + * @param array|string $columns + * @return TModel + * @throws \Illuminate\Database\Eloquent\ModelNotFoundException + * @static + */ + public static function firstOrFail($columns = []) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->firstOrFail($columns); + } + + /** + * Execute the query and get the first result or call a callback. + * + * @template TValue + * @param (\Closure(): TValue)|list $columns + * @param (\Closure(): TValue)|null $callback + * @return TModel|TValue + * @static + */ + public static function firstOr($columns = [], $callback = null) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->firstOr($columns, $callback); + } + + /** + * Execute the query and get the first result if it's the sole matching record. + * + * @param array|string $columns + * @return TModel + * @throws \Illuminate\Database\Eloquent\ModelNotFoundException + * @throws \Illuminate\Database\MultipleRecordsFoundException + * @static + */ + public static function sole($columns = []) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->sole($columns); + } + + /** + * Get a single column's value from the first result of a query. + * + * @param string|\Illuminate\Contracts\Database\Query\Expression $column + * @return mixed + * @static + */ + public static function value($column) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->value($column); + } + + /** + * Get a single column's value from the first result of a query if it's the sole matching record. + * + * @param string|\Illuminate\Contracts\Database\Query\Expression $column + * @return mixed + * @throws \Illuminate\Database\Eloquent\ModelNotFoundException + * @throws \Illuminate\Database\MultipleRecordsFoundException + * @static + */ + public static function soleValue($column) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->soleValue($column); + } + + /** + * Get a single column's value from the first result of the query or throw an exception. + * + * @param string|\Illuminate\Contracts\Database\Query\Expression $column + * @return mixed + * @throws \Illuminate\Database\Eloquent\ModelNotFoundException + * @static + */ + public static function valueOrFail($column) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->valueOrFail($column); + } + + /** + * Execute the query as a "select" statement. + * + * @param array|string $columns + * @return \Illuminate\Database\Eloquent\Collection + * @static + */ + public static function get($columns = []) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->get($columns); + } + + /** + * Get the hydrated models without eager loading. + * + * @param array|string $columns + * @return array + * @static + */ + public static function getModels($columns = []) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->getModels($columns); + } + + /** + * Eager load the relationships for the models. + * + * @param array $models + * @return array + * @static + */ + public static function eagerLoadRelations($models) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->eagerLoadRelations($models); + } + + /** + * Register a closure to be invoked after the query is executed. + * + * @param \Closure $callback + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function afterQuery($callback) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->afterQuery($callback); + } + + /** + * Invoke the "after query" modification callbacks. + * + * @param mixed $result + * @return mixed + * @static + */ + public static function applyAfterQueryCallbacks($result) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->applyAfterQueryCallbacks($result); + } + + /** + * Get a lazy collection for the given query. + * + * @return \Illuminate\Support\LazyCollection + * @static + */ + public static function cursor() + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->cursor(); + } + + /** + * Get a collection with the values of a given column. + * + * @param string|\Illuminate\Contracts\Database\Query\Expression $column + * @param string|null $key + * @return \Illuminate\Support\Collection + * @static + */ + public static function pluck($column, $key = null) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->pluck($column, $key); + } + + /** + * Paginate the given query. + * + * @param int|null|\Closure $perPage + * @param array|string $columns + * @param string $pageName + * @param int|null $page + * @param \Closure|int|null $total + * @return \Illuminate\Pagination\LengthAwarePaginator + * @throws \InvalidArgumentException + * @static + */ + public static function paginate($perPage = null, $columns = [], $pageName = 'page', $page = null, $total = null) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->paginate($perPage, $columns, $pageName, $page, $total); + } + + /** + * Paginate the given query into a simple paginator. + * + * @param int|null $perPage + * @param array|string $columns + * @param string $pageName + * @param int|null $page + * @return \Illuminate\Contracts\Pagination\Paginator + * @static + */ + public static function simplePaginate($perPage = null, $columns = [], $pageName = 'page', $page = null) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->simplePaginate($perPage, $columns, $pageName, $page); + } + + /** + * Paginate the given query into a cursor paginator. + * + * @param int|null $perPage + * @param array|string $columns + * @param string $cursorName + * @param \Illuminate\Pagination\Cursor|string|null $cursor + * @return \Illuminate\Contracts\Pagination\CursorPaginator + * @static + */ + public static function cursorPaginate($perPage = null, $columns = [], $cursorName = 'cursor', $cursor = null) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->cursorPaginate($perPage, $columns, $cursorName, $cursor); + } + + /** + * Save a new model and return the instance. * * @param array $attributes - * @param array $values * @return TModel * @static */ - public static function createOrFirst($attributes = [], $values = []) + public static function create($attributes = []) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->createOrFirst($attributes, $values); + return $instance->create($attributes); } /** - * Create or update a record matching the attributes, and fill it with values. + * Save a new model and return the instance without raising model events. * * @param array $attributes - * @param array $values * @return TModel * @static */ - public static function updateOrCreate($attributes, $values = []) + public static function createQuietly($attributes = []) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->updateOrCreate($attributes, $values); + return $instance->createQuietly($attributes); } /** - * Create a record matching the attributes, or increment the existing record. + * Save a new model and return the instance. Allow mass-assignment. * * @param array $attributes - * @param string $column - * @param int|float $default - * @param int|float $step - * @param array $extra * @return TModel * @static */ - public static function incrementOrCreate($attributes, $column = 'count', $default = 1, $step = 1, $extra = []) + public static function forceCreate($attributes) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->incrementOrCreate($attributes, $column, $default, $step, $extra); + return $instance->forceCreate($attributes); } /** - * Execute the query and get the first result or throw an exception. + * Save a new model instance with mass assignment without raising model events. * - * @param array|string $columns + * @param array $attributes * @return TModel - * @throws \Illuminate\Database\Eloquent\ModelNotFoundException * @static */ - public static function firstOrFail($columns = []) + public static function forceCreateQuietly($attributes = []) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->firstOrFail($columns); + return $instance->forceCreateQuietly($attributes); } /** - * Execute the query and get the first result or call a callback. + * Insert new records or update the existing ones. * - * @template TValue - * @param (\Closure(): TValue)|list $columns - * @param (\Closure(): TValue)|null $callback - * @return TModel|TValue + * @param array $values + * @param array|string $uniqueBy + * @param array|null $update + * @return int * @static */ - public static function firstOr($columns = [], $callback = null) + public static function upsert($values, $uniqueBy, $update = null) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->upsert($values, $uniqueBy, $update); + } + + /** + * Register a replacement for the default delete function. + * + * @param \Closure $callback + * @return void + * @static + */ + public static function onDelete($callback) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + $instance->onDelete($callback); + } + + /** + * Call the given local model scopes. + * + * @param array|string $scopes + * @return static|mixed + * @static + */ + public static function scopes($scopes) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->scopes($scopes); + } + + /** + * Apply the scopes to the Eloquent builder instance and return it. + * + * @return static + * @static + */ + public static function applyScopes() + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->applyScopes(); + } + + /** + * Prevent the specified relations from being eager loaded. + * + * @param mixed $relations + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function without($relations) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->without($relations); + } + + /** + * Set the relationships that should be eager loaded while removing any previously added eager loading specifications. + * + * @param array): mixed)|string>|string $relations + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function withOnly($relations) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->withOnly($relations); + } + + /** + * Create a new instance of the model being queried. + * + * @param array $attributes + * @return TModel + * @static + */ + public static function newModelInstance($attributes = []) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->newModelInstance($attributes); + } + + /** + * Specify attributes that should be added to any new models created by this builder. + * + * The given key / value pairs will also be added as where conditions to the query. + * + * @param \Illuminate\Contracts\Database\Query\Expression|array|string $attributes + * @param mixed $value + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function withAttributes($attributes, $value = null) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->withAttributes($attributes, $value); + } + + /** + * Apply query-time casts to the model instance. + * + * @param array $casts + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function withCasts($casts) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->withCasts($casts); + } + + /** + * Execute the given Closure within a transaction savepoint if needed. + * + * @template TModelValue + * @param \Closure(): TModelValue $scope + * @return TModelValue + * @static + */ + public static function withSavepointIfNeeded($scope) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->withSavepointIfNeeded($scope); + } + + /** + * Get the underlying query builder instance. + * + * @return \Illuminate\Database\Query\Builder + * @static + */ + public static function getQuery() + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->getQuery(); + } + + /** + * Set the underlying query builder instance. + * + * @param \Illuminate\Database\Query\Builder $query + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function setQuery($query) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->setQuery($query); + } + + /** + * Get a base query builder instance. + * + * @return \Illuminate\Database\Query\Builder + * @static + */ + public static function toBase() + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->toBase(); + } + + /** + * Get the relationships being eagerly loaded. + * + * @return array + * @static + */ + public static function getEagerLoads() + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->getEagerLoads(); + } + + /** + * Set the relationships being eagerly loaded. + * + * @param array $eagerLoad + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function setEagerLoads($eagerLoad) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->setEagerLoads($eagerLoad); + } + + /** + * Indicate that the given relationships should not be eagerly loaded. + * + * @param array $relations + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function withoutEagerLoad($relations) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->withoutEagerLoad($relations); + } + + /** + * Flush the relationships being eagerly loaded. + * + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function withoutEagerLoads() { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->firstOr($columns, $callback); + return $instance->withoutEagerLoads(); } /** - * Execute the query and get the first result if it's the sole matching record. + * Get the model instance being queried. * - * @param array|string $columns * @return TModel - * @throws \Illuminate\Database\Eloquent\ModelNotFoundException - * @throws \Illuminate\Database\MultipleRecordsFoundException * @static */ - public static function sole($columns = []) + public static function getModel() { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->sole($columns); + return $instance->getModel(); } /** - * Get a single column's value from the first result of a query. + * Set a model instance for the model being queried. * - * @param string|\Illuminate\Contracts\Database\Query\Expression $column - * @return mixed + * @template TModelNew of \Illuminate\Database\Eloquent\Model + * @param TModelNew $model + * @return static * @static */ - public static function value($column) + public static function setModel($model) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->value($column); + return $instance->setModel($model); } /** - * Get a single column's value from the first result of a query if it's the sole matching record. + * Get the given macro by name. * - * @param string|\Illuminate\Contracts\Database\Query\Expression $column - * @return mixed - * @throws \Illuminate\Database\Eloquent\ModelNotFoundException - * @throws \Illuminate\Database\MultipleRecordsFoundException + * @param string $name + * @return \Closure * @static */ - public static function soleValue($column) + public static function getMacro($name) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->soleValue($column); + return $instance->getMacro($name); } /** - * Get a single column's value from the first result of the query or throw an exception. + * Checks if a macro is registered. * - * @param string|\Illuminate\Contracts\Database\Query\Expression $column - * @return mixed - * @throws \Illuminate\Database\Eloquent\ModelNotFoundException + * @param string $name + * @return bool * @static */ - public static function valueOrFail($column) + public static function hasMacro($name) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->valueOrFail($column); + return $instance->hasMacro($name); } /** - * Execute the query as a "select" statement. + * Get the given global macro by name. * - * @param array|string $columns - * @return \Illuminate\Database\Eloquent\Collection + * @param string $name + * @return \Closure * @static */ - public static function get($columns = []) + public static function getGlobalMacro($name) { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->get($columns); + return \Illuminate\Database\Eloquent\Builder::getGlobalMacro($name); } /** - * Get the hydrated models without eager loading. + * Checks if a global macro is registered. * - * @param array|string $columns - * @return array + * @param string $name + * @return bool * @static */ - public static function getModels($columns = []) + public static function hasGlobalMacro($name) { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->getModels($columns); + return \Illuminate\Database\Eloquent\Builder::hasGlobalMacro($name); } /** - * Eager load the relationships for the models. + * Clone the Eloquent query builder. * - * @param array $models - * @return array + * @return static * @static */ - public static function eagerLoadRelations($models) + public static function clone() { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->eagerLoadRelations($models); + return $instance->clone(); } /** - * Register a closure to be invoked after the query is executed. + * Register a closure to be invoked on a clone. * * @param \Closure $callback * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function afterQuery($callback) + public static function onClone($callback) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->afterQuery($callback); + return $instance->onClone($callback); } /** - * Invoke the "after query" modification callbacks. + * Chunk the results of the query. * - * @param mixed $result - * @return mixed + * @param int $count + * @param callable(\Illuminate\Support\Collection, int): mixed $callback + * @return bool * @static */ - public static function applyAfterQueryCallbacks($result) + public static function chunk($count, $callback) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->applyAfterQueryCallbacks($result); + return $instance->chunk($count, $callback); } /** - * Get a lazy collection for the given query. + * Run a map over each item while chunking. * - * @return \Illuminate\Support\LazyCollection + * @template TReturn + * @param callable(TValue): TReturn $callback + * @param int $count + * @return \Illuminate\Support\Collection * @static */ - public static function cursor() + public static function chunkMap($callback, $count = 1000) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->cursor(); + return $instance->chunkMap($callback, $count); } /** - * Get a collection with the values of a given column. + * Execute a callback over each item while chunking. * - * @param string|\Illuminate\Contracts\Database\Query\Expression $column - * @param string|null $key - * @return \Illuminate\Support\Collection + * @param callable(TValue, int): mixed $callback + * @param int $count + * @return bool + * @throws \RuntimeException * @static */ - public static function pluck($column, $key = null) + public static function each($callback, $count = 1000) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->pluck($column, $key); + return $instance->each($callback, $count); } /** - * Paginate the given query. + * Chunk the results of a query by comparing IDs. * - * @param int|null|\Closure $perPage - * @param array|string $columns - * @param string $pageName - * @param int|null $page - * @param \Closure|int|null $total - * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator - * @throws \InvalidArgumentException + * @param int $count + * @param callable(\Illuminate\Support\Collection, int): mixed $callback + * @param string|null $column + * @param string|null $alias + * @return bool * @static */ - public static function paginate($perPage = null, $columns = [], $pageName = 'page', $page = null, $total = null) + public static function chunkById($count, $callback, $column = null, $alias = null) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->paginate($perPage, $columns, $pageName, $page, $total); + return $instance->chunkById($count, $callback, $column, $alias); } /** - * Paginate the given query into a simple paginator. + * Chunk the results of a query by comparing IDs in descending order. * - * @param int|null $perPage - * @param array|string $columns - * @param string $pageName - * @param int|null $page - * @return \Illuminate\Contracts\Pagination\Paginator + * @param int $count + * @param callable(\Illuminate\Support\Collection, int): mixed $callback + * @param string|null $column + * @param string|null $alias + * @return bool * @static */ - public static function simplePaginate($perPage = null, $columns = [], $pageName = 'page', $page = null) + public static function chunkByIdDesc($count, $callback, $column = null, $alias = null) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->simplePaginate($perPage, $columns, $pageName, $page); + return $instance->chunkByIdDesc($count, $callback, $column, $alias); } /** - * Paginate the given query into a cursor paginator. + * Chunk the results of a query by comparing IDs in a given order. * - * @param int|null $perPage - * @param array|string $columns - * @param string $cursorName - * @param \Illuminate\Pagination\Cursor|string|null $cursor - * @return \Illuminate\Contracts\Pagination\CursorPaginator + * @param int $count + * @param callable(\Illuminate\Support\Collection, int): mixed $callback + * @param string|null $column + * @param string|null $alias + * @param bool $descending + * @return bool + * @throws \RuntimeException * @static */ - public static function cursorPaginate($perPage = null, $columns = [], $cursorName = 'cursor', $cursor = null) + public static function orderedChunkById($count, $callback, $column = null, $alias = null, $descending = false) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->cursorPaginate($perPage, $columns, $cursorName, $cursor); + return $instance->orderedChunkById($count, $callback, $column, $alias, $descending); } /** - * Save a new model and return the instance. + * Execute a callback over each item while chunking by ID. * - * @param array $attributes - * @return TModel + * @param callable(TValue, int): mixed $callback + * @param int $count + * @param string|null $column + * @param string|null $alias + * @return bool * @static */ - public static function create($attributes = []) + public static function eachById($callback, $count = 1000, $column = null, $alias = null) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->create($attributes); + return $instance->eachById($callback, $count, $column, $alias); } /** - * Save a new model and return the instance without raising model events. + * Query lazily, by chunks of the given size. * - * @param array $attributes - * @return TModel + * @param int $chunkSize + * @return \Illuminate\Support\LazyCollection + * @throws \InvalidArgumentException * @static */ - public static function createQuietly($attributes = []) + public static function lazy($chunkSize = 1000) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->createQuietly($attributes); + return $instance->lazy($chunkSize); } /** - * Save a new model and return the instance. Allow mass-assignment. + * Query lazily, by chunking the results of a query by comparing IDs. * - * @param array $attributes - * @return TModel + * @param int $chunkSize + * @param string|null $column + * @param string|null $alias + * @return \Illuminate\Support\LazyCollection + * @throws \InvalidArgumentException * @static */ - public static function forceCreate($attributes) + public static function lazyById($chunkSize = 1000, $column = null, $alias = null) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->forceCreate($attributes); + return $instance->lazyById($chunkSize, $column, $alias); } /** - * Save a new model instance with mass assignment without raising model events. + * Query lazily, by chunking the results of a query by comparing IDs in descending order. * - * @param array $attributes - * @return TModel + * @param int $chunkSize + * @param string|null $column + * @param string|null $alias + * @return \Illuminate\Support\LazyCollection + * @throws \InvalidArgumentException * @static */ - public static function forceCreateQuietly($attributes = []) + public static function lazyByIdDesc($chunkSize = 1000, $column = null, $alias = null) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->forceCreateQuietly($attributes); + return $instance->lazyByIdDesc($chunkSize, $column, $alias); } /** - * Insert new records or update the existing ones. + * Execute the query and get the first result. * - * @param array $values - * @param array|string $uniqueBy - * @param array|null $update - * @return int + * @param array|string $columns + * @return TValue|null * @static */ - public static function upsert($values, $uniqueBy, $update = null) + public static function first($columns = []) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->upsert($values, $uniqueBy, $update); + return $instance->first($columns); } /** - * Register a replacement for the default delete function. + * Execute the query and get the first result if it's the sole matching record. * - * @param \Closure $callback - * @return void + * @param array|string $columns + * @return TValue + * @throws \Illuminate\Database\RecordsNotFoundException + * @throws \Illuminate\Database\MultipleRecordsFoundException * @static */ - public static function onDelete($callback) + public static function baseSole($columns = []) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - $instance->onDelete($callback); + return $instance->baseSole($columns); } /** - * Call the given local model scopes. + * Pass the query to a given callback. * - * @param array|string $scopes - * @return static|mixed + * @param callable($this): mixed $callback + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function tap($callback) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->tap($callback); + } + + /** + * Apply the callback if the given "value" is (or resolves to) truthy. + * + * @template TWhenParameter + * @template TWhenReturnType + * @param (\Closure($this): TWhenParameter)|TWhenParameter|null $value + * @param (callable($this, TWhenParameter): TWhenReturnType)|null $callback + * @param (callable($this, TWhenParameter): TWhenReturnType)|null $default + * @return $this|TWhenReturnType * @static */ - public static function scopes($scopes) + public static function when($value = null, $callback = null, $default = null) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->scopes($scopes); + return $instance->when($value, $callback, $default); } /** - * Apply the scopes to the Eloquent builder instance and return it. + * Apply the callback if the given "value" is (or resolves to) falsy. * - * @return static + * @template TUnlessParameter + * @template TUnlessReturnType + * @param (\Closure($this): TUnlessParameter)|TUnlessParameter|null $value + * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $callback + * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $default + * @return $this|TUnlessReturnType * @static */ - public static function applyScopes() + public static function unless($value = null, $callback = null, $default = null) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->applyScopes(); + return $instance->unless($value, $callback, $default); } /** - * Prevent the specified relations from being eager loaded. + * Add a relationship count / exists condition to the query. * - * @param mixed $relations + * @template TRelatedModel of \Illuminate\Database\Eloquent\Model + * @param \Illuminate\Database\Eloquent\Relations\Relation|string $relation + * @param string $operator + * @param int $count + * @param string $boolean + * @param (\Closure(\Illuminate\Database\Eloquent\Builder): mixed)|null $callback * @return \Illuminate\Database\Eloquent\Builder + * @throws \RuntimeException * @static */ - public static function without($relations) + public static function has($relation, $operator = '>=', $count = 1, $boolean = 'and', $callback = null) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->without($relations); + return $instance->has($relation, $operator, $count, $boolean, $callback); } /** - * Set the relationships that should be eager loaded while removing any previously added eager loading specifications. + * Add a relationship count / exists condition to the query with an "or". * - * @param array): mixed)|string>|string $relations + * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation + * @param string $operator + * @param int $count * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function withOnly($relations) + public static function orHas($relation, $operator = '>=', $count = 1) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->withOnly($relations); + return $instance->orHas($relation, $operator, $count); } /** - * Create a new instance of the model being queried. + * Add a relationship count / exists condition to the query. * - * @param array $attributes - * @return TModel + * @template TRelatedModel of \Illuminate\Database\Eloquent\Model + * @param \Illuminate\Database\Eloquent\Relations\Relation|string $relation + * @param string $boolean + * @param (\Closure(\Illuminate\Database\Eloquent\Builder): mixed)|null $callback + * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function newModelInstance($attributes = []) + public static function doesntHave($relation, $boolean = 'and', $callback = null) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->newModelInstance($attributes); + return $instance->doesntHave($relation, $boolean, $callback); } /** - * Specify attributes that should be added to any new models created by this builder. - * - * The given key / value pairs will also be added as where conditions to the query. + * Add a relationship count / exists condition to the query with an "or". * - * @param \Illuminate\Contracts\Database\Query\Expression|array|string $attributes - * @param mixed $value + * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function withAttributes($attributes, $value = null) + public static function orDoesntHave($relation) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->withAttributes($attributes, $value); + return $instance->orDoesntHave($relation); } /** - * Apply query-time casts to the model instance. + * Add a relationship count / exists condition to the query with where clauses. * - * @param array $casts + * @template TRelatedModel of \Illuminate\Database\Eloquent\Model + * @param \Illuminate\Database\Eloquent\Relations\Relation|string $relation + * @param (\Closure(\Illuminate\Database\Eloquent\Builder): mixed)|null $callback + * @param string $operator + * @param int $count * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function withCasts($casts) + public static function whereHas($relation, $callback = null, $operator = '>=', $count = 1) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->withCasts($casts); + return $instance->whereHas($relation, $callback, $operator, $count); } /** - * Execute the given Closure within a transaction savepoint if needed. + * Add a relationship count / exists condition to the query with where clauses. + * + * Also load the relationship with the same condition. * - * @template TModelValue - * @param \Closure(): TModelValue $scope - * @return TModelValue + * @param string $relation + * @param (\Closure(\Illuminate\Database\Eloquent\Builder<*>|\Illuminate\Database\Eloquent\Relations\Relation<*, *, *>): mixed)|null $callback + * @param string $operator + * @param int $count + * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function withSavepointIfNeeded($scope) + public static function withWhereHas($relation, $callback = null, $operator = '>=', $count = 1) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->withSavepointIfNeeded($scope); + return $instance->withWhereHas($relation, $callback, $operator, $count); } /** - * Get the underlying query builder instance. + * Add a relationship count / exists condition to the query with where clauses and an "or". * - * @return \Illuminate\Database\Query\Builder + * @template TRelatedModel of \Illuminate\Database\Eloquent\Model + * @param \Illuminate\Database\Eloquent\Relations\Relation|string $relation + * @param (\Closure(\Illuminate\Database\Eloquent\Builder): mixed)|null $callback + * @param string $operator + * @param int $count + * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function getQuery() + public static function orWhereHas($relation, $callback = null, $operator = '>=', $count = 1) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->getQuery(); + return $instance->orWhereHas($relation, $callback, $operator, $count); } /** - * Set the underlying query builder instance. + * Add a relationship count / exists condition to the query with where clauses. * - * @param \Illuminate\Database\Query\Builder $query + * @template TRelatedModel of \Illuminate\Database\Eloquent\Model + * @param \Illuminate\Database\Eloquent\Relations\Relation|string $relation + * @param (\Closure(\Illuminate\Database\Eloquent\Builder): mixed)|null $callback * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function setQuery($query) + public static function whereDoesntHave($relation, $callback = null) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->setQuery($query); + return $instance->whereDoesntHave($relation, $callback); } /** - * Get a base query builder instance. + * Add a relationship count / exists condition to the query with where clauses and an "or". * - * @return \Illuminate\Database\Query\Builder + * @template TRelatedModel of \Illuminate\Database\Eloquent\Model + * @param \Illuminate\Database\Eloquent\Relations\Relation|string $relation + * @param (\Closure(\Illuminate\Database\Eloquent\Builder): mixed)|null $callback + * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function toBase() + public static function orWhereDoesntHave($relation, $callback = null) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->toBase(); + return $instance->orWhereDoesntHave($relation, $callback); } /** - * Get the relationships being eagerly loaded. + * Add a polymorphic relationship count / exists condition to the query. * - * @return array + * @template TRelatedModel of \Illuminate\Database\Eloquent\Model + * @param \Illuminate\Database\Eloquent\Relations\MorphTo|string $relation + * @param string|array $types + * @param string $operator + * @param int $count + * @param string $boolean + * @param (\Closure(\Illuminate\Database\Eloquent\Builder, string): mixed)|null $callback + * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function getEagerLoads() + public static function hasMorph($relation, $types, $operator = '>=', $count = 1, $boolean = 'and', $callback = null) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->getEagerLoads(); + return $instance->hasMorph($relation, $types, $operator, $count, $boolean, $callback); } /** - * Set the relationships being eagerly loaded. + * Add a polymorphic relationship count / exists condition to the query with an "or". * - * @param array $eagerLoad + * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation + * @param string|array $types + * @param string $operator + * @param int $count * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function setEagerLoads($eagerLoad) + public static function orHasMorph($relation, $types, $operator = '>=', $count = 1) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->setEagerLoads($eagerLoad); + return $instance->orHasMorph($relation, $types, $operator, $count); } /** - * Indicate that the given relationships should not be eagerly loaded. + * Add a polymorphic relationship count / exists condition to the query. * - * @param array $relations + * @template TRelatedModel of \Illuminate\Database\Eloquent\Model + * @param \Illuminate\Database\Eloquent\Relations\MorphTo|string $relation + * @param string|array $types + * @param string $boolean + * @param (\Closure(\Illuminate\Database\Eloquent\Builder, string): mixed)|null $callback * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function withoutEagerLoad($relations) + public static function doesntHaveMorph($relation, $types, $boolean = 'and', $callback = null) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->withoutEagerLoad($relations); + return $instance->doesntHaveMorph($relation, $types, $boolean, $callback); } /** - * Flush the relationships being eagerly loaded. + * Add a polymorphic relationship count / exists condition to the query with an "or". * + * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation + * @param string|array $types * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function withoutEagerLoads() + public static function orDoesntHaveMorph($relation, $types) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->withoutEagerLoads(); + return $instance->orDoesntHaveMorph($relation, $types); } /** - * Get the model instance being queried. + * Add a polymorphic relationship count / exists condition to the query with where clauses. * - * @return TModel + * @template TRelatedModel of \Illuminate\Database\Eloquent\Model + * @param \Illuminate\Database\Eloquent\Relations\MorphTo|string $relation + * @param string|array $types + * @param (\Closure(\Illuminate\Database\Eloquent\Builder, string): mixed)|null $callback + * @param string $operator + * @param int $count + * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function getModel() + public static function whereHasMorph($relation, $types, $callback = null, $operator = '>=', $count = 1) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->getModel(); + return $instance->whereHasMorph($relation, $types, $callback, $operator, $count); } /** - * Set a model instance for the model being queried. + * Add a polymorphic relationship count / exists condition to the query with where clauses and an "or". * - * @template TModelNew of \Illuminate\Database\Eloquent\Model - * @param TModelNew $model - * @return static + * @template TRelatedModel of \Illuminate\Database\Eloquent\Model + * @param \Illuminate\Database\Eloquent\Relations\MorphTo|string $relation + * @param string|array $types + * @param (\Closure(\Illuminate\Database\Eloquent\Builder, string): mixed)|null $callback + * @param string $operator + * @param int $count + * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function setModel($model) + public static function orWhereHasMorph($relation, $types, $callback = null, $operator = '>=', $count = 1) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->setModel($model); + return $instance->orWhereHasMorph($relation, $types, $callback, $operator, $count); } /** - * Get the given macro by name. + * Add a polymorphic relationship count / exists condition to the query with where clauses. * - * @param string $name - * @return \Closure + * @template TRelatedModel of \Illuminate\Database\Eloquent\Model + * @param \Illuminate\Database\Eloquent\Relations\MorphTo|string $relation + * @param string|array $types + * @param (\Closure(\Illuminate\Database\Eloquent\Builder, string): mixed)|null $callback + * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function getMacro($name) + public static function whereDoesntHaveMorph($relation, $types, $callback = null) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->getMacro($name); + return $instance->whereDoesntHaveMorph($relation, $types, $callback); } /** - * Checks if a macro is registered. + * Add a polymorphic relationship count / exists condition to the query with where clauses and an "or". * - * @param string $name - * @return bool + * @template TRelatedModel of \Illuminate\Database\Eloquent\Model + * @param \Illuminate\Database\Eloquent\Relations\MorphTo|string $relation + * @param string|array $types + * @param (\Closure(\Illuminate\Database\Eloquent\Builder, string): mixed)|null $callback + * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function hasMacro($name) + public static function orWhereDoesntHaveMorph($relation, $types, $callback = null) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->hasMacro($name); + return $instance->orWhereDoesntHaveMorph($relation, $types, $callback); } /** - * Get the given global macro by name. + * Add a basic where clause to a relationship query. * - * @param string $name - * @return \Closure + * @template TRelatedModel of \Illuminate\Database\Eloquent\Model + * @param \Illuminate\Database\Eloquent\Relations\Relation|string $relation + * @param (\Closure(\Illuminate\Database\Eloquent\Builder): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column + * @param mixed $operator + * @param mixed $value + * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function getGlobalMacro($name) + public static function whereRelation($relation, $column, $operator = null, $value = null) { - return \Illuminate\Database\Eloquent\Builder::getGlobalMacro($name); + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->whereRelation($relation, $column, $operator, $value); } /** - * Checks if a global macro is registered. + * Add a basic where clause to a relationship query and eager-load the relationship with the same conditions. * - * @param string $name - * @return bool + * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation + * @param \Closure|string|array|\Illuminate\Contracts\Database\Query\Expression $column + * @param mixed $operator + * @param mixed $value + * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function hasGlobalMacro($name) + public static function withWhereRelation($relation, $column, $operator = null, $value = null) { - return \Illuminate\Database\Eloquent\Builder::hasGlobalMacro($name); + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->withWhereRelation($relation, $column, $operator, $value); } /** - * Clone the Eloquent query builder. + * Add an "or where" clause to a relationship query. * - * @return static + * @template TRelatedModel of \Illuminate\Database\Eloquent\Model + * @param \Illuminate\Database\Eloquent\Relations\Relation|string $relation + * @param (\Closure(\Illuminate\Database\Eloquent\Builder): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column + * @param mixed $operator + * @param mixed $value + * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function clone() + public static function orWhereRelation($relation, $column, $operator = null, $value = null) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->clone(); + return $instance->orWhereRelation($relation, $column, $operator, $value); } /** - * Chunk the results of the query. + * Add a basic count / exists condition to a relationship query. * - * @param int $count - * @param callable(\Illuminate\Support\Collection, int): mixed $callback - * @return bool + * @template TRelatedModel of \Illuminate\Database\Eloquent\Model + * @param \Illuminate\Database\Eloquent\Relations\Relation|string $relation + * @param (\Closure(\Illuminate\Database\Eloquent\Builder): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column + * @param mixed $operator + * @param mixed $value + * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function chunk($count, $callback) + public static function whereDoesntHaveRelation($relation, $column, $operator = null, $value = null) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->chunk($count, $callback); + return $instance->whereDoesntHaveRelation($relation, $column, $operator, $value); } /** - * Run a map over each item while chunking. + * Add an "or where" clause to a relationship query. * - * @template TReturn - * @param callable(TValue): TReturn $callback - * @param int $count - * @return \Illuminate\Support\Collection + * @template TRelatedModel of \Illuminate\Database\Eloquent\Model + * @param \Illuminate\Database\Eloquent\Relations\Relation|string $relation + * @param (\Closure(\Illuminate\Database\Eloquent\Builder): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column + * @param mixed $operator + * @param mixed $value + * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function chunkMap($callback, $count = 1000) + public static function orWhereDoesntHaveRelation($relation, $column, $operator = null, $value = null) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->chunkMap($callback, $count); + return $instance->orWhereDoesntHaveRelation($relation, $column, $operator, $value); } /** - * Execute a callback over each item while chunking. + * Add a polymorphic relationship condition to the query with a where clause. * - * @param callable(TValue, int): mixed $callback - * @param int $count - * @return bool - * @throws \RuntimeException + * @template TRelatedModel of \Illuminate\Database\Eloquent\Model + * @param \Illuminate\Database\Eloquent\Relations\MorphTo|string $relation + * @param string|array $types + * @param (\Closure(\Illuminate\Database\Eloquent\Builder): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column + * @param mixed $operator + * @param mixed $value + * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function each($callback, $count = 1000) + public static function whereMorphRelation($relation, $types, $column, $operator = null, $value = null) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->each($callback, $count); + return $instance->whereMorphRelation($relation, $types, $column, $operator, $value); } /** - * Chunk the results of a query by comparing IDs. + * Add a polymorphic relationship condition to the query with an "or where" clause. * - * @param int $count - * @param callable(\Illuminate\Support\Collection, int): mixed $callback - * @param string|null $column - * @param string|null $alias - * @return bool + * @template TRelatedModel of \Illuminate\Database\Eloquent\Model + * @param \Illuminate\Database\Eloquent\Relations\MorphTo|string $relation + * @param string|array $types + * @param (\Closure(\Illuminate\Database\Eloquent\Builder): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column + * @param mixed $operator + * @param mixed $value + * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function chunkById($count, $callback, $column = null, $alias = null) + public static function orWhereMorphRelation($relation, $types, $column, $operator = null, $value = null) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->chunkById($count, $callback, $column, $alias); + return $instance->orWhereMorphRelation($relation, $types, $column, $operator, $value); } /** - * Chunk the results of a query by comparing IDs in descending order. + * Add a polymorphic relationship condition to the query with a doesn't have clause. * - * @param int $count - * @param callable(\Illuminate\Support\Collection, int): mixed $callback - * @param string|null $column - * @param string|null $alias - * @return bool + * @template TRelatedModel of \Illuminate\Database\Eloquent\Model + * @param \Illuminate\Database\Eloquent\Relations\MorphTo|string $relation + * @param string|array $types + * @param (\Closure(\Illuminate\Database\Eloquent\Builder): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column + * @param mixed $operator + * @param mixed $value + * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function chunkByIdDesc($count, $callback, $column = null, $alias = null) + public static function whereMorphDoesntHaveRelation($relation, $types, $column, $operator = null, $value = null) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->chunkByIdDesc($count, $callback, $column, $alias); + return $instance->whereMorphDoesntHaveRelation($relation, $types, $column, $operator, $value); } /** - * Chunk the results of a query by comparing IDs in a given order. + * Add a polymorphic relationship condition to the query with an "or doesn't have" clause. * - * @param int $count - * @param callable(\Illuminate\Support\Collection, int): mixed $callback - * @param string|null $column - * @param string|null $alias - * @param bool $descending - * @return bool - * @throws \RuntimeException + * @template TRelatedModel of \Illuminate\Database\Eloquent\Model + * @param \Illuminate\Database\Eloquent\Relations\MorphTo|string $relation + * @param string|array $types + * @param (\Closure(\Illuminate\Database\Eloquent\Builder): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column + * @param mixed $operator + * @param mixed $value + * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function orderedChunkById($count, $callback, $column = null, $alias = null, $descending = false) + public static function orWhereMorphDoesntHaveRelation($relation, $types, $column, $operator = null, $value = null) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->orderedChunkById($count, $callback, $column, $alias, $descending); + return $instance->orWhereMorphDoesntHaveRelation($relation, $types, $column, $operator, $value); } /** - * Execute a callback over each item while chunking by ID. + * Add a morph-to relationship condition to the query. * - * @param callable(TValue, int): mixed $callback - * @param int $count - * @param string|null $column - * @param string|null $alias - * @return bool + * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation + * @param \Illuminate\Database\Eloquent\Model|iterable|string|null $model + * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function eachById($callback, $count = 1000, $column = null, $alias = null) + public static function whereMorphedTo($relation, $model, $boolean = 'and') { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->eachById($callback, $count, $column, $alias); + return $instance->whereMorphedTo($relation, $model, $boolean); } /** - * Query lazily, by chunks of the given size. + * Add a not morph-to relationship condition to the query. * - * @param int $chunkSize - * @return \Illuminate\Support\LazyCollection - * @throws \InvalidArgumentException + * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation + * @param \Illuminate\Database\Eloquent\Model|iterable|string $model + * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function lazy($chunkSize = 1000) + public static function whereNotMorphedTo($relation, $model, $boolean = 'and') { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->lazy($chunkSize); + return $instance->whereNotMorphedTo($relation, $model, $boolean); } /** - * Query lazily, by chunking the results of a query by comparing IDs. + * Add a morph-to relationship condition to the query with an "or where" clause. * - * @param int $chunkSize - * @param string|null $column - * @param string|null $alias - * @return \Illuminate\Support\LazyCollection - * @throws \InvalidArgumentException + * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation + * @param \Illuminate\Database\Eloquent\Model|iterable|string|null $model + * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function lazyById($chunkSize = 1000, $column = null, $alias = null) + public static function orWhereMorphedTo($relation, $model) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->lazyById($chunkSize, $column, $alias); + return $instance->orWhereMorphedTo($relation, $model); } /** - * Query lazily, by chunking the results of a query by comparing IDs in descending order. + * Add a not morph-to relationship condition to the query with an "or where" clause. * - * @param int $chunkSize - * @param string|null $column - * @param string|null $alias - * @return \Illuminate\Support\LazyCollection - * @throws \InvalidArgumentException + * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation + * @param \Illuminate\Database\Eloquent\Model|iterable|string $model + * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function lazyByIdDesc($chunkSize = 1000, $column = null, $alias = null) + public static function orWhereNotMorphedTo($relation, $model) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->lazyByIdDesc($chunkSize, $column, $alias); + return $instance->orWhereNotMorphedTo($relation, $model); } /** - * Execute the query and get the first result. + * Add a "belongs to" relationship where clause to the query. * - * @param array|string $columns - * @return TValue|null + * @param \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection $related + * @param string|null $relationshipName + * @param string $boolean + * @return \Illuminate\Database\Eloquent\Builder + * @throws \Illuminate\Database\Eloquent\RelationNotFoundException * @static */ - public static function first($columns = []) + public static function whereBelongsTo($related, $relationshipName = null, $boolean = 'and') { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->first($columns); + return $instance->whereBelongsTo($related, $relationshipName, $boolean); } /** - * Execute the query and get the first result if it's the sole matching record. + * Add a "BelongsTo" relationship with an "or where" clause to the query. * - * @param array|string $columns - * @return TValue - * @throws \Illuminate\Database\RecordsNotFoundException - * @throws \Illuminate\Database\MultipleRecordsFoundException + * @param \Illuminate\Database\Eloquent\Model $related + * @param string|null $relationshipName + * @return \Illuminate\Database\Eloquent\Builder + * @throws \RuntimeException * @static */ - public static function baseSole($columns = []) + public static function orWhereBelongsTo($related, $relationshipName = null) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->baseSole($columns); + return $instance->orWhereBelongsTo($related, $relationshipName); } /** - * Pass the query to a given callback. + * Add subselect queries to include an aggregate value for a relationship. * - * @param callable($this): mixed $callback + * @param mixed $relations + * @param \Illuminate\Contracts\Database\Query\Expression|string $column + * @param string $function * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function tap($callback) + public static function withAggregate($relations, $column, $function = null) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->tap($callback); + return $instance->withAggregate($relations, $column, $function); } /** - * Apply the callback if the given "value" is (or resolves to) truthy. + * Add subselect queries to count the relations. * - * @template TWhenParameter - * @template TWhenReturnType - * @param (\Closure($this): TWhenParameter)|TWhenParameter|null $value - * @param (callable($this, TWhenParameter): TWhenReturnType)|null $callback - * @param (callable($this, TWhenParameter): TWhenReturnType)|null $default - * @return $this|TWhenReturnType + * @param mixed $relations + * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function when($value = null, $callback = null, $default = null) + public static function withCount($relations) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->when($value, $callback, $default); + return $instance->withCount($relations); } /** - * Apply the callback if the given "value" is (or resolves to) falsy. + * Add subselect queries to include the max of the relation's column. * - * @template TUnlessParameter - * @template TUnlessReturnType - * @param (\Closure($this): TUnlessParameter)|TUnlessParameter|null $value - * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $callback - * @param (callable($this, TUnlessParameter): TUnlessReturnType)|null $default - * @return $this|TUnlessReturnType + * @param string|array $relation + * @param \Illuminate\Contracts\Database\Query\Expression|string $column + * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function unless($value = null, $callback = null, $default = null) + public static function withMax($relation, $column) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->unless($value, $callback, $default); + return $instance->withMax($relation, $column); } /** - * Add a relationship count / exists condition to the query. + * Add subselect queries to include the min of the relation's column. * - * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation - * @param string $operator - * @param int $count - * @param string $boolean - * @param \Closure|null $callback + * @param string|array $relation + * @param \Illuminate\Contracts\Database\Query\Expression|string $column * @return \Illuminate\Database\Eloquent\Builder - * @throws \RuntimeException * @static */ - public static function has($relation, $operator = '>=', $count = 1, $boolean = 'and', $callback = null) + public static function withMin($relation, $column) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->has($relation, $operator, $count, $boolean, $callback); + return $instance->withMin($relation, $column); } /** - * Add a relationship count / exists condition to the query with an "or". + * Add subselect queries to include the sum of the relation's column. * - * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation - * @param string $operator - * @param int $count + * @param string|array $relation + * @param \Illuminate\Contracts\Database\Query\Expression|string $column * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function orHas($relation, $operator = '>=', $count = 1) + public static function withSum($relation, $column) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->orHas($relation, $operator, $count); + return $instance->withSum($relation, $column); } /** - * Add a relationship count / exists condition to the query. + * Add subselect queries to include the average of the relation's column. * - * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation - * @param string $boolean - * @param \Closure|null $callback + * @param string|array $relation + * @param \Illuminate\Contracts\Database\Query\Expression|string $column * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function doesntHave($relation, $boolean = 'and', $callback = null) + public static function withAvg($relation, $column) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->doesntHave($relation, $boolean, $callback); + return $instance->withAvg($relation, $column); } /** - * Add a relationship count / exists condition to the query with an "or". + * Add subselect queries to include the existence of related models. * - * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation + * @param string|array $relation * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function orDoesntHave($relation) + public static function withExists($relation) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->orDoesntHave($relation); + return $instance->withExists($relation); } /** - * Add a relationship count / exists condition to the query with where clauses. + * Merge the where constraints from another query to the current query. * - * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation - * @param \Closure|null $callback - * @param string $operator - * @param int $count + * @param \Illuminate\Database\Eloquent\Builder<*> $from * @return \Illuminate\Database\Eloquent\Builder * @static */ - public static function whereHas($relation, $callback = null, $operator = '>=', $count = 1) + public static function mergeConstraintsFrom($from) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->whereHas($relation, $callback, $operator, $count); + return $instance->mergeConstraintsFrom($from); } /** - * Add a relationship count / exists condition to the query with where clauses. * - * Also load the relationship with same condition. * - * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation - * @param \Closure|null $callback - * @param string $operator - * @param int $count - * @return \Illuminate\Database\Eloquent\Builder + * @see \Kirschbaum\PowerJoins\Mixins\JoinRelationship::powerJoin() + * @param mixed $table + * @param mixed $first + * @param mixed $operator + * @param mixed $second + * @param mixed $type + * @param mixed $where + * @return static * @static */ - public static function withWhereHas($relation, $callback = null, $operator = '>=', $count = 1) + public static function powerJoin($table, $first, $operator = null, $second = null, $type = 'inner', $where = false) { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->withWhereHas($relation, $callback, $operator, $count); + return \Illuminate\Database\Eloquent\Builder::powerJoin($table, $first, $operator, $second, $type, $where); } /** - * Add a relationship count / exists condition to the query with where clauses and an "or". + * * - * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation - * @param \Closure|null $callback - * @param string $operator - * @param int $count - * @return \Illuminate\Database\Eloquent\Builder + * @see \Kirschbaum\PowerJoins\Mixins\JoinRelationship::leftPowerJoin() + * @param mixed $table + * @param mixed $first + * @param mixed $operator + * @param mixed $second * @static */ - public static function orWhereHas($relation, $callback = null, $operator = '>=', $count = 1) + public static function leftPowerJoin($table, $first, $operator = null, $second = null) { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->orWhereHas($relation, $callback, $operator, $count); + return \Illuminate\Database\Eloquent\Builder::leftPowerJoin($table, $first, $operator, $second); } /** - * Add a relationship count / exists condition to the query with where clauses. + * * - * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation - * @param \Closure|null $callback - * @return \Illuminate\Database\Eloquent\Builder + * @see \Kirschbaum\PowerJoins\Mixins\JoinRelationship::rightPowerJoin() + * @param mixed $table + * @param mixed $first + * @param mixed $operator + * @param mixed $second * @static */ - public static function whereDoesntHave($relation, $callback = null) + public static function rightPowerJoin($table, $first, $operator = null, $second = null) { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->whereDoesntHave($relation, $callback); + return \Illuminate\Database\Eloquent\Builder::rightPowerJoin($table, $first, $operator, $second); } /** - * Add a relationship count / exists condition to the query with where clauses and an "or". + * * - * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation - * @param \Closure|null $callback - * @return \Illuminate\Database\Eloquent\Builder + * @see \Kirschbaum\PowerJoins\Mixins\JoinRelationship::newPowerJoinClause() + * @param \Illuminate\Database\Query\Builder $parentQuery + * @param string $type + * @param string $table + * @param \Illuminate\Database\Eloquent\Model|null $model * @static */ - public static function orWhereDoesntHave($relation, $callback = null) + public static function newPowerJoinClause($parentQuery, $type, $table, $model = null) { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->orWhereDoesntHave($relation, $callback); + return \Illuminate\Database\Eloquent\Builder::newPowerJoinClause($parentQuery, $type, $table, $model); } /** - * Add a polymorphic relationship count / exists condition to the query. + * * - * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation - * @param string|array $types - * @param string $operator - * @param int $count - * @param string $boolean - * @param \Closure|null $callback - * @return \Illuminate\Database\Eloquent\Builder + * @see \Kirschbaum\PowerJoins\Mixins\JoinRelationship::joinRelationship() + * @param string $relationName + * @param \Closure|array|string|null $callback + * @param string $joinType + * @param bool $useAlias + * @param bool $disableExtraConditions + * @param string|null $morphable * @static */ - public static function hasMorph($relation, $types, $operator = '>=', $count = 1, $boolean = 'and', $callback = null) + public static function joinRelationship($relationName, $callback = null, $joinType = 'join', $useAlias = false, $disableExtraConditions = false, $morphable = null) { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->hasMorph($relation, $types, $operator, $count, $boolean, $callback); + return \Illuminate\Database\Eloquent\Builder::joinRelationship($relationName, $callback, $joinType, $useAlias, $disableExtraConditions, $morphable); } /** - * Add a polymorphic relationship count / exists condition to the query with an "or". + * * - * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation - * @param string|array $types - * @param string $operator - * @param int $count - * @return \Illuminate\Database\Eloquent\Builder + * @see \Kirschbaum\PowerJoins\Mixins\JoinRelationship::joinRelationshipUsingAlias() + * @param string $relationName + * @param \Closure|array|string|null $callback + * @param bool $disableExtraConditions + * @param string|null $morphable * @static */ - public static function orHasMorph($relation, $types, $operator = '>=', $count = 1) + public static function joinRelationshipUsingAlias($relationName, $callback = null, $disableExtraConditions = false, $morphable = null) { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->orHasMorph($relation, $types, $operator, $count); + return \Illuminate\Database\Eloquent\Builder::joinRelationshipUsingAlias($relationName, $callback, $disableExtraConditions, $morphable); } /** - * Add a polymorphic relationship count / exists condition to the query. + * * - * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation - * @param string|array $types - * @param string $boolean - * @param \Closure|null $callback - * @return \Illuminate\Database\Eloquent\Builder + * @see \Kirschbaum\PowerJoins\Mixins\JoinRelationship::leftJoinRelationshipUsingAlias() + * @param string $relationName + * @param \Closure|array|string|null $callback + * @param bool $disableExtraConditions + * @param string|null $morphable * @static */ - public static function doesntHaveMorph($relation, $types, $boolean = 'and', $callback = null) + public static function leftJoinRelationshipUsingAlias($relationName, $callback = null, $disableExtraConditions = false, $morphable = null) { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->doesntHaveMorph($relation, $types, $boolean, $callback); + return \Illuminate\Database\Eloquent\Builder::leftJoinRelationshipUsingAlias($relationName, $callback, $disableExtraConditions, $morphable); } /** - * Add a polymorphic relationship count / exists condition to the query with an "or". + * * - * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation - * @param string|array $types - * @return \Illuminate\Database\Eloquent\Builder + * @see \Kirschbaum\PowerJoins\Mixins\JoinRelationship::rightJoinRelationshipUsingAlias() + * @param string $relationName + * @param \Closure|array|string|null $callback + * @param bool $disableExtraConditions + * @param string|null $morphable * @static */ - public static function orDoesntHaveMorph($relation, $types) + public static function rightJoinRelationshipUsingAlias($relationName, $callback = null, $disableExtraConditions = false, $morphable = null) { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->orDoesntHaveMorph($relation, $types); + return \Illuminate\Database\Eloquent\Builder::rightJoinRelationshipUsingAlias($relationName, $callback, $disableExtraConditions, $morphable); } /** - * Add a polymorphic relationship count / exists condition to the query with where clauses. + * * - * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation - * @param string|array $types - * @param \Closure|null $callback - * @param string $operator - * @param int $count - * @return \Illuminate\Database\Eloquent\Builder + * @see \Kirschbaum\PowerJoins\Mixins\JoinRelationship::joinRelation() + * @param string $relationName + * @param \Closure|array|string|null $callback + * @param string $joinType + * @param bool $useAlias + * @param bool $disableExtraConditions + * @param string|null $morphable * @static */ - public static function whereHasMorph($relation, $types, $callback = null, $operator = '>=', $count = 1) + public static function joinRelation($relationName, $callback = null, $joinType = 'join', $useAlias = false, $disableExtraConditions = false, $morphable = null) { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->whereHasMorph($relation, $types, $callback, $operator, $count); + return \Illuminate\Database\Eloquent\Builder::joinRelation($relationName, $callback, $joinType, $useAlias, $disableExtraConditions, $morphable); } /** - * Add a polymorphic relationship count / exists condition to the query with where clauses and an "or". + * * - * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation - * @param string|array $types - * @param \Closure|null $callback - * @param string $operator - * @param int $count - * @return \Illuminate\Database\Eloquent\Builder + * @see \Kirschbaum\PowerJoins\Mixins\JoinRelationship::leftJoinRelationship() + * @param string $relationName + * @param \Closure|array|string|null $callback + * @param bool $useAlias + * @param bool $disableExtraConditions + * @param string|null $morphable * @static */ - public static function orWhereHasMorph($relation, $types, $callback = null, $operator = '>=', $count = 1) + public static function leftJoinRelationship($relationName, $callback = null, $useAlias = false, $disableExtraConditions = false, $morphable = null) { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->orWhereHasMorph($relation, $types, $callback, $operator, $count); + return \Illuminate\Database\Eloquent\Builder::leftJoinRelationship($relationName, $callback, $useAlias, $disableExtraConditions, $morphable); } /** - * Add a polymorphic relationship count / exists condition to the query with where clauses. + * * - * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation - * @param string|array $types - * @param \Closure|null $callback - * @return \Illuminate\Database\Eloquent\Builder + * @see \Kirschbaum\PowerJoins\Mixins\JoinRelationship::leftJoinRelation() + * @param string $relation + * @param \Closure|array|string|null $callback + * @param bool $useAlias + * @param bool $disableExtraConditions + * @param string|null $morphable * @static */ - public static function whereDoesntHaveMorph($relation, $types, $callback = null) + public static function leftJoinRelation($relation, $callback = null, $useAlias = false, $disableExtraConditions = false, $morphable = null) { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->whereDoesntHaveMorph($relation, $types, $callback); + return \Illuminate\Database\Eloquent\Builder::leftJoinRelation($relation, $callback, $useAlias, $disableExtraConditions, $morphable); } /** - * Add a polymorphic relationship count / exists condition to the query with where clauses and an "or". + * * - * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation - * @param string|array $types - * @param \Closure|null $callback - * @return \Illuminate\Database\Eloquent\Builder + * @see \Kirschbaum\PowerJoins\Mixins\JoinRelationship::rightJoinRelationship() + * @param string $relation + * @param \Closure|array|string|null $callback + * @param bool $useAlias + * @param bool $disableExtraConditions + * @param string|null $morphable * @static */ - public static function orWhereDoesntHaveMorph($relation, $types, $callback = null) + public static function rightJoinRelationship($relation, $callback = null, $useAlias = false, $disableExtraConditions = false, $morphable = null) { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->orWhereDoesntHaveMorph($relation, $types, $callback); + return \Illuminate\Database\Eloquent\Builder::rightJoinRelationship($relation, $callback, $useAlias, $disableExtraConditions, $morphable); } /** - * Add a basic where clause to a relationship query. + * * - * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation - * @param \Closure|string|array|\Illuminate\Contracts\Database\Query\Expression $column - * @param mixed $operator - * @param mixed $value - * @return \Illuminate\Database\Eloquent\Builder + * @see \Kirschbaum\PowerJoins\Mixins\JoinRelationship::rightJoinRelation() + * @param string $relation + * @param \Closure|array|string|null $callback + * @param bool $useAlias + * @param bool $disableExtraConditions + * @param string|null $morphable * @static */ - public static function whereRelation($relation, $column, $operator = null, $value = null) + public static function rightJoinRelation($relation, $callback = null, $useAlias = false, $disableExtraConditions = false, $morphable = null) { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->whereRelation($relation, $column, $operator, $value); + return \Illuminate\Database\Eloquent\Builder::rightJoinRelation($relation, $callback, $useAlias, $disableExtraConditions, $morphable); } /** - * Add an "or where" clause to a relationship query. + * * - * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation - * @param \Closure|string|array|\Illuminate\Contracts\Database\Query\Expression $column - * @param mixed $operator - * @param mixed $value - * @return \Illuminate\Database\Eloquent\Builder + * @see \Kirschbaum\PowerJoins\Mixins\JoinRelationship::joinNestedRelationship() + * @param string $relationships + * @param \Closure|array|string|null $callback + * @param string $joinType + * @param bool $useAlias + * @param bool $disableExtraConditions + * @param string|null $morphable * @static */ - public static function orWhereRelation($relation, $column, $operator = null, $value = null) + public static function joinNestedRelationship($relationships, $callback = null, $joinType = 'join', $useAlias = false, $disableExtraConditions = false, $morphable = null) { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->orWhereRelation($relation, $column, $operator, $value); + return \Illuminate\Database\Eloquent\Builder::joinNestedRelationship($relationships, $callback, $joinType, $useAlias, $disableExtraConditions, $morphable); } /** - * Add a basic count / exists condition to a relationship query. + * * - * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation - * @param \Closure|string|array|\Illuminate\Contracts\Database\Query\Expression $column - * @param mixed $operator - * @param mixed $value - * @return \Illuminate\Database\Eloquent\Builder + * @see \Kirschbaum\PowerJoins\Mixins\JoinRelationship::orderByPowerJoins() + * @param array|string $sort + * @param string $direction + * @param string|null $aggregation + * @param string $joinType + * @param mixed $aliases * @static */ - public static function whereDoesntHaveRelation($relation, $column, $operator = null, $value = null) + public static function orderByPowerJoins($sort, $direction = 'asc', $aggregation = null, $joinType = 'join', $aliases = null) { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->whereDoesntHaveRelation($relation, $column, $operator, $value); + return \Illuminate\Database\Eloquent\Builder::orderByPowerJoins($sort, $direction, $aggregation, $joinType, $aliases); } /** - * Add an "or where" clause to a relationship query. + * * - * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation - * @param \Closure|string|array|\Illuminate\Contracts\Database\Query\Expression $column - * @param mixed $operator - * @param mixed $value - * @return \Illuminate\Database\Eloquent\Builder + * @see \Kirschbaum\PowerJoins\Mixins\JoinRelationship::orderByLeftPowerJoins() + * @param array|string $sort + * @param string $direction * @static */ - public static function orWhereDoesntHaveRelation($relation, $column, $operator = null, $value = null) + public static function orderByLeftPowerJoins($sort, $direction = 'asc') { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->orWhereDoesntHaveRelation($relation, $column, $operator, $value); + return \Illuminate\Database\Eloquent\Builder::orderByLeftPowerJoins($sort, $direction); } /** - * Add a polymorphic relationship condition to the query with a where clause. + * * - * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation - * @param string|array $types - * @param \Closure|string|array|\Illuminate\Contracts\Database\Query\Expression $column - * @param mixed $operator - * @param mixed $value - * @return \Illuminate\Database\Eloquent\Builder + * @see \Kirschbaum\PowerJoins\Mixins\JoinRelationship::orderByPowerJoinsCount() + * @param array|string $sort + * @param string $direction * @static */ - public static function whereMorphRelation($relation, $types, $column, $operator = null, $value = null) + public static function orderByPowerJoinsCount($sort, $direction = 'asc') { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->whereMorphRelation($relation, $types, $column, $operator, $value); + return \Illuminate\Database\Eloquent\Builder::orderByPowerJoinsCount($sort, $direction); } /** - * Add a polymorphic relationship condition to the query with an "or where" clause. + * * - * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation - * @param string|array $types - * @param \Closure|string|array|\Illuminate\Contracts\Database\Query\Expression $column - * @param mixed $operator - * @param mixed $value - * @return \Illuminate\Database\Eloquent\Builder + * @see \Kirschbaum\PowerJoins\Mixins\JoinRelationship::orderByLeftPowerJoinsCount() + * @param array|string $sort + * @param string $direction * @static */ - public static function orWhereMorphRelation($relation, $types, $column, $operator = null, $value = null) + public static function orderByLeftPowerJoinsCount($sort, $direction = 'asc') { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->orWhereMorphRelation($relation, $types, $column, $operator, $value); + return \Illuminate\Database\Eloquent\Builder::orderByLeftPowerJoinsCount($sort, $direction); } /** - * Add a polymorphic relationship condition to the query with a doesn't have clause. + * * - * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation - * @param string|array $types - * @param \Closure|string|array|\Illuminate\Contracts\Database\Query\Expression $column - * @param mixed $operator - * @param mixed $value - * @return \Illuminate\Database\Eloquent\Builder + * @see \Kirschbaum\PowerJoins\Mixins\JoinRelationship::orderByPowerJoinsSum() + * @param array|string $sort + * @param string $direction * @static */ - public static function whereMorphDoesntHaveRelation($relation, $types, $column, $operator = null, $value = null) + public static function orderByPowerJoinsSum($sort, $direction = 'asc') { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->whereMorphDoesntHaveRelation($relation, $types, $column, $operator, $value); + return \Illuminate\Database\Eloquent\Builder::orderByPowerJoinsSum($sort, $direction); } /** - * Add a polymorphic relationship condition to the query with an "or doesn't have" clause. + * * - * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation - * @param string|array $types - * @param \Closure|string|array|\Illuminate\Contracts\Database\Query\Expression $column - * @param mixed $operator - * @param mixed $value - * @return \Illuminate\Database\Eloquent\Builder + * @see \Kirschbaum\PowerJoins\Mixins\JoinRelationship::orderByLeftPowerJoinsSum() + * @param array|string $sort + * @param string $direction * @static */ - public static function orWhereMorphDoesntHaveRelation($relation, $types, $column, $operator = null, $value = null) + public static function orderByLeftPowerJoinsSum($sort, $direction = 'asc') { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->orWhereMorphDoesntHaveRelation($relation, $types, $column, $operator, $value); + return \Illuminate\Database\Eloquent\Builder::orderByLeftPowerJoinsSum($sort, $direction); } /** - * Add a morph-to relationship condition to the query. + * * - * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation - * @param \Illuminate\Database\Eloquent\Model|iterable|string|null $model - * @return \Illuminate\Database\Eloquent\Builder + * @see \Kirschbaum\PowerJoins\Mixins\JoinRelationship::orderByPowerJoinsAvg() + * @param array|string $sort + * @param string $direction * @static */ - public static function whereMorphedTo($relation, $model, $boolean = 'and') + public static function orderByPowerJoinsAvg($sort, $direction = 'asc') { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->whereMorphedTo($relation, $model, $boolean); + return \Illuminate\Database\Eloquent\Builder::orderByPowerJoinsAvg($sort, $direction); } /** - * Add a not morph-to relationship condition to the query. + * * - * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation - * @param \Illuminate\Database\Eloquent\Model|iterable|string $model - * @return \Illuminate\Database\Eloquent\Builder + * @see \Kirschbaum\PowerJoins\Mixins\JoinRelationship::orderByLeftPowerJoinsAvg() + * @param array|string $sort + * @param string $direction * @static */ - public static function whereNotMorphedTo($relation, $model, $boolean = 'and') + public static function orderByLeftPowerJoinsAvg($sort, $direction = 'asc') { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->whereNotMorphedTo($relation, $model, $boolean); + return \Illuminate\Database\Eloquent\Builder::orderByLeftPowerJoinsAvg($sort, $direction); } /** - * Add a morph-to relationship condition to the query with an "or where" clause. + * * - * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation - * @param \Illuminate\Database\Eloquent\Model|iterable|string|null $model - * @return \Illuminate\Database\Eloquent\Builder + * @see \Kirschbaum\PowerJoins\Mixins\JoinRelationship::orderByPowerJoinsMin() + * @param array|string $sort + * @param string $direction * @static */ - public static function orWhereMorphedTo($relation, $model) + public static function orderByPowerJoinsMin($sort, $direction = 'asc') { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->orWhereMorphedTo($relation, $model); + return \Illuminate\Database\Eloquent\Builder::orderByPowerJoinsMin($sort, $direction); } /** - * Add a not morph-to relationship condition to the query with an "or where" clause. + * * - * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation - * @param \Illuminate\Database\Eloquent\Model|iterable|string $model - * @return \Illuminate\Database\Eloquent\Builder + * @see \Kirschbaum\PowerJoins\Mixins\JoinRelationship::orderByLeftPowerJoinsMin() + * @param array|string $sort + * @param string $direction * @static */ - public static function orWhereNotMorphedTo($relation, $model) + public static function orderByLeftPowerJoinsMin($sort, $direction = 'asc') { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->orWhereNotMorphedTo($relation, $model); + return \Illuminate\Database\Eloquent\Builder::orderByLeftPowerJoinsMin($sort, $direction); } /** - * Add a "belongs to" relationship where clause to the query. + * * - * @param \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection $related - * @param string|null $relationshipName - * @param string $boolean - * @return \Illuminate\Database\Eloquent\Builder - * @throws \Illuminate\Database\Eloquent\RelationNotFoundException + * @see \Kirschbaum\PowerJoins\Mixins\JoinRelationship::orderByPowerJoinsMax() + * @param array|string $sort + * @param string $direction * @static */ - public static function whereBelongsTo($related, $relationshipName = null, $boolean = 'and') + public static function orderByPowerJoinsMax($sort, $direction = 'asc') { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->whereBelongsTo($related, $relationshipName, $boolean); + return \Illuminate\Database\Eloquent\Builder::orderByPowerJoinsMax($sort, $direction); } /** - * Add a "BelongsTo" relationship with an "or where" clause to the query. + * * - * @param \Illuminate\Database\Eloquent\Model $related - * @param string|null $relationshipName - * @return \Illuminate\Database\Eloquent\Builder - * @throws \RuntimeException + * @see \Kirschbaum\PowerJoins\Mixins\JoinRelationship::orderByLeftPowerJoinsMax() + * @param array|string $sort + * @param string $direction * @static */ - public static function orWhereBelongsTo($related, $relationshipName = null) + public static function orderByLeftPowerJoinsMax($sort, $direction = 'asc') { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->orWhereBelongsTo($related, $relationshipName); + return \Illuminate\Database\Eloquent\Builder::orderByLeftPowerJoinsMax($sort, $direction); } /** - * Add subselect queries to include an aggregate value for a relationship. + * * - * @param mixed $relations - * @param \Illuminate\Contracts\Database\Query\Expression|string $column - * @param string $function - * @return \Illuminate\Database\Eloquent\Builder + * @see \Kirschbaum\PowerJoins\Mixins\JoinRelationship::powerJoinHas() + * @param string $relation + * @param string $operator + * @param int $count + * @param mixed $boolean + * @param \Closure|array|string|null $callback + * @param string|null $morphable + * @return static * @static */ - public static function withAggregate($relations, $column, $function = null) + public static function powerJoinHas($relation, $operator = '>=', $count = 1, $boolean = 'and', $callback = null, $morphable = null) { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->withAggregate($relations, $column, $function); + return \Illuminate\Database\Eloquent\Builder::powerJoinHas($relation, $operator, $count, $boolean, $callback, $morphable); } /** - * Add subselect queries to count the relations. + * * - * @param mixed $relations - * @return \Illuminate\Database\Eloquent\Builder + * @see \Kirschbaum\PowerJoins\Mixins\JoinRelationship::hasNestedUsingJoins() + * @param string $relations + * @param string $operator + * @param int $count + * @param string $boolean + * @param \Closure|array|string|null $callback + * @return static * @static */ - public static function withCount($relations) + public static function hasNestedUsingJoins($relations, $operator = '>=', $count = 1, $boolean = 'and', $callback = null) { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->withCount($relations); + return \Illuminate\Database\Eloquent\Builder::hasNestedUsingJoins($relations, $operator, $count, $boolean, $callback); } /** - * Add subselect queries to include the max of the relation's column. + * * - * @param string|array $relation - * @param \Illuminate\Contracts\Database\Query\Expression|string $column - * @return \Illuminate\Database\Eloquent\Builder + * @see \Kirschbaum\PowerJoins\Mixins\JoinRelationship::powerJoinDoesntHave() + * @param mixed $relation + * @param mixed $boolean + * @param \Closure|null $callback * @static */ - public static function withMax($relation, $column) + public static function powerJoinDoesntHave($relation, $boolean = 'and', $callback = null) { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->withMax($relation, $column); + return \Illuminate\Database\Eloquent\Builder::powerJoinDoesntHave($relation, $boolean, $callback); } /** - * Add subselect queries to include the min of the relation's column. - * - * @param string|array $relation - * @param \Illuminate\Contracts\Database\Query\Expression|string $column - * @return \Illuminate\Database\Eloquent\Builder + * + * + * @see \Kirschbaum\PowerJoins\Mixins\JoinRelationship::powerJoinWhereHas() + * @param mixed $relation + * @param mixed $callback + * @param mixed $operator + * @param mixed $count * @static */ - public static function withMin($relation, $column) + public static function powerJoinWhereHas($relation, $callback = null, $operator = '>=', $count = 1) { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->withMin($relation, $column); + return \Illuminate\Database\Eloquent\Builder::powerJoinWhereHas($relation, $callback, $operator, $count); } /** - * Add subselect queries to include the sum of the relation's column. + * * - * @param string|array $relation - * @param \Illuminate\Contracts\Database\Query\Expression|string $column - * @return \Illuminate\Database\Eloquent\Builder + * @see \Kirschbaum\PowerJoins\Mixins\QueryRelationshipExistence::getGroupBy() * @static */ - public static function withSum($relation, $column) + public static function getGroupBy() { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->withSum($relation, $column); + return \Illuminate\Database\Eloquent\Builder::getGroupBy(); } /** - * Add subselect queries to include the average of the relation's column. + * * - * @param string|array $relation - * @param \Illuminate\Contracts\Database\Query\Expression|string $column - * @return \Illuminate\Database\Eloquent\Builder + * @see \Kirschbaum\PowerJoins\Mixins\QueryRelationshipExistence::getScopes() * @static */ - public static function withAvg($relation, $column) + public static function getScopes() { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->withAvg($relation, $column); + return \Illuminate\Database\Eloquent\Builder::getScopes(); } /** - * Add subselect queries to include the existence of related models. + * * - * @param string|array $relation - * @return \Illuminate\Database\Eloquent\Builder + * @see \Kirschbaum\PowerJoins\Mixins\QueryRelationshipExistence::getSelect() * @static */ - public static function withExists($relation) + public static function getSelect() { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->withExists($relation); + return \Illuminate\Database\Eloquent\Builder::getSelect(); } /** - * Merge the where constraints from another query to the current query. + * * - * @param \Illuminate\Database\Eloquent\Builder<*> $from - * @return \Illuminate\Database\Eloquent\Builder + * @see \Kirschbaum\PowerJoins\Mixins\QueryRelationshipExistence::getRelationWithoutConstraintsProxy() + * @param mixed $relation * @static */ - public static function mergeConstraintsFrom($from) + public static function getRelationWithoutConstraintsProxy($relation) { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->mergeConstraintsFrom($from); + return \Illuminate\Database\Eloquent\Builder::getRelationWithoutConstraintsProxy($relation); } /** @@ -25183,7 +29727,6 @@ public static function selectSub($query, $as) * Add a new "raw" select expression to the query. * * @param string $expression - * @param array $bindings * @return \Illuminate\Database\Eloquent\Builder * @static */ @@ -25359,8 +29902,6 @@ public static function joinSub($query, $as, $first, $operator = null, $second = * Add a lateral join clause to the query. * * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query - * @param string $as - * @param string $type * @return \Illuminate\Database\Eloquent\Builder * @static */ @@ -25374,7 +29915,6 @@ public static function joinLateral($query, $as, $type = 'inner') * Add a lateral left join to the query. * * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query - * @param string $as * @return \Illuminate\Database\Eloquent\Builder * @static */ @@ -25829,7 +30369,6 @@ public static function whereNotNull($columns, $boolean = 'and') * Add a where between statement to the query. * * @param \Illuminate\Contracts\Database\Query\Expression|string $column - * @param iterable $values * @param string $boolean * @param bool $not * @return \Illuminate\Database\Eloquent\Builder @@ -25845,7 +30384,6 @@ public static function whereBetween($column, $values, $boolean = 'and', $not = f * Add a where between statement using columns to the query. * * @param \Illuminate\Contracts\Database\Query\Expression|string $column - * @param array $values * @param string $boolean * @param bool $not * @return \Illuminate\Database\Eloquent\Builder @@ -25861,7 +30399,6 @@ public static function whereBetweenColumns($column, $values, $boolean = 'and', $ * Add an or where between statement to the query. * * @param \Illuminate\Contracts\Database\Query\Expression|string $column - * @param iterable $values * @return \Illuminate\Database\Eloquent\Builder * @static */ @@ -25875,7 +30412,6 @@ public static function orWhereBetween($column, $values) * Add an or where between statement using columns to the query. * * @param \Illuminate\Contracts\Database\Query\Expression|string $column - * @param array $values * @return \Illuminate\Database\Eloquent\Builder * @static */ @@ -25889,7 +30425,6 @@ public static function orWhereBetweenColumns($column, $values) * Add a where not between statement to the query. * * @param \Illuminate\Contracts\Database\Query\Expression|string $column - * @param iterable $values * @param string $boolean * @return \Illuminate\Database\Eloquent\Builder * @static @@ -25904,7 +30439,6 @@ public static function whereNotBetween($column, $values, $boolean = 'and') * Add a where not between statement using columns to the query. * * @param \Illuminate\Contracts\Database\Query\Expression|string $column - * @param array $values * @param string $boolean * @return \Illuminate\Database\Eloquent\Builder * @static @@ -25919,7 +30453,6 @@ public static function whereNotBetweenColumns($column, $values, $boolean = 'and' * Add an or where not between statement to the query. * * @param \Illuminate\Contracts\Database\Query\Expression|string $column - * @param iterable $values * @return \Illuminate\Database\Eloquent\Builder * @static */ @@ -25933,7 +30466,6 @@ public static function orWhereNotBetween($column, $values) * Add an or where not between statement using columns to the query. * * @param \Illuminate\Contracts\Database\Query\Expression|string $column - * @param array $values * @return \Illuminate\Database\Eloquent\Builder * @static */ @@ -26114,7 +30646,6 @@ public static function orWhereYear($column, $operator, $value = null) /** * Add a nested where statement to the query. * - * @param \Closure $callback * @param string $boolean * @return \Illuminate\Database\Eloquent\Builder * @static @@ -26210,7 +30741,6 @@ public static function orWhereNotExists($callback) /** * Add an exists clause to the query. * - * @param \Illuminate\Database\Query\Builder $query * @param string $boolean * @param bool $not * @return \Illuminate\Database\Eloquent\Builder @@ -26611,7 +31141,6 @@ public static function groupBy(...$groups) * Add a raw groupBy clause to the query. * * @param string $sql - * @param array $bindings * @return \Illuminate\Database\Eloquent\Builder * @static */ @@ -26655,7 +31184,6 @@ public static function orHaving($column, $operator = null, $value = null) /** * Add a nested having statement to the query. * - * @param \Closure $callback * @param string $boolean * @return \Illuminate\Database\Eloquent\Builder * @static @@ -26683,7 +31211,7 @@ public static function addNestedHavingQuery($query, $boolean = 'and') /** * Add a "having null" clause to the query. * - * @param string|array $columns + * @param array|string $columns * @param string $boolean * @param bool $not * @return \Illuminate\Database\Eloquent\Builder @@ -26711,7 +31239,7 @@ public static function orHavingNull($column) /** * Add a "having not null" clause to the query. * - * @param string|array $columns + * @param array|string $columns * @param string $boolean * @return \Illuminate\Database\Eloquent\Builder * @static @@ -26739,7 +31267,6 @@ public static function orHavingNotNull($column) * Add a "having between " clause to the query. * * @param string $column - * @param iterable $values * @param string $boolean * @param bool $not * @return \Illuminate\Database\Eloquent\Builder @@ -26755,7 +31282,6 @@ public static function havingBetween($column, $values, $boolean = 'and', $not = * Add a raw having clause to the query. * * @param string $sql - * @param array $bindings * @param string $boolean * @return \Illuminate\Database\Eloquent\Builder * @static @@ -26770,7 +31296,6 @@ public static function havingRaw($sql, $bindings = [], $boolean = 'and') * Add a raw or having clause to the query. * * @param string $sql - * @param array $bindings * @return \Illuminate\Database\Eloquent\Builder * @static */ @@ -27026,7 +31551,6 @@ public static function sharedLock() /** * Register a closure to be invoked before the query is executed. * - * @param callable $callback * @return \Illuminate\Database\Eloquent\Builder * @static */ @@ -27075,8 +31599,6 @@ public static function toRawSql() /** * Get a single expression value from the first result of a query. * - * @param string $expression - * @param array $bindings * @return mixed * @static */ @@ -27140,7 +31662,6 @@ public static function doesntExist() /** * Execute the given callback if no rows exist for the current query. * - * @param \Closure $callback * @return mixed * @static */ @@ -27153,7 +31674,6 @@ public static function existsOr($callback) /** * Execute the given callback if rows exist for the current query. * - * @param \Closure $callback * @return mixed * @static */ @@ -27272,7 +31792,6 @@ public static function numericAggregate($function, $columns = []) /** * Insert new records into the database. * - * @param array $values * @return bool * @static */ @@ -27285,7 +31804,6 @@ public static function insert($values) /** * Insert new records into the database while ignoring errors. * - * @param array $values * @return int * @static */ @@ -27298,7 +31816,6 @@ public static function insertOrIgnore($values) /** * Insert a new record and get the value of the primary key. * - * @param array $values * @param string|null $sequence * @return int * @static @@ -27312,7 +31829,6 @@ public static function insertGetId($values, $sequence = null) /** * Insert new records into the table using a subquery. * - * @param array $columns * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query * @return int * @static @@ -27326,7 +31842,6 @@ public static function insertUsing($columns, $query) /** * Insert new records into the table using a subquery while ignoring errors. * - * @param array $columns * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query * @return int * @static @@ -27340,7 +31855,6 @@ public static function insertOrIgnoreUsing($columns, $query) /** * Update records in a PostgreSQL database using the update from syntax. * - * @param array $values * @return int * @static */ @@ -27353,8 +31867,6 @@ public static function updateFrom($values) /** * Insert or update a record matching the attributes, and fill it with values. * - * @param array $attributes - * @param array|callable $values * @return bool * @static */ @@ -27458,7 +31970,6 @@ public static function getRawBindings() /** * Set the bindings on the query builder. * - * @param array $bindings * @param string $type * @return \Illuminate\Database\Eloquent\Builder * @throws \InvalidArgumentException @@ -27501,7 +32012,6 @@ public static function castBinding($value) /** * Merge an array of bindings into our bindings. * - * @param \Illuminate\Database\Query\Builder $query * @return \Illuminate\Database\Eloquent\Builder * @static */ @@ -27514,7 +32024,6 @@ public static function mergeBindings($query) /** * Remove all of the expressions from a list of bindings. * - * @param array $bindings * @return array * @static */ @@ -27563,7 +32072,6 @@ public static function useWritePdo() /** * Clone the query without the given properties. * - * @param array $properties * @return static * @static */ @@ -27576,7 +32084,6 @@ public static function cloneWithout($properties) /** * Clone the query without the given bindings. * - * @param array $except * @return static * @static */ @@ -27635,6 +32142,244 @@ public static function ddRawSql() return $instance->ddRawSql(); } + /** + * Add a where clause to determine if a "date" column is in the past to the query. + * + * @param array|string $columns + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function wherePast($columns) + { + /** @var \Illuminate\Database\Query\Builder $instance */ + return $instance->wherePast($columns); + } + + /** + * Add a where clause to determine if a "date" column is in the past or now to the query. + * + * @param array|string $columns + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function whereNowOrPast($columns) + { + /** @var \Illuminate\Database\Query\Builder $instance */ + return $instance->whereNowOrPast($columns); + } + + /** + * Add an "or where" clause to determine if a "date" column is in the past to the query. + * + * @param array|string $columns + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function orWherePast($columns) + { + /** @var \Illuminate\Database\Query\Builder $instance */ + return $instance->orWherePast($columns); + } + + /** + * Add a where clause to determine if a "date" column is in the past or now to the query. + * + * @param array|string $columns + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function orWhereNowOrPast($columns) + { + /** @var \Illuminate\Database\Query\Builder $instance */ + return $instance->orWhereNowOrPast($columns); + } + + /** + * Add a where clause to determine if a "date" column is in the future to the query. + * + * @param array|string $columns + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function whereFuture($columns) + { + /** @var \Illuminate\Database\Query\Builder $instance */ + return $instance->whereFuture($columns); + } + + /** + * Add a where clause to determine if a "date" column is in the future or now to the query. + * + * @param array|string $columns + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function whereNowOrFuture($columns) + { + /** @var \Illuminate\Database\Query\Builder $instance */ + return $instance->whereNowOrFuture($columns); + } + + /** + * Add an "or where" clause to determine if a "date" column is in the future to the query. + * + * @param array|string $columns + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function orWhereFuture($columns) + { + /** @var \Illuminate\Database\Query\Builder $instance */ + return $instance->orWhereFuture($columns); + } + + /** + * Add an "or where" clause to determine if a "date" column is in the future or now to the query. + * + * @param array|string $columns + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function orWhereNowOrFuture($columns) + { + /** @var \Illuminate\Database\Query\Builder $instance */ + return $instance->orWhereNowOrFuture($columns); + } + + /** + * Add a "where date" clause to determine if a "date" column is today to the query. + * + * @param array|string $columns + * @param string $boolean + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function whereToday($columns, $boolean = 'and') + { + /** @var \Illuminate\Database\Query\Builder $instance */ + return $instance->whereToday($columns, $boolean); + } + + /** + * Add a "where date" clause to determine if a "date" column is before today. + * + * @param array|string $columns + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function whereBeforeToday($columns) + { + /** @var \Illuminate\Database\Query\Builder $instance */ + return $instance->whereBeforeToday($columns); + } + + /** + * Add a "where date" clause to determine if a "date" column is today or before to the query. + * + * @param array|string $columns + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function whereTodayOrBefore($columns) + { + /** @var \Illuminate\Database\Query\Builder $instance */ + return $instance->whereTodayOrBefore($columns); + } + + /** + * Add a "where date" clause to determine if a "date" column is after today. + * + * @param array|string $columns + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function whereAfterToday($columns) + { + /** @var \Illuminate\Database\Query\Builder $instance */ + return $instance->whereAfterToday($columns); + } + + /** + * Add a "where date" clause to determine if a "date" column is today or after to the query. + * + * @param array|string $columns + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function whereTodayOrAfter($columns) + { + /** @var \Illuminate\Database\Query\Builder $instance */ + return $instance->whereTodayOrAfter($columns); + } + + /** + * Add an "or where date" clause to determine if a "date" column is today to the query. + * + * @param array|string $columns + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function orWhereToday($columns) + { + /** @var \Illuminate\Database\Query\Builder $instance */ + return $instance->orWhereToday($columns); + } + + /** + * Add an "or where date" clause to determine if a "date" column is before today. + * + * @param array|string $columns + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function orWhereBeforeToday($columns) + { + /** @var \Illuminate\Database\Query\Builder $instance */ + return $instance->orWhereBeforeToday($columns); + } + + /** + * Add an "or where date" clause to determine if a "date" column is today or before to the query. + * + * @param array|string $columns + * @param string $boolean + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function orWhereTodayOrBefore($columns) + { + /** @var \Illuminate\Database\Query\Builder $instance */ + return $instance->orWhereTodayOrBefore($columns); + } + + /** + * Add an "or where date" clause to determine if a "date" column is after today. + * + * @param array|string $columns + * @param string $boolean + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function orWhereAfterToday($columns) + { + /** @var \Illuminate\Database\Query\Builder $instance */ + return $instance->orWhereAfterToday($columns); + } + + /** + * Add an "or where date" clause to determine if a "date" column is today or after to the query. + * + * @param array|string $columns + * @param string $boolean + * @return \Illuminate\Database\Eloquent\Builder + * @static + */ + public static function orWhereTodayOrAfter($columns) + { + /** @var \Illuminate\Database\Query\Builder $instance */ + return $instance->orWhereTodayOrAfter($columns); + } + /** * Explains the query. * @@ -27731,11 +32476,20 @@ class Uri extends \Illuminate\Support\Uri {} class Validator extends \Illuminate\Support\Facades\Validator {} class View extends \Illuminate\Support\Facades\View {} class Vite extends \Illuminate\Support\Facades\Vite {} + class EloquentSerialize extends \AnourValar\EloquentSerialize\Facades\EloquentSerializeFacade {} class Debugbar extends \Barryvdh\Debugbar\Facades\Debugbar {} class Socialite extends \Laravel\Socialite\Facades\Socialite {} + class Livewire extends \Livewire\Livewire {} + class Signal extends \Spatie\SignalAwareCommand\Facades\Signal {} + class LaravelGoogleDriveStorage extends \Yaza\LaravelGoogleDriveStorage\Facades\LaravelGoogleDriveStorage {} } +namespace Facades\Livewire\Features\SupportFileUploads { + /** + * @mixin \Livewire\Features\SupportFileUploads\GenerateSignedUploadUrl */ + class GenerateSignedUploadUrl extends \Livewire\Features\SupportFileUploads\GenerateSignedUploadUrl {} +} diff --git a/app/Events/TagFrequencyChanged.php b/app/Events/TagFrequencyChanged.php index 87a5e28c..9b189af5 100644 --- a/app/Events/TagFrequencyChanged.php +++ b/app/Events/TagFrequencyChanged.php @@ -14,7 +14,11 @@ class TagFrequencyChanged /** * Create a new event instance. */ - public function __construct(public ?array $oldTags, public ?array $newTags) {} + public function __construct( + public string $tagType, + public array $oldTags, + public array $newTags + ) {} /** * Get the channels the event should broadcast on. diff --git a/app/Filament/Admin/Resources/ComputerScienceResource.php b/app/Filament/Admin/Resources/ComputerScienceResource.php index ded3ace9..4adb083c 100644 --- a/app/Filament/Admin/Resources/ComputerScienceResource.php +++ b/app/Filament/Admin/Resources/ComputerScienceResource.php @@ -5,12 +5,17 @@ use App\Filament\Admin\Resources\ComputerScienceResource\Pages; use App\Filament\Admin\Resources\UserResource\RelationManagers\UserRelationManager; use App\Models\ComputerScienceResource as ModelsComputerScienceResource; +use Filament\Forms; +use Filament\Forms\Form; use Filament\Resources\Resource; use Filament\Tables; +use Filament\Tables\Actions\BulkAction; +use Filament\Tables\Actions\DeleteAction; use Filament\Tables\Columns\TextColumn; use Filament\Tables\Filters\SelectFilter; use Filament\Tables\Table; use Illuminate\Database\Eloquent\Builder; +use Illuminate\Database\Eloquent\Collection; class ComputerScienceResource extends Resource { @@ -24,6 +29,51 @@ public static function getEloquentQuery(): Builder protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack'; + public static function form(Form $form): Form + { + return $form + ->schema([ + Forms\Components\TextInput::make('name') + ->required() + ->maxLength(255), + + Forms\Components\Textarea::make('description') + ->maxLength(65535) + ->columnSpanFull(), + + Forms\Components\TextInput::make('slug') + ->maxLength(255), + + Forms\Components\Select::make('user_id') + ->relationship('user', 'name') + ->required(), + + Forms\Components\TagsInput::make('topic_tags') + ->label('Topic Tags') + ->disabled() + ->helperText('These are computed from relationships'), + + Forms\Components\TagsInput::make('programming_language_tags') + ->label('Programming Language Tags') + ->disabled() + ->helperText('These are computed from relationships'), + + Forms\Components\TagsInput::make('general_tags') + ->label('General Tags') + ->disabled() + ->helperText('These are computed from relationships'), + + // Editable date fields + Forms\Components\DateTimePicker::make('created_at') + ->label('Created Date') + ->seconds(false), + + Forms\Components\DateTimePicker::make('updated_at') + ->label('Updated Date') + ->seconds(false), + ]); + } + public static function table(Table $table): Table { return $table @@ -35,7 +85,7 @@ public static function table(Table $table): Table TextColumn::make('name')->searchable() ->description(fn (ModelsComputerScienceResource $resource): string => $resource->description)->wrap(), TextColumn::make('topic_tags') - ->label('Topics') + ->label('topics_tags') ->badge() ->color('primary') ->getStateUsing(fn ($record) => $record->topic_tags), @@ -57,10 +107,29 @@ public static function table(Table $table): Table ]) ->actions([ Tables\Actions\EditAction::make(), + // Custom delete action that uses model delete() method + DeleteAction::make() + ->action(function (ModelsComputerScienceResource $record) { + // This calls the model's delete() method, triggering all events + $record->delete(); + }), ]) ->bulkActions([ Tables\Actions\BulkActionGroup::make([ - Tables\Actions\DeleteBulkAction::make(), + // Custom bulk delete action that uses model delete() method + BulkAction::make('delete') + ->label('Delete selected') + ->icon('heroicon-o-trash') + ->color('danger') + ->requiresConfirmation() + ->action(function (Collection $records) { + // Loop through each record and call delete() individually + // This ensures all model events and custom logic are triggered + $records->each(function ($record) { + $record->delete(); + }); + }) + ->deselectRecordsAfterCompletion(), ]), ]); } diff --git a/app/Http/Controllers/ComputerScienceResourceController.php b/app/Http/Controllers/ComputerScienceResourceController.php index 935c6ddf..c93b2391 100644 --- a/app/Http/Controllers/ComputerScienceResourceController.php +++ b/app/Http/Controllers/ComputerScienceResourceController.php @@ -2,7 +2,6 @@ namespace App\Http\Controllers; -use App\Events\TagFrequencyChanged; use App\Http\Requests\StoreResourceRequest; use App\Models\ComputerScienceResource; use App\Models\NewsPost; @@ -13,6 +12,7 @@ use App\Services\ResourceReviewService; use App\Services\SortingManagers\GeneralVotesSortingManager; use App\Services\SortingManagers\ResourceSortingManager; +use App\Services\UpvoteService; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\DB; @@ -27,6 +27,7 @@ public function __construct( protected GeneralVotesSortingManager $generalVotesSortingManager, protected ResourceReviewService $reviewService, protected ResourceSortingManager $resourceSortingManager, + protected UpvoteService $upvoteService, ) {} /** @@ -109,11 +110,10 @@ public function store(StoreResourceRequest $request) $resource->general_tags = $validatedData['general_tags']; } - // Dispatch tag frequency change event - TagFrequencyChanged::dispatch(null, $resource->tagCounter()); - DB::commit(); + $this->upvoteService->upvote('resource', $resource->id); + Log::info('Resource created', [ 'resource_id' => $resource->id, 'user_id' => Auth::id(), @@ -122,8 +122,9 @@ public function store(StoreResourceRequest $request) 'platforms' => $resource->platforms, ]); - return redirect(route('resources.show', ['slug' => $resource->slug])) - ->with('success', 'Created Resource Succesfully!'); + session()->flash('success', 'Created Resource!'); + + return response()->json($resource); } catch (Throwable $e) { DB::rollBack(); Log::critical('Failed to create resource', [ @@ -133,7 +134,7 @@ public function store(StoreResourceRequest $request) 'data' => $validatedData, ]); - return back()->withErrors(['error' => 'Failed to create resource. Please try again.']); + return response()->json([], 500); } } @@ -168,14 +169,15 @@ public function show(Request $request, string $slug, string $tab = 'reviews') if ($tab === 'reviews') { $userReview = null; if ($userId = Auth::id()) { - $userReview = ResourceReview::where('user_id', $userId)->first(); + $userReview = ResourceReview::whereBelongsTo($computerScienceResource) + ->firstWhere('user_id', $userId); } $data['userReview'] = $userReview; $data['reviews'] = Inertia::defer( function () use ($computerScienceResource, $sortBy, $request) { - $query = ResourceReview::where('computer_science_resource_id', $computerScienceResource->id); + $query = ResourceReview::whereBelongsTo($computerScienceResource); $query = $this->generalVotesSortingManager->applySort($query, $sortBy, ResourceReview::class); return $query->with('user')->paginate(10)->appends($request->query()); @@ -184,7 +186,7 @@ function () use ($computerScienceResource, $sortBy, $request) { } elseif ($tab === 'edits') { $data['resourceEdits'] = Inertia::defer( function () use ($computerScienceResource, $sortBy, $request) { - $query = ResourceEdits::where('computer_science_resource_id', $computerScienceResource->id); + $query = ResourceEdits::whereBelongsTo($computerScienceResource); $query = $this->generalVotesSortingManager->applySort($query, $sortBy, ResourceEdits::class); return $query->with('user')->paginate(10)->appends($request->query()); diff --git a/app/Http/Controllers/ResourceEditsController.php b/app/Http/Controllers/ResourceEditsController.php index 363b26bd..488e5edf 100644 --- a/app/Http/Controllers/ResourceEditsController.php +++ b/app/Http/Controllers/ResourceEditsController.php @@ -2,7 +2,6 @@ namespace App\Http\Controllers; -use App\Events\TagFrequencyChanged; use App\Http\Requests\StoreResourceEdit; use App\Models\ComputerScienceResource; use App\Models\ResourceEdits; @@ -69,7 +68,7 @@ public function store(ComputerScienceResource $computerScienceResource, StoreRes ]); return redirect()->route('resource_edits.show', ['slug' => $resourceEdit->slug]) - ->with('success', 'The proposed edits were created. Others can now view it.'); + ->with('success', 'Edits Created!'); } /** @@ -95,7 +94,7 @@ public function show(string $slug) { $resourceEdits = ResourceEdits::where('slug', $slug)->firstOrFail(); - $resourceEdits->load('resource'); + $resourceEdits->load('computerScienceResource'); $resourceEdits->load('user'); return Inertia::render('ResourceEdits/Show', [ @@ -112,7 +111,6 @@ public function merge(ResourceEditsService $editsService, ResourceEdits $resourc DB::beginTransaction(); try { $resource = ComputerScienceResource::findOrFail($resourceEdits->computer_science_resource_id); - $oldTagCounter = $resource->tagCounter(); // Go through each property in proposed_changes, and if it exists. then set the value $changes = $resourceEdits->proposed_changes; @@ -151,11 +149,6 @@ public function merge(ResourceEditsService $editsService, ResourceEdits $resourc } } - // Get the new tag counter - $newTags = collect($allTags)->flatten()->countBy()->toArray(); - // Change tag frequency - TagFrequencyChanged::dispatch($oldTagCounter, $newTags); - // Delete the edit since we successfully merged the changes $resourceEdits->delete(); @@ -170,7 +163,7 @@ public function merge(ResourceEditsService $editsService, ResourceEdits $resourc ]); return redirect(route('resources.show', ['slug' => $resource->slug])) - ->with('success', 'Successfully merged new changed!'); + ->with('success', 'Successfully Merged Changes!'); } catch (Throwable $e) { DB::rollBack(); Log::critical('Failed to merge resource edits', [ diff --git a/app/Http/Controllers/ResourceReviewController.php b/app/Http/Controllers/ResourceReviewController.php index ffb03c8f..bdb62b22 100644 --- a/app/Http/Controllers/ResourceReviewController.php +++ b/app/Http/Controllers/ResourceReviewController.php @@ -58,7 +58,7 @@ public function store(StoreResourceReview $request, ComputerScienceResource $com 'review_id' => $review->id, ]); - return response()->json(); + return response()->json($review); } public function update(StoreResourceReview $request, ComputerScienceResource $computerScienceResource) @@ -106,6 +106,6 @@ public function update(StoreResourceReview $request, ComputerScienceResource $co 'review_id' => $existingReview->id, ]); - return response()->json(); + return response()->json($existingReview); } } diff --git a/app/Http/Controllers/TagFrequencyController.php b/app/Http/Controllers/TagFrequencyController.php index 08691dba..d1f098f1 100644 --- a/app/Http/Controllers/TagFrequencyController.php +++ b/app/Http/Controllers/TagFrequencyController.php @@ -6,15 +6,22 @@ class TagFrequencyController extends Controller { - public function search(string $query = '') + public function search(string $type, string $query = '') { if (strlen($query) > 50) { - return response()->json(['message' => 'Query too long.'], 422); + return response()->json(['message' => 'Query too long'], 422); } - $prefixed_tags = TagFrequency::where('tag', 'like', $query.'%') + if (! in_array($type, ['topics_tags', 'programming_languages_tags', 'general_tags'])) { + return response()->json(['message' => 'Not a valid type'], 422); + } + + $escaped = addcslashes($query, '%_\\'); + + $prefixed_tags = TagFrequency::where('tag', 'like', $escaped.'%') + ->where('type', $type) ->orderByDesc('count') - ->limit(20) + ->limit(30) ->get(); return response()->json([ diff --git a/app/Http/Controllers/UpvoteController.php b/app/Http/Controllers/UpvoteController.php index 0073d56c..ebc84b5c 100644 --- a/app/Http/Controllers/UpvoteController.php +++ b/app/Http/Controllers/UpvoteController.php @@ -2,73 +2,24 @@ namespace App\Http\Controllers; -use App\Services\ModelResolverService; -use Illuminate\Support\Facades\Auth; -use Illuminate\Support\Facades\DB; -use Illuminate\Support\Facades\Log; -use Illuminate\Validation\Rule; -use Throwable; +use App\Services\UpvoteService; class UpvoteController extends Controller { - public function __construct(protected ModelResolverService $modelResolver) {} + public function __construct(protected UpvoteService $upvoteService) {} /** * Upvote a Model */ public function upvote($typeKey, $id) { - validator( - [ - 'type_key' => $typeKey, - ], - [ - 'type_key' => ['required', Rule::in(config('upvotes.upvotable_keys'))], - ] - )->validate(); + $result = $this->upvoteService->upvote($typeKey, $id); - DB::beginTransaction(); - try { - $model = $this->modelResolver->resolve($typeKey, $id); - - if (! $model) { - Log::warning('Upvote failed: Model not found', [ - 'user_id' => Auth::id(), - 'type_key' => $typeKey, - 'id' => $id, - ]); - - return response()->json(['message' => 'Model not found'], 404); - } - - $user_id = Auth::id(); - $result = $model->upvote($user_id); - - DB::commit(); - - Log::debug('User upvoted model', [ - 'user_id' => $user_id, - 'type_key' => $typeKey, - 'id' => $id, - 'result' => $result, - ]); - - return response()->json([ - 'userVote' => $result['userVote'], - 'changeFromVote' => $result['changeFromVote'], - ]); - } catch (Throwable $e) { - DB::rollBack(); - Log::critical('Failed to upvote', [ - 'error' => $e->getMessage(), - 'trace' => $e->getTraceAsString(), - 'type_key' => $typeKey, - 'id' => $id, - 'user_id' => Auth::id(), - ]); - - return response()->json(['message' => 'Failed to upvote. Please try again.'], 500); + if (isset($result['error'])) { + return response()->json(['message' => $result['error']], $result['status']); } + + return response()->json($result); } /** @@ -76,56 +27,12 @@ public function upvote($typeKey, $id) */ public function downvote($typeKey, $id) { - validator( - [ - 'type_key' => $typeKey, - ], - [ - 'type_key' => ['required', Rule::in(config('upvotes.upvotable_keys'))], - ] - )->validate(); + $result = $this->upvoteService->downvote($typeKey, $id); - DB::beginTransaction(); - try { - $model = $this->modelResolver->resolve($typeKey, $id); - - if (! $model) { - Log::warning('Downvote failed: Model not found', [ - 'user_id' => Auth::id(), - 'type_key' => $typeKey, - 'id' => $id, - ]); - - return response()->json(['message' => 'Model not found'], 404); - } - - $user_id = Auth::id(); - $result = $model->downvote($user_id); - - DB::commit(); - - Log::debug('User downvoted model', [ - 'user_id' => $user_id, - 'type_key' => $typeKey, - 'id' => $id, - 'result' => $result, - ]); - - return response()->json([ - 'userVote' => $result['userVote'], - 'changeFromVote' => $result['changeFromVote'], - ]); - } catch (Throwable $e) { - DB::rollBack(); - Log::critical('Failed to downvote', [ - 'error' => $e->getMessage(), - 'trace' => $e->getTraceAsString(), - 'type_key' => $typeKey, - 'id' => $id, - 'user_id' => Auth::id(), - ]); - - return response()->json(['message' => 'Failed to downvote. Please try again.'], 500); + if (isset($result['error'])) { + return response()->json(['message' => $result['error']], $result['status']); } + + return response()->json($result); } } diff --git a/app/Listeners/ModifyTagFrequency.php b/app/Listeners/ModifyTagFrequency.php index 2569580a..991035f8 100644 --- a/app/Listeners/ModifyTagFrequency.php +++ b/app/Listeners/ModifyTagFrequency.php @@ -16,12 +16,17 @@ public function __construct() } /** - * Handle the event. + * Update tag frequencies based on two arrays of tags. + * + * @param array $oldTags Array of old tags (e.g. ['php', 'laravel', ...]) + * @param array $newTags Array of new tags (e.g. ['php', 'vue', ...]) */ public function handle(TagFrequencyChanged $event): void { - $old = $event->oldTags ?? []; - $new = $event->newTags ?? []; + $tagType = $event->tagType; + // Count tags in each array + $old = array_count_values($event->oldTags); + $new = array_count_values($event->newTags); // Build diffs for every tag $diffs = []; @@ -36,25 +41,28 @@ public function handle(TagFrequencyChanged $event): void return; } - // One upsert: increment (or decrement) existing, insert new + // Only upsert for the given tagType $upserts = []; foreach ($diffs as $tag => $count) { $upserts[] = [ 'tag' => $tag, + 'type' => $tagType, 'count' => $count, ]; } + // https://laravel.com/docs/12.x/queries#upserts DB::table('tag_frequencies')->upsert( $upserts, - ['tag'], + ['tag', 'type'], [ 'count' => DB::raw('tag_frequencies.count + VALUES(count)'), ] ); - // Clean out any zero-or-negative counts + // Clean out any zero-or-negative counts for this tagType only DB::table('tag_frequencies') + ->where('type', $tagType) ->where('count', '<=', 0) ->delete(); } diff --git a/app/Models/ComputerScienceResource.php b/app/Models/ComputerScienceResource.php index 941cf89f..e729cac1 100644 --- a/app/Models/ComputerScienceResource.php +++ b/app/Models/ComputerScienceResource.php @@ -2,6 +2,7 @@ namespace App\Models; +use App\Events\TagFrequencyChanged; use App\Observers\ComputerScienceResourceObserver; use App\Traits\HasComments; use App\Traits\HasVotes; @@ -14,13 +15,20 @@ use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Relations\HasOne; use Illuminate\Support\Facades\Storage; +use ShiftOneLabs\LaravelCascadeDeletes\CascadesDeletes; use Spatie\Activitylog\LogOptions; use Spatie\Activitylog\Traits\LogsActivity; use Spatie\Tags\HasTags; +/** + * @property array $topic_tags + * @property array $programming_language_tags + * @property array $general_tags + */ #[ObservedBy([ComputerScienceResourceObserver::class])] class ComputerScienceResource extends Model { + use CascadesDeletes; use HasComments; use HasFactory; use HasTags; @@ -28,9 +36,12 @@ class ComputerScienceResource extends Model use LogsActivity; use Sluggable; + // TODO: ADD A TEST FOR RESOURCE DELETION. DO NOT USE YET IN PRODUCTION + protected $cascadeDeletes = ['votes', 'upvoteSummary', 'comments', 'commentsCountRelationship', 'edits', 'reviewSummary', 'reviews', '']; + protected $table = 'computer_science_resources'; - protected $guarded = []; + protected $guarded = ['topic_tags', 'programming_language_tags', 'general_tags']; protected $appends = ['topic_tags', 'programming_language_tags', 'general_tags', 'vote_score', 'user_vote', 'comments_count', 'image_url']; @@ -104,8 +115,14 @@ protected function platforms(): Attribute protected function topicTags(): Attribute { return Attribute::make( - get: fn () => $this->tagsWithType('topics')->pluck('name')->toArray(), - set: fn (array $value) => $this->syncTagsWithType($value, 'topics') + get: fn () => $this->tagsWithType('topics_tags')->pluck('name')->toArray(), + set: function (array $value) { + $old_value = $this->topic_tags; + $this->syncTagsWithType($value, 'topics_tags'); + TagFrequencyChanged::dispatch('topics_tags', $old_value, $value); + + return null; + } ); } @@ -115,8 +132,14 @@ protected function topicTags(): Attribute protected function programmingLanguageTags(): Attribute { return Attribute::make( - get: fn () => $this->tagsWithType('programming_languages')->pluck('name')->toArray(), - set: fn (array $value) => $this->syncTagsWithType($value, 'programming_languages') + get: fn () => $this->tagsWithType('programming_languages_tags')->pluck('name')->toArray(), + set: function (array $value) { + $old_value = $this->programming_language_tags; + $this->syncTagsWithType($value, 'programming_languages_tags'); + TagFrequencyChanged::dispatch('programming_languages_tags', $old_value, $value); + + return null; + } ); } @@ -127,14 +150,13 @@ protected function generalTags(): Attribute { return Attribute::make( get: fn () => $this->tagsWithType('general_tags')->pluck('name')->toArray(), - set: fn (array $value) => $this->syncTagsWithType($value, 'general_tags') - ); - } + set: function (array $value) { + $old_value = $this->general_tags; + $this->syncTagsWithType($value, 'general_tags'); + TagFrequencyChanged::dispatch('general_tags', $old_value, $value); - public function tagCounter(): array - { - $tag_collection = collect([$this->topic_tags, $this->programming_language_tags, $this->general_tags]); - - return $tag_collection->flatten()->countBy()->toArray(); + return null; + } + ); } } diff --git a/app/Models/ResourceEdits.php b/app/Models/ResourceEdits.php index 185c3b8d..b3dc4736 100644 --- a/app/Models/ResourceEdits.php +++ b/app/Models/ResourceEdits.php @@ -37,7 +37,7 @@ class ResourceEdits extends Model protected $guarded = []; - protected $with = ['votes', 'upvoteSummary', 'commentsCountRelationship', 'resource']; + protected $with = ['votes', 'upvoteSummary', 'commentsCountRelationship', 'computerScienceResource']; protected $appends = ['user_vote', 'vote_score', 'comments_count', 'can_merge_edits']; @@ -64,9 +64,9 @@ public function sluggable(): array ]; } - public function resource(): BelongsTo + public function computerScienceResource(): BelongsTo { - return $this->belongsTo(ComputerScienceResource::class, 'computer_science_resource_id', 'id'); + return $this->belongsTo(ComputerScienceResource::class); } public function user(): BelongsTo diff --git a/app/Models/ResourceReview.php b/app/Models/ResourceReview.php index 5b76d948..9915b1ec 100644 --- a/app/Models/ResourceReview.php +++ b/app/Models/ResourceReview.php @@ -10,10 +10,12 @@ use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; +use ShiftOneLabs\LaravelCascadeDeletes\CascadesDeletes; #[ObservedBy([ResourceReviewObserver::class])] class ResourceReview extends Model { + use CascadesDeletes; use HasComments; /** @use HasFactory<\Database\Factories\ResourceReviewFactory> */ @@ -21,6 +23,8 @@ class ResourceReview extends Model use HasVotes; + protected $cascadeDeletes = ['votes', 'upvoteSummary', 'comments', 'commentsCountRelationship']; + protected $guarded = []; protected $with = ['votes', 'upvoteSummary', 'commentsCountRelationship']; @@ -37,6 +41,11 @@ public function user(): BelongsTo return $this->belongsTo(User::class); } + public function computerScienceResource(): BelongsTo + { + return $this->belongsTo(ComputerScienceResource::class); + } + /** * Get the average review score. */ @@ -58,7 +67,7 @@ protected function averageScore(): Attribute $sum = array_sum($numericFields); - return round($sum / 6, 2); // round to 2 decimal places + return round($sum / count($fields), 2); // round to 2 decimal places }, ); } diff --git a/app/Models/User.php b/app/Models/User.php index 406be7e0..766a8ed5 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -82,10 +82,13 @@ protected function profilePhotoUrl(): Attribute : $this->getPhotoUrl(); } - public function canAccessPanel(Panel $panel): bool + public function isAdmin(): bool { - return true; + return strcmp($this->email, 'admin@computerscienceresources.com') == 0 && $this->hasVerifiedEmail(); + } - return str_ends_with($this->email, '@computerscienceresources.com') && $this->hasVerifiedEmail(); + public function canAccessPanel(Panel $panel): bool + { + return $this->isAdmin(); } } diff --git a/app/Observers/ComputerScienceResourceObserver.php b/app/Observers/ComputerScienceResourceObserver.php index 275a3382..244be455 100644 --- a/app/Observers/ComputerScienceResourceObserver.php +++ b/app/Observers/ComputerScienceResourceObserver.php @@ -4,6 +4,7 @@ use App\Events\TagFrequencyChanged; use App\Models\ComputerScienceResource; +use Illuminate\Support\Facades\Storage; class ComputerScienceResourceObserver { @@ -28,7 +29,10 @@ public function updated(ComputerScienceResource $computerScienceResource): void */ public function deleted(ComputerScienceResource $computerScienceResource): void { - // + // Delete the image + if ($computerScienceResource->image_path) { + Storage::disk('public')->delete($computerScienceResource->image_path); + } } /** diff --git a/app/Policies/ComputerScienceResourcePolicy.php b/app/Policies/ComputerScienceResourcePolicy.php index 9684bbeb..501c8212 100644 --- a/app/Policies/ComputerScienceResourcePolicy.php +++ b/app/Policies/ComputerScienceResourcePolicy.php @@ -28,6 +28,10 @@ public function view(User $user, ComputerScienceResource $computerScienceResourc */ public function update(User $user, ComputerScienceResource $computerScienceResource): bool { + if ($user->isAdmin()) { + return true; + } + return $user->id == $computerScienceResource->user_id; } diff --git a/app/Services/ComputerScienceResourceFilter.php b/app/Services/ComputerScienceResourceFilter.php index 2670d6e3..f1bcb3d5 100644 --- a/app/Services/ComputerScienceResourceFilter.php +++ b/app/Services/ComputerScienceResourceFilter.php @@ -29,12 +29,12 @@ public function validate(array $request) 'difficulty.*' => ['required', 'distinct', 'string', Rule::in(config('computerScienceResource.difficulties'))], 'pricing' => ['nullable', 'array'], 'pricing.*' => ['required', 'distinct', 'string', Rule::in(config('computerScienceResource.pricings'))], - 'topics' => ['nullable', 'array'], + 'topics_tags' => ['nullable', 'array'], 'topics.*' => ['required', 'distinct', 'string', 'max:50'], 'general_tags' => ['nullable', 'array'], 'general_tags.*' => ['required', 'distinct', 'string', 'max:50'], - 'programming_languages' => ['nullable', 'array'], - 'programming_languages.*' => ['required', 'distinct', 'string', 'max:50'], + 'programming_languages_tags' => ['nullable', 'array'], + 'programming_languages_tags.*' => ['required', 'distinct', 'string', 'max:50'], // Fixed field names to match frontend 'overall' => ['nullable', 'integer', 'between:1,4'], @@ -95,13 +95,13 @@ public function applyFilters($query, array $filters) } // Filter by topic tags - if (! empty($filters['topics'])) { - $query->withAnyTags((array) $filters['topics'], 'topics'); + if (! empty($filters['topics_tags'])) { + $query->withAnyTags((array) $filters['topics_tags'], 'topics_tags'); } // Filter by programming languages - if (! empty($filters['programming_languages'])) { - $query->withAnyTags((array) $filters['programming_languages'], 'programming_languages'); + if (! empty($filters['programming_languages_tags'])) { + $query->withAnyTags((array) $filters['programming_languages_tags'], 'programming_languages_tags'); } // Filter by general tags diff --git a/app/Services/ResourceEditsService.php b/app/Services/ResourceEditsService.php index 9f28aa8e..4dd42f5b 100644 --- a/app/Services/ResourceEditsService.php +++ b/app/Services/ResourceEditsService.php @@ -16,6 +16,9 @@ class ResourceEditsService */ public function requiredVotes(int $totalVotes): int { + if ($totalVotes == 0) { + return 1; + } // Take the minimum of total votes OR the logarithmic calculation $votes = min($totalVotes, floor(log($totalVotes, 1.25)) + 1); diff --git a/app/Services/UpvoteService.php b/app/Services/UpvoteService.php new file mode 100644 index 00000000..06aa32e6 --- /dev/null +++ b/app/Services/UpvoteService.php @@ -0,0 +1,130 @@ + $typeKey, + ], + [ + 'type_key' => ['required', Rule::in(config('upvotes.upvotable_keys'))], + ] + )->validate(); + + DB::beginTransaction(); + try { + $model = $this->modelResolver->resolve($typeKey, $id); + + if (! $model) { + Log::warning('Upvote failed: Model not found', [ + 'user_id' => Auth::id(), + 'type_key' => $typeKey, + 'id' => $id, + ]); + + return ['error' => 'Model not found', 'status' => 404]; + } + + $user_id = Auth::id(); + $result = $model->upvote($user_id); + + DB::commit(); + + Log::debug('User upvoted model', [ + 'user_id' => $user_id, + 'type_key' => $typeKey, + 'id' => $id, + 'result' => $result, + ]); + + return [ + 'userVote' => $result['userVote'], + 'changeFromVote' => $result['changeFromVote'], + ]; + } catch (Throwable $e) { + DB::rollBack(); + Log::critical('Failed to upvote', [ + 'error' => $e->getMessage(), + 'trace' => $e->getTraceAsString(), + 'type_key' => $typeKey, + 'id' => $id, + 'user_id' => Auth::id(), + ]); + + return ['error' => 'Failed to upvote. Please try again.', 'status' => 500]; + } + } + + /** + * Downvote a Model + */ + public function downvote($typeKey, $id) + { + validator( + [ + 'type_key' => $typeKey, + ], + [ + 'type_key' => ['required', Rule::in(config('upvotes.upvotable_keys'))], + ] + )->validate(); + + DB::beginTransaction(); + try { + $model = $this->modelResolver->resolve($typeKey, $id); + + if (! $model) { + Log::warning('Downvote failed: Model not found', [ + 'user_id' => Auth::id(), + 'type_key' => $typeKey, + 'id' => $id, + ]); + + return ['error' => 'Model not found', 'status' => 404]; + } + + $user_id = Auth::id(); + $result = $model->downvote($user_id); + + DB::commit(); + + Log::debug('User downvoted model', [ + 'user_id' => $user_id, + 'type_key' => $typeKey, + 'id' => $id, + 'result' => $result, + ]); + + return [ + 'userVote' => $result['userVote'], + 'changeFromVote' => $result['changeFromVote'], + ]; + } catch (Throwable $e) { + DB::rollBack(); + Log::critical('Failed to downvote', [ + 'error' => $e->getMessage(), + 'trace' => $e->getTraceAsString(), + 'type_key' => $typeKey, + 'id' => $id, + 'user_id' => Auth::id(), + ]); + + return ['error' => 'Failed to downvote. Please try again.', 'status' => 500]; + } + } +} diff --git a/config/computerScienceResource.php b/config/computerScienceResource.php index c43e82cc..2602d173 100644 --- a/config/computerScienceResource.php +++ b/config/computerScienceResource.php @@ -4,5 +4,5 @@ 'platforms' => ['book', 'podcast', 'youtube_channel', 'blog', 'website', 'organization', 'service', 'bootcamp', 'newsletter', 'workshop', 'course', 'forum', 'mobile_app', 'desktop_app', 'magazine'], 'difficulties' => ['general', 'introduction', 'practical', 'advanced', 'academic'], 'pricings' => ['free', 'paid', 'freemium', 'premium'], - 'tags_regex' => '/^[a-z0-9-]+$/', + 'tags_regex' => '/^[a-z0-9+#.-]+$/', ]; diff --git a/database/factories/ComputerScienceResourceFactory.php b/database/factories/ComputerScienceResourceFactory.php index c992a03e..c4f18bae 100644 --- a/database/factories/ComputerScienceResourceFactory.php +++ b/database/factories/ComputerScienceResourceFactory.php @@ -2,7 +2,6 @@ namespace Database\Factories; -use App\Events\TagFrequencyChanged; use App\Models\ComputerScienceResource; use App\Models\User; use Illuminate\Database\Eloquent\Factories\Factory; @@ -54,11 +53,13 @@ public function setTags(array $topic = [], array $language = [], array $general public function configure(): Factory { return $this->afterCreating(function (ComputerScienceResource $resource) { - $fakerTags = ['tag1', 'tag2', 'tag3', 'tag4', 'tag5', fake()->word(), fake()->word()]; + $fakerTags = ['tag1', 'tag2', 'tag3', 'tag4', 'tag5', fake()->word(), fake()->word(), fake()->word()]; // Sanitize all tags before assigning - $topicTags = $this->topicTags ?? fake()->randomElements($fakerTags, fake()->numberBetween(3, count($fakerTags))); - $topicTags = array_map([$this, 'sanitizeTag'], $topicTags); + do { + $topicTags = $this->topicTags ?? fake()->randomElements($fakerTags, fake()->numberBetween(3, count($fakerTags))); + $topicTags = array_map([$this, 'sanitizeTag'], $topicTags); + } while (count($topicTags) < 2); $programmingLanguageTags = $this->programmingLanguageTags ?? fake()->randomElements($fakerTags); $programmingLanguageTags = array_map([$this, 'sanitizeTag'], $programmingLanguageTags); @@ -69,8 +70,6 @@ public function configure(): Factory $resource->topic_tags = $topicTags; $resource->programming_language_tags = $programmingLanguageTags; $resource->general_tags = $generalTags; - - TagFrequencyChanged::dispatch(null, $resource->tagCounter()); }); } diff --git a/database/migrations/2025_04_30_202718_create_tag_frequencies_table.php b/database/migrations/2025_04_30_202718_create_tag_frequencies_table.php index b4cc7c0d..66893bdb 100644 --- a/database/migrations/2025_04_30_202718_create_tag_frequencies_table.php +++ b/database/migrations/2025_04_30_202718_create_tag_frequencies_table.php @@ -12,7 +12,10 @@ public function up(): void { Schema::create('tag_frequencies', function (Blueprint $table) { - $table->char('tag', 100)->primary(); + $table->char('tag', 100); + $table->char('type', 50); + + $table->primary(['tag', 'type']); $table->bigInteger('count')->default(0); }); } diff --git a/database/schemas.md b/database/schemas.md deleted file mode 100644 index 9ce21c45..00000000 --- a/database/schemas.md +++ /dev/null @@ -1,15 +0,0 @@ -Schema::create('computer_science_resource', function (Blueprint $table) { - $table->id(); - $table->string('name'); - $table->text('description'); - $table->string('image_url'); - $table->string('page_url'); - $table->date('created_at'); - - $table->set('resource_type', ['book', 'podcast', 'youtube channel', 'blog', 'website', 'organization', 'bootcamp', 'newsletter', 'workshop', 'course', 'forum', 'mobile app', 'desktop app', 'e-zine']); - $table->enum(difficulty, ['beginner', 'industry_simple', 'industry_standard', 'industry_professional', 'academic']); - $table->enum('pricing', ['free', 'premium', 'paid', 'freemium']) - - $table->timestamps(); - -}); diff --git a/database/seeders/UserSeeder.php b/database/seeders/UserSeeder.php index 4bfeda75..b090c769 100644 --- a/database/seeders/UserSeeder.php +++ b/database/seeders/UserSeeder.php @@ -31,7 +31,7 @@ public function run(): void User::factory()->create( [ 'name' => 'admin', - 'email' => 'admin@ComputerScienceResources.com', + 'email' => 'admin@computerscienceresources.com', 'password' => Hash::make('test123'), ] ); diff --git a/resources/js/Components/Banner.vue b/resources/js/Components/Banner.vue index e8f7b2c5..2a5d6876 100644 --- a/resources/js/Components/Banner.vue +++ b/resources/js/Components/Banner.vue @@ -16,11 +16,11 @@ watchEffect(async () => { diff --git a/resources/js/Components/Comments/CommentList.vue b/resources/js/Components/Comments/CommentList.vue index 00c54fd0..c72a1c51 100644 --- a/resources/js/Components/Comments/CommentList.vue +++ b/resources/js/Components/Comments/CommentList.vue @@ -1,5 +1,5 @@ +function onBlur() { + setTimeout(() => (showDropdown.value = false), 150); +} + +async function searchTags(query) { + try { + const response = await axios.get( + route("tags.search", { type: props.tagType, query }) + ); + const tags = response.data.tags; + + // merge with existing tags (avoid duplicates) + const newTags = tags.map((tagJson) => tagJson.tag); + const newCounts = Object.fromEntries( + tags.map((tagJson) => [tagJson.tag, tagJson.count]) + ); + + allTags.value = [...new Set([...allTags.value, ...newTags])]; + tagCounts.value = { ...tagCounts.value, ...newCounts }; + } catch (error) { + console.warn("Cannot query server for tags", error); + } finally { + isLoading.value = false; + } +} +// load popular tags on mount +onMounted(async () => { + try { + const response = await axios.get( + route("tags.search", { type: props.tagType, query: "" }) + ); + const tags = response.data.tags; + + allTags.value = tags.map((tagJson) => tagJson.tag); + tagCounts.value = Object.fromEntries( + tags.map((tagJson) => [tagJson.tag, tagJson.count]) + ); + } catch (error) { + console.warn("Cannot prefetch tags", error); + } +}); + diff --git a/resources/js/Components/ResourceReviews.vue b/resources/js/Components/ResourceReviews.vue index cf63fb86..3f2d7138 100644 --- a/resources/js/Components/ResourceReviews.vue +++ b/resources/js/Components/ResourceReviews.vue @@ -1,5 +1,5 @@ diff --git a/resources/js/Components/Resources/ResourcesTable.vue b/resources/js/Components/Resources/ResourcesTable.vue index 0f63d369..6a53e9cd 100644 --- a/resources/js/Components/Resources/ResourcesTable.vue +++ b/resources/js/Components/Resources/ResourcesTable.vue @@ -13,13 +13,12 @@ const props = defineProps({