Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Create array containing variables and their values
<?php compact(array|string $var_name, array|string ...$var_names): array
<?php         $value = $this->serialize($value);

        $expiration = $this->getTime() + $seconds;



        return $this->table()->upsert(compact('key', 'value', 'expiration'), 'key') > 0;

    }
<?php         $doesntSupportInsertOrIgnore = [SqlServerConnection::class];



        if (! in_array(get_class($this->getConnection()), $doesntSupportInsertOrIgnore)) {

            return $this->table()->insertOrIgnore(compact('key', 'value', 'expiration')) > 0;

        }



        try {
<?php         }



        try {

            return $this->table()->insert(compact('key', 'value', 'expiration'));

        } catch (QueryException) {


        }
<?php         $time = $expire - $this->currentTime();



        return compact('data', 'time');

    }
<?php             $concrete = $this->getClosure($abstract, $concrete);

        }



        $this->bindings[$abstract] = compact('concrete', 'shared');
<?php     protected function paginator($items, $total, $perPage, $currentPage, $options)

    {

        return Container::getInstance()->makeWith(LengthAwarePaginator::class, compact(

            'items', 'total', 'perPage', 'currentPage', 'options'

        ));

    }
<?php     protected function simplePaginator($items, $perPage, $currentPage, $options)

    {

        return Container::getInstance()->makeWith(Paginator::class, compact(

            'items', 'perPage', 'currentPage', 'options'

        ));

    }
<?php     protected function cursorPaginator($items, $perPage, $cursor, $options)

    {

        return Container::getInstance()->makeWith(CursorPaginator::class, compact(

            'items', 'perPage', 'cursor', 'options'

        ));

    }
<?php             : $query;



        if ($this->loggingQueries) {

            $this->queryLog[] = compact('query', 'bindings', 'time');

        }

    }
<?php             throw new InvalidArgumentException('The provided value may not be null.');

        }



        $this->pivotValues[] = compact('column', 'value');



        return $this->wherePivot($column, '=', $value);

    }
<?php             $result = parent::__call($method, $parameters);



            if (in_array($method, ['select', 'selectRaw', 'selectSub', 'addSelect', 'withoutGlobalScopes'])) {

                $this->macroBuffer[] = compact('method', 'parameters');

            }



            return $result;
<?php         catch (BadMethodCallException) {

            $this->macroBuffer[] = compact('method', 'parameters');



            return $this;

        }
<?php         })->all();



        return $this->rollbackMigrations(

            $migrations, $paths, compact('pretend')

        );

    }
<?php         if ($column instanceof ConditionExpression) {

            $type = 'Expression';



            $this->wheres[] = compact('type', 'column', 'boolean');



            return $this;

        }
<?php         $this->wheres[] = compact(

            'type', 'column', 'operator', 'value', 'boolean'

        );



        if (! $value instanceof ExpressionContract) {

            $this->addBinding($this->flattenValue($value), 'where');