/home/armleasing.am/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php
* @param array $bindings
* @param \Closure $callback
* @return mixed
*
* @throws \Illuminate\Database\QueryException
*/
protected function runQueryCallback($query, $bindings, Closure $callback)
{
// To execute the statement, we'll simply call the callback, which will actually
// run the SQL against the PDO connection. Then we can calculate the time it
// took to execute and log the query SQL, bindings and time in our memory.
try {
$result = $callback($query, $bindings);
}
// If an exception occurs when attempting to run a query, we'll format the error
// message to include the bindings with SQL, which will make this exception a
// lot more helpful to the developer instead of just the database's errors.
catch (Exception $e) {
throw new QueryException(
$query, $this->prepareBindings($bindings), $e
);
}
return $result;
}
/**
* Log a query in the connection's query log.
*
* @param string $query
* @param array $bindings
* @param float|null $time
* @return void
*/
public function logQuery($query, $bindings, $time = null)
{
$this->event(new QueryExecuted($query, $bindings, $time, $this));
if ($this->loggingQueries) {
Arguments
"SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_schema.tables where table_schema = arml_leasing and table_name = languages and table_type = 'BASE TABLE')"
/home/armleasing.am/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php
* Used by all PDO-based drivers.
*/
class PDOConnection extends PDO implements Connection, ServerInfoAwareConnection
{
/**
* @param string $dsn
* @param string|null $user
* @param string|null $password
* @param mixed[]|null $options
*
* @throws PDOException In case of an error.
*/
public function __construct($dsn, $user = null, $password = null, ?array $options = null)
{
try {
parent::__construct($dsn, (string) $user, (string) $password, (array) $options);
$this->setAttribute(PDO::ATTR_STATEMENT_CLASS, [PDOStatement::class, []]);
$this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (\PDOException $exception) {
throw new PDOException($exception);
}
}
/**
* {@inheritdoc}
*/
public function exec($statement)
{
try {
return parent::exec($statement);
} catch (\PDOException $exception) {
throw new PDOException($exception);
}
}
/**
* {@inheritdoc}
*/
public function getServerVersion()
{
Arguments
"SQLSTATE[HY000] [2002] Connection refused"
/home/armleasing.am/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php
use function func_get_args;
/**
* PDO implementation of the Connection interface.
* Used by all PDO-based drivers.
*/
class PDOConnection extends PDO implements Connection, ServerInfoAwareConnection
{
/**
* @param string $dsn
* @param string|null $user
* @param string|null $password
* @param mixed[]|null $options
*
* @throws PDOException In case of an error.
*/
public function __construct($dsn, $user = null, $password = null, ?array $options = null)
{
try {
parent::__construct($dsn, (string) $user, (string) $password, (array) $options);
$this->setAttribute(PDO::ATTR_STATEMENT_CLASS, [PDOStatement::class, []]);
$this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (\PDOException $exception) {
throw new PDOException($exception);
}
}
/**
* {@inheritdoc}
*/
public function exec($statement)
{
try {
return parent::exec($statement);
} catch (\PDOException $exception) {
throw new PDOException($exception);
}
}
/**
Arguments
"SQLSTATE[HY000] [2002] Connection refused"
/home/armleasing.am/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php
use function func_get_args;
/**
* PDO implementation of the Connection interface.
* Used by all PDO-based drivers.
*/
class PDOConnection extends PDO implements Connection, ServerInfoAwareConnection
{
/**
* @param string $dsn
* @param string|null $user
* @param string|null $password
* @param mixed[]|null $options
*
* @throws PDOException In case of an error.
*/
public function __construct($dsn, $user = null, $password = null, ?array $options = null)
{
try {
parent::__construct($dsn, (string) $user, (string) $password, (array) $options);
$this->setAttribute(PDO::ATTR_STATEMENT_CLASS, [PDOStatement::class, []]);
$this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (\PDOException $exception) {
throw new PDOException($exception);
}
}
/**
* {@inheritdoc}
*/
public function exec($statement)
{
try {
return parent::exec($statement);
} catch (\PDOException $exception) {
throw new PDOException($exception);
}
}
/**
Arguments
"mysql:host=127.0.0.1;port=3306;dbname=arml_leasing"
"arml_user"
"Nimda_@26"
array:5 [
8 => 0
3 => 2
11 => 0
17 => false
20 => false
]
/home/armleasing.am/public_html/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php
} catch (Exception $e) {
return $this->tryAgainIfCausedByLostConnection(
$e, $dsn, $username, $password, $options
);
}
}
/**
* Create a new PDO connection instance.
*
* @param string $dsn
* @param string $username
* @param string $password
* @param array $options
* @return \PDO
*/
protected function createPdoConnection($dsn, $username, $password, $options)
{
if (class_exists(PDOConnection::class) && ! $this->isPersistentConnection($options)) {
return new PDOConnection($dsn, $username, $password, $options);
}
return new PDO($dsn, $username, $password, $options);
}
/**
* Determine if the connection is persistent.
*
* @param array $options
* @return bool
*/
protected function isPersistentConnection($options)
{
return isset($options[PDO::ATTR_PERSISTENT]) &&
$options[PDO::ATTR_PERSISTENT];
}
/**
* Handle an exception that occurred during connect execution.
*
Arguments
"mysql:host=127.0.0.1;port=3306;dbname=arml_leasing"
"arml_user"
"Nimda_@26"
array:5 [
8 => 0
3 => 2
11 => 0
17 => false
20 => false
]
/home/armleasing.am/public_html/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php
return isset($options[PDO::ATTR_PERSISTENT]) &&
$options[PDO::ATTR_PERSISTENT];
}
/**
* Handle an exception that occurred during connect execution.
*
* @param \Throwable $e
* @param string $dsn
* @param string $username
* @param string $password
* @param array $options
* @return \PDO
*
* @throws \Exception
*/
protected function tryAgainIfCausedByLostConnection(Throwable $e, $dsn, $username, $password, $options)
{
if ($this->causedByLostConnection($e)) {
return $this->createPdoConnection($dsn, $username, $password, $options);
}
throw $e;
}
/**
* Get the PDO options based on the configuration.
*
* @param array $config
* @return array
*/
public function getOptions(array $config)
{
$options = $config['options'] ?? [];
return array_diff_key($this->options, $options) + $options;
}
/**
* Get the default PDO connection options.
Arguments
"mysql:host=127.0.0.1;port=3306;dbname=arml_leasing"
"arml_user"
"Nimda_@26"
array:5 [
8 => 0
3 => 2
11 => 0
17 => false
20 => false
]
/home/armleasing.am/public_html/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php
* @param string $dsn
* @param array $config
* @param array $options
* @return \PDO
*
* @throws \Exception
*/
public function createConnection($dsn, array $config, array $options)
{
[$username, $password] = [
$config['username'] ?? null, $config['password'] ?? null,
];
try {
return $this->createPdoConnection(
$dsn, $username, $password, $options
);
} catch (Exception $e) {
return $this->tryAgainIfCausedByLostConnection(
$e, $dsn, $username, $password, $options
);
}
}
/**
* Create a new PDO connection instance.
*
* @param string $dsn
* @param string $username
* @param string $password
* @param array $options
* @return \PDO
*/
protected function createPdoConnection($dsn, $username, $password, $options)
{
if (class_exists(PDOConnection::class) && ! $this->isPersistentConnection($options)) {
return new PDOConnection($dsn, $username, $password, $options);
}
return new PDO($dsn, $username, $password, $options);
Arguments
Doctrine\DBAL\Driver\PDOException {#134
-errorCode: 2002
-sqlState: "HY000"
#message: "SQLSTATE[HY000] [2002] Connection refused"
#code: 2002
#file: "/home/armleasing.am/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php"
#line: 31
-previous: PDOException {#132
#message: "SQLSTATE[HY000] [2002] Connection refused"
#code: 2002
#file: "/home/armleasing.am/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php"
#line: 27
+errorInfo: array:3 [
0 => "HY000"
1 => 2002
2 => "Connection refused"
]
}
+errorInfo: array:3 [
0 => "HY000"
1 => 2002
2 => "Connection refused"
]
}
"mysql:host=127.0.0.1;port=3306;dbname=arml_leasing"
"arml_user"
"Nimda_@26"
array:5 [
8 => 0
3 => 2
11 => 0
17 => false
20 => false
]
/home/armleasing.am/public_html/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php
use PDO;
class MySqlConnector extends Connector implements ConnectorInterface
{
/**
* Establish a database connection.
*
* @param array $config
* @return \PDO
*/
public function connect(array $config)
{
$dsn = $this->getDsn($config);
$options = $this->getOptions($config);
// We need to grab the PDO options that should be used while making the brand
// new connection instance. The PDO options control various aspects of the
// connection's behavior, and some might be specified by the developers.
$connection = $this->createConnection($dsn, $config, $options);
if (! empty($config['database'])) {
$connection->exec("use `{$config['database']}`;");
}
$this->configureEncoding($connection, $config);
// Next, we will check to see if a timezone has been specified in this config
// and if it has we will issue a statement to modify the timezone with the
// database. Setting this DB timezone is an optional configuration item.
$this->configureTimezone($connection, $config);
$this->setModes($connection, $config);
return $connection;
}
/**
* Set the connection character set and collation.
*
Arguments
"mysql:host=127.0.0.1;port=3306;dbname=arml_leasing"
array:15 [
"driver" => "mysql"
"host" => "127.0.0.1"
"port" => "3306"
"database" => "arml_leasing"
"username" => "arml_user"
"password" => "Nimda_@26"
"unix_socket" => ""
"charset" => "utf8mb4"
"collation" => "utf8mb4_unicode_ci"
"prefix" => ""
"prefix_indexes" => true
"strict" => true
"engine" => null
"options" => []
"name" => "mysql"
]
array:5 [
8 => 0
3 => 2
11 => 0
17 => false
20 => false
]
/home/armleasing.am/public_html/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php
{
return array_key_exists('host', $config)
? $this->createPdoResolverWithHosts($config)
: $this->createPdoResolverWithoutHosts($config);
}
/**
* Create a new Closure that resolves to a PDO instance with a specific host or an array of hosts.
*
* @param array $config
* @return \Closure
*/
protected function createPdoResolverWithHosts(array $config)
{
return function () use ($config) {
foreach (Arr::shuffle($hosts = $this->parseHosts($config)) as $key => $host) {
$config['host'] = $host;
try {
return $this->createConnector($config)->connect($config);
} catch (PDOException $e) {
continue;
}
}
throw $e;
};
}
/**
* Parse the hosts configuration item into an array.
*
* @param array $config
* @return array
*
* @throws \InvalidArgumentException
*/
protected function parseHosts(array $config)
{
$hosts = Arr::wrap($config['host']);
Arguments
array:15 [
"driver" => "mysql"
"host" => "127.0.0.1"
"port" => "3306"
"database" => "arml_leasing"
"username" => "arml_user"
"password" => "Nimda_@26"
"unix_socket" => ""
"charset" => "utf8mb4"
"collation" => "utf8mb4_unicode_ci"
"prefix" => ""
"prefix_indexes" => true
"strict" => true
"engine" => null
"options" => []
"name" => "mysql"
]
/home/armleasing.am/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php
$this->doctrineConnection = new DoctrineConnection(array_filter([
'pdo' => $this->getPdo(),
'dbname' => $this->getDatabaseName(),
'driver' => $driver->getName(),
'serverVersion' => $this->getConfig('server_version'),
]), $driver);
}
return $this->doctrineConnection;
}
/**
* Get the current PDO connection.
*
* @return \PDO
*/
public function getPdo()
{
if ($this->pdo instanceof Closure) {
return $this->pdo = call_user_func($this->pdo);
}
return $this->pdo;
}
/**
* Get the current PDO connection parameter without executing any reconnect logic.
*
* @return \PDO|\Closure|null
*/
public function getRawPdo()
{
return $this->pdo;
}
/**
* Get the current PDO connection used for reading.
*
* @return \PDO
*/
/home/armleasing.am/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php
$this->doctrineConnection = new DoctrineConnection(array_filter([
'pdo' => $this->getPdo(),
'dbname' => $this->getDatabaseName(),
'driver' => $driver->getName(),
'serverVersion' => $this->getConfig('server_version'),
]), $driver);
}
return $this->doctrineConnection;
}
/**
* Get the current PDO connection.
*
* @return \PDO
*/
public function getPdo()
{
if ($this->pdo instanceof Closure) {
return $this->pdo = call_user_func($this->pdo);
}
return $this->pdo;
}
/**
* Get the current PDO connection parameter without executing any reconnect logic.
*
* @return \PDO|\Closure|null
*/
public function getRawPdo()
{
return $this->pdo;
}
/**
* Get the current PDO connection used for reading.
*
* @return \PDO
*/
Arguments
/home/armleasing.am/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php
/**
* Get the current PDO connection used for reading.
*
* @return \PDO
*/
public function getReadPdo()
{
if ($this->transactions > 0) {
return $this->getPdo();
}
if ($this->recordsModified && $this->getConfig('sticky')) {
return $this->getPdo();
}
if ($this->readPdo instanceof Closure) {
return $this->readPdo = call_user_func($this->readPdo);
}
return $this->readPdo ?: $this->getPdo();
}
/**
* Get the current read PDO connection parameter without executing any reconnect logic.
*
* @return \PDO|\Closure|null
*/
public function getRawReadPdo()
{
return $this->readPdo;
}
/**
* Set the PDO connection.
*
* @param \PDO|\Closure|null $pdo
* @return $this
*/
public function setPdo($pdo)
{
/home/armleasing.am/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php
protected function prepared(PDOStatement $statement)
{
$statement->setFetchMode($this->fetchMode);
$this->event(new StatementPrepared(
$this, $statement
));
return $statement;
}
/**
* Get the PDO connection to use for a select query.
*
* @param bool $useReadPdo
* @return \PDO
*/
protected function getPdoForSelect($useReadPdo = true)
{
return $useReadPdo ? $this->getReadPdo() : $this->getPdo();
}
/**
* Run an insert statement against the database.
*
* @param string $query
* @param array $bindings
* @return bool
*/
public function insert($query, $bindings = [])
{
return $this->statement($query, $bindings);
}
/**
* Run an update statement against the database.
*
* @param string $query
* @param array $bindings
* @return int
/home/armleasing.am/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php
/**
* Run a select statement against the database.
*
* @param string $query
* @param array $bindings
* @param bool $useReadPdo
* @return array
*/
public function select($query, $bindings = [], $useReadPdo = true)
{
return $this->run($query, $bindings, function ($query, $bindings) use ($useReadPdo) {
if ($this->pretending()) {
return [];
}
// For select statements, we'll simply execute the query and return an array
// of the database result set. Each element in the array will be a single
// row from the database table, and will either be an array or objects.
$statement = $this->prepared(
$this->getPdoForSelect($useReadPdo)->prepare($query)
);
$this->bindValues($statement, $this->prepareBindings($bindings));
$statement->execute();
return $statement->fetchAll();
});
}
/**
* Run a select statement against the database and returns a generator.
*
* @param string $query
* @param array $bindings
* @param bool $useReadPdo
* @return \Generator
*/
public function cursor($query, $bindings = [], $useReadPdo = true)
{
Arguments
/home/armleasing.am/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php
return $result;
}
/**
* Run a SQL statement.
*
* @param string $query
* @param array $bindings
* @param \Closure $callback
* @return mixed
*
* @throws \Illuminate\Database\QueryException
*/
protected function runQueryCallback($query, $bindings, Closure $callback)
{
// To execute the statement, we'll simply call the callback, which will actually
// run the SQL against the PDO connection. Then we can calculate the time it
// took to execute and log the query SQL, bindings and time in our memory.
try {
$result = $callback($query, $bindings);
}
// If an exception occurs when attempting to run a query, we'll format the error
// message to include the bindings with SQL, which will make this exception a
// lot more helpful to the developer instead of just the database's errors.
catch (Exception $e) {
throw new QueryException(
$query, $this->prepareBindings($bindings), $e
);
}
return $result;
}
/**
* Log a query in the connection's query log.
*
* @param string $query
* @param array $bindings
* @param float|null $time
Arguments
"select * from information_schema.tables where table_schema = ? and table_name = ? and table_type = 'BASE TABLE'"
array:2 [
0 => "arml_leasing"
1 => "languages"
]
/home/armleasing.am/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php
);
}
/**
* Handle a query exception that occurred during query execution.
*
* @param \Illuminate\Database\QueryException $e
* @param string $query
* @param array $bindings
* @param \Closure $callback
* @return mixed
*
* @throws \Illuminate\Database\QueryException
*/
protected function tryAgainIfCausedByLostConnection(QueryException $e, $query, $bindings, Closure $callback)
{
if ($this->causedByLostConnection($e->getPrevious())) {
$this->reconnect();
return $this->runQueryCallback($query, $bindings, $callback);
}
throw $e;
}
/**
* Reconnect to the database.
*
* @return void
*
* @throws \LogicException
*/
public function reconnect()
{
if (is_callable($this->reconnector)) {
$this->doctrineConnection = null;
return call_user_func($this->reconnector, $this);
}
Arguments
"select * from information_schema.tables where table_schema = ? and table_name = ? and table_type = 'BASE TABLE'"
array:2 [
0 => "arml_leasing"
1 => "languages"
]
Closure($query, $bindings) {#124 …4}
/home/armleasing.am/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php
/**
* Handle a query exception.
*
* @param \Illuminate\Database\QueryException $e
* @param string $query
* @param array $bindings
* @param \Closure $callback
* @return mixed
*
* @throws \Illuminate\Database\QueryException
*/
protected function handleQueryException(QueryException $e, $query, $bindings, Closure $callback)
{
if ($this->transactions >= 1) {
throw $e;
}
return $this->tryAgainIfCausedByLostConnection(
$e, $query, $bindings, $callback
);
}
/**
* Handle a query exception that occurred during query execution.
*
* @param \Illuminate\Database\QueryException $e
* @param string $query
* @param array $bindings
* @param \Closure $callback
* @return mixed
*
* @throws \Illuminate\Database\QueryException
*/
protected function tryAgainIfCausedByLostConnection(QueryException $e, $query, $bindings, Closure $callback)
{
if ($this->causedByLostConnection($e->getPrevious())) {
$this->reconnect();
return $this->runQueryCallback($query, $bindings, $callback);
Arguments
Illuminate\Database\QueryException {#125
#sql: "select * from information_schema.tables where table_schema = ? and table_name = ? and table_type = 'BASE TABLE'"
#bindings: array:2 [
0 => "arml_leasing"
1 => "languages"
]
#message: "SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_schema.tables where table_schema = arml_leasing and table_name = languages and table_type = 'BASE TABLE')"
#code: 2002
#file: "/home/armleasing.am/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php"
#line: 671
-previous: Doctrine\DBAL\Driver\PDOException {#130
-errorCode: 2002
-sqlState: "HY000"
#message: "SQLSTATE[HY000] [2002] Connection refused"
#code: 2002
#file: "/home/armleasing.am/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php"
#line: 31
-previous: PDOException {#129
#message: "SQLSTATE[HY000] [2002] Connection refused"
#code: 2002
#file: "/home/armleasing.am/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php"
#line: 27
+errorInfo: array:3 [
0 => "HY000"
1 => 2002
2 => "Connection refused"
]
}
+errorInfo: array:3 [
0 => "HY000"
1 => 2002
2 => "Connection refused"
]
}
+errorInfo: array:3 [
0 => "HY000"
1 => 2002
2 => "Connection refused"
]
}
"select * from information_schema.tables where table_schema = ? and table_name = ? and table_type = 'BASE TABLE'"
array:2 [
0 => "arml_leasing"
1 => "languages"
]
Closure($query, $bindings) {#124 …4}
/home/armleasing.am/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php
* @param array $bindings
* @param \Closure $callback
* @return mixed
*
* @throws \Illuminate\Database\QueryException
*/
protected function run($query, $bindings, Closure $callback)
{
$this->reconnectIfMissingConnection();
$start = microtime(true);
// Here we will run this query. If an exception occurs we'll determine if it was
// caused by a connection that has been lost. If that is the cause, we'll try
// to re-establish connection and re-run the query with a fresh connection.
try {
$result = $this->runQueryCallback($query, $bindings, $callback);
} catch (QueryException $e) {
$result = $this->handleQueryException(
$e, $query, $bindings, $callback
);
}
// Once we have run the query we will calculate the time that it took to run and
// then log the query, bindings, and execution time so we will report them on
// the event that the developer needs them. We'll log time in milliseconds.
$this->logQuery(
$query, $bindings, $this->getElapsedTime($start)
);
return $result;
}
/**
* Run a SQL statement.
*
* @param string $query
* @param array $bindings
* @param \Closure $callback
* @return mixed
Arguments
Illuminate\Database\QueryException {#125
#sql: "select * from information_schema.tables where table_schema = ? and table_name = ? and table_type = 'BASE TABLE'"
#bindings: array:2 [
0 => "arml_leasing"
1 => "languages"
]
#message: "SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_schema.tables where table_schema = arml_leasing and table_name = languages and table_type = 'BASE TABLE')"
#code: 2002
#file: "/home/armleasing.am/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php"
#line: 671
-previous: Doctrine\DBAL\Driver\PDOException {#130
-errorCode: 2002
-sqlState: "HY000"
#message: "SQLSTATE[HY000] [2002] Connection refused"
#code: 2002
#file: "/home/armleasing.am/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php"
#line: 31
-previous: PDOException {#129
#message: "SQLSTATE[HY000] [2002] Connection refused"
#code: 2002
#file: "/home/armleasing.am/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php"
#line: 27
+errorInfo: array:3 [
0 => "HY000"
1 => 2002
2 => "Connection refused"
]
}
+errorInfo: array:3 [
0 => "HY000"
1 => 2002
2 => "Connection refused"
]
}
+errorInfo: array:3 [
0 => "HY000"
1 => 2002
2 => "Connection refused"
]
}
"select * from information_schema.tables where table_schema = ? and table_name = ? and table_type = 'BASE TABLE'"
array:2 [
0 => "arml_leasing"
1 => "languages"
]
Closure($query, $bindings) {#124 …4}
/home/armleasing.am/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php
public function select($query, $bindings = [], $useReadPdo = true)
{
return $this->run($query, $bindings, function ($query, $bindings) use ($useReadPdo) {
if ($this->pretending()) {
return [];
}
// For select statements, we'll simply execute the query and return an array
// of the database result set. Each element in the array will be a single
// row from the database table, and will either be an array or objects.
$statement = $this->prepared(
$this->getPdoForSelect($useReadPdo)->prepare($query)
);
$this->bindValues($statement, $this->prepareBindings($bindings));
$statement->execute();
return $statement->fetchAll();
});
}
/**
* Run a select statement against the database and returns a generator.
*
* @param string $query
* @param array $bindings
* @param bool $useReadPdo
* @return \Generator
*/
public function cursor($query, $bindings = [], $useReadPdo = true)
{
$statement = $this->run($query, $bindings, function ($query, $bindings) use ($useReadPdo) {
if ($this->pretending()) {
return [];
}
// First we will create a statement for the query. Then, we will set the fetch
// mode and prepare the bindings for the query. Once that's done we will be
// ready to execute the query against the database and return the cursor.
Arguments
"select * from information_schema.tables where table_schema = ? and table_name = ? and table_type = 'BASE TABLE'"
array:2 [
0 => "arml_leasing"
1 => "languages"
]
Closure($query, $bindings) {#124 …4}
/home/armleasing.am/public_html/vendor/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php
<?php
namespace Illuminate\Database\Schema;
class MySqlBuilder extends Builder
{
/**
* Determine if the given table exists.
*
* @param string $table
* @return bool
*/
public function hasTable($table)
{
$table = $this->connection->getTablePrefix().$table;
return count($this->connection->select(
$this->grammar->compileTableExists(), [$this->connection->getDatabaseName(), $table]
)) > 0;
}
/**
* Get the column listing for a given table.
*
* @param string $table
* @return array
*/
public function getColumnListing($table)
{
$table = $this->connection->getTablePrefix().$table;
$results = $this->connection->select(
$this->grammar->compileColumnListing(), [$this->connection->getDatabaseName(), $table]
);
return $this->connection->getPostProcessor()->processColumnListing($results);
}
/**
* Drop all tables from the database.
Arguments
"select * from information_schema.tables where table_schema = ? and table_name = ? and table_type = 'BASE TABLE'"
array:2 [
0 => "arml_leasing"
1 => "languages"
]
/home/armleasing.am/public_html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php
}
/**
* Handle dynamic, static calls to the object.
*
* @param string $method
* @param array $args
* @return mixed
*
* @throws \RuntimeException
*/
public static function __callStatic($method, $args)
{
$instance = static::getFacadeRoot();
if (! $instance) {
throw new RuntimeException('A facade root has not been set.');
}
return $instance->$method(...$args);
}
}
Arguments
/home/armleasing.am/public_html/vendor/codemanstudio/codeman-admin/src/AdminServiceProvider.php
View::composer('layouts.app', function ($view) {
$settings = Setting::pluck('value', 'key');
$admin_modules = null;
if(auth()->check() && (auth()->user()->hasRole('SuperAdmin') || auth()->user()->hasRole('Admin')))
{
$admin_modules = Module::where('module_type', 'module')->orderBy('order','DESC')->get();
}
$view->with([
'settings' => $settings,
'admin_modules' => $admin_modules
]);
});
}
public function register()
{
if (Schema::hasTable('languages')) {
$langs = DB::table('languages')->select('code', 'name', 'script', 'native', 'regional')->orderBy('order')->get()->keyBy('code');
// config(['app.locale' => 'en']);
if(count($langs) > 0){
$def_lang = $langs->first()->code;
config(['app.locale' => $def_lang]);
}
$locales = [];
foreach($langs as $key => $val){
$locales[$key] = (array) $val;
}
if(count($locales) > 0){
config([
'laravellocalization.supportedLocales' => $locales,
'laravellocalization.useAcceptLanguageHeader' => true,
'laravellocalization.hideDefaultLocaleInURL' => true
]);
}
Arguments
"hasTable"
array:1 [
0 => "languages"
]
/home/armleasing.am/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php
* Register a service provider with the application.
*
* @param \Illuminate\Support\ServiceProvider|string $provider
* @param bool $force
* @return \Illuminate\Support\ServiceProvider
*/
public function register($provider, $force = false)
{
if (($registered = $this->getProvider($provider)) && ! $force) {
return $registered;
}
// If the given "provider" is a string, we will resolve it, passing in the
// application instance automatically for the developer. This is simply
// a more convenient way of specifying your service provider classes.
if (is_string($provider)) {
$provider = $this->resolveProvider($provider);
}
$provider->register();
// If there are bindings / singletons set as properties on the provider we
// will spin through them and register them with the application, which
// serves as a convenience layer while registering a lot of bindings.
if (property_exists($provider, 'bindings')) {
foreach ($provider->bindings as $key => $value) {
$this->bind($key, $value);
}
}
if (property_exists($provider, 'singletons')) {
foreach ($provider->singletons as $key => $value) {
$this->singleton($key, $value);
}
}
$this->markAsRegistered($provider);
// If the application has already booted, we will call this boot method on
// the provider class so it has an opportunity to do its boot logic and
/home/armleasing.am/public_html/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php
// First we will load the service manifest, which contains information on all
// service providers registered with the application and which services it
// provides. This is used to know which services are "deferred" loaders.
if ($this->shouldRecompile($manifest, $providers)) {
$manifest = $this->compileManifest($providers);
}
// Next, we will register events to load the providers for each of the events
// that it has requested. This allows the service provider to defer itself
// while still getting automatically loaded when a certain event occurs.
foreach ($manifest['when'] as $provider => $events) {
$this->registerLoadEvents($provider, $events);
}
// We will go ahead and register all of the eagerly loaded providers with the
// application so their services can be registered with the application as
// a provided service. Then we will set the deferred service list on it.
foreach ($manifest['eager'] as $provider) {
$this->app->register($provider);
}
$this->app->addDeferredServices($manifest['deferred']);
}
/**
* Load the service provider manifest JSON file.
*
* @return array|null
*/
public function loadManifest()
{
// The service manifest is a file containing a JSON representation of every
// service provided by the application and whether its provider is using
// deferred loading or should be eagerly loaded on each request to us.
if ($this->files->exists($this->manifestPath)) {
$manifest = $this->files->getRequire($this->manifestPath);
if ($manifest) {
return array_merge(['when' => []], $manifest);
Arguments
Codeman\Admin\AdminServiceProvider {#114}
/home/armleasing.am/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php
{
return $this['env'] === 'testing';
}
/**
* Register all of the configured providers.
*
* @return void
*/
public function registerConfiguredProviders()
{
$providers = Collection::make($this->config['app.providers'])
->partition(function ($provider) {
return strpos($provider, 'Illuminate\\') === 0;
});
$providers->splice(1, 0, [$this->make(PackageManifest::class)->providers()]);
(new ProviderRepository($this, new Filesystem, $this->getCachedServicesPath()))
->load($providers->collapse()->toArray());
}
/**
* Register a service provider with the application.
*
* @param \Illuminate\Support\ServiceProvider|string $provider
* @param bool $force
* @return \Illuminate\Support\ServiceProvider
*/
public function register($provider, $force = false)
{
if (($registered = $this->getProvider($provider)) && ! $force) {
return $registered;
}
// If the given "provider" is a string, we will resolve it, passing in the
// application instance automatically for the developer. This is simply
// a more convenient way of specifying your service provider classes.
if (is_string($provider)) {
$provider = $this->resolveProvider($provider);
Arguments
array:47 [
0 => "Illuminate\Auth\AuthServiceProvider"
1 => "Illuminate\Broadcasting\BroadcastServiceProvider"
2 => "Illuminate\Bus\BusServiceProvider"
3 => "Illuminate\Cache\CacheServiceProvider"
4 => "Illuminate\Foundation\Providers\ConsoleSupportServiceProvider"
5 => "Illuminate\Cookie\CookieServiceProvider"
6 => "Illuminate\Database\DatabaseServiceProvider"
7 => "Illuminate\Encryption\EncryptionServiceProvider"
8 => "Illuminate\Filesystem\FilesystemServiceProvider"
9 => "Illuminate\Foundation\Providers\FoundationServiceProvider"
10 => "Illuminate\Hashing\HashServiceProvider"
11 => "Illuminate\Mail\MailServiceProvider"
12 => "Illuminate\Notifications\NotificationServiceProvider"
13 => "Illuminate\Pagination\PaginationServiceProvider"
14 => "Illuminate\Pipeline\PipelineServiceProvider"
15 => "Illuminate\Queue\QueueServiceProvider"
16 => "Illuminate\Redis\RedisServiceProvider"
17 => "Illuminate\Auth\Passwords\PasswordResetServiceProvider"
18 => "Illuminate\Session\SessionServiceProvider"
19 => "Illuminate\Translation\TranslationServiceProvider"
20 => "Illuminate\Validation\ValidationServiceProvider"
21 => "Illuminate\View\ViewServiceProvider"
22 => "Artisaninweb\SoapWrapper\ServiceProvider"
23 => "Barryvdh\TranslationManager\ManagerServiceProvider"
24 => "Codeman\Admin\AdminServiceProvider"
25 => "Codeman\Admin\Menu\MenuServiceProvider"
26 => "Facade\Ignition\IgnitionServiceProvider"
27 => "Fideloper\Proxy\TrustedProxyServiceProvider"
28 => "Fruitcake\Cors\CorsServiceProvider"
29 => "Intervention\Image\ImageServiceProvider"
30 => "Laravel\Tinker\TinkerServiceProvider"
31 => "Laravel\Ui\UiServiceProvider"
32 => "Collective\Html\HtmlServiceProvider"
33 => "Laravolt\Avatar\ServiceProvider"
34 => "Mcamara\LaravelLocalization\LaravelLocalizationServiceProvider"
35 => "Carbon\Laravel\ServiceProvider"
36 => "NunoMaduro\Collision\Adapters\Laravel\CollisionServiceProvider"
37 => "Oriceon\Settings\SettingsServiceProvider"
38 => "Proengsoft\JsValidation\JsValidationServiceProvider"
39 => "Spatie\Permission\PermissionServiceProvider"
40 => "Spatie\Sitemap\SitemapServiceProvider"
41 => "Tanmuhittin\LaravelGoogleTranslate\LaravelGoogleTranslateServiceProvider"
42 => "Artisaninweb\SoapWrapper\ServiceProvider"
43 => "App\Providers\AppServiceProvider"
44 => "App\Providers\AuthServiceProvider"
45 => "App\Providers\EventServiceProvider"
46 => "App\Providers\RouteServiceProvider"
]
/home/armleasing.am/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php
<?php
namespace Illuminate\Foundation\Bootstrap;
use Illuminate\Contracts\Foundation\Application;
class RegisterProviders
{
/**
* Bootstrap the given application.
*
* @param \Illuminate\Contracts\Foundation\Application $app
* @return void
*/
public function bootstrap(Application $app)
{
$app->registerConfiguredProviders();
}
}
/home/armleasing.am/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php
{
$this->register(new EventServiceProvider($this));
$this->register(new LogServiceProvider($this));
$this->register(new RoutingServiceProvider($this));
}
/**
* Run the given array of bootstrap classes.
*
* @param string[] $bootstrappers
* @return void
*/
public function bootstrapWith(array $bootstrappers)
{
$this->hasBeenBootstrapped = true;
foreach ($bootstrappers as $bootstrapper) {
$this['events']->dispatch('bootstrapping: '.$bootstrapper, [$this]);
$this->make($bootstrapper)->bootstrap($this);
$this['events']->dispatch('bootstrapped: '.$bootstrapper, [$this]);
}
}
/**
* Register a callback to run after loading the environment.
*
* @param \Closure $callback
* @return void
*/
public function afterLoadingEnvironment(Closure $callback)
{
return $this->afterBootstrapping(
LoadEnvironmentVariables::class, $callback
);
}
/**
* Register a callback to run before a bootstrapper.
Arguments
Illuminate\Foundation\Application {#2}
/home/armleasing.am/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php
Facade::clearResolvedInstance('request');
$this->bootstrap();
return (new Pipeline($this->app))
->send($request)
->through($this->app->shouldSkipMiddleware() ? [] : $this->middleware)
->then($this->dispatchToRouter());
}
/**
* Bootstrap the application for HTTP requests.
*
* @return void
*/
public function bootstrap()
{
if (! $this->app->hasBeenBootstrapped()) {
$this->app->bootstrapWith($this->bootstrappers());
}
}
/**
* Get the route dispatcher callback.
*
* @return \Closure
*/
protected function dispatchToRouter()
{
return function ($request) {
$this->app->instance('request', $request);
return $this->router->dispatch($request);
};
}
/**
* Call the terminate method on any terminable middleware.
*
Arguments
array:6 [
0 => "Illuminate\Foundation\Bootstrap\LoadEnvironmentVariables"
1 => "Illuminate\Foundation\Bootstrap\LoadConfiguration"
2 => "Illuminate\Foundation\Bootstrap\HandleExceptions"
3 => "Illuminate\Foundation\Bootstrap\RegisterFacades"
4 => "Illuminate\Foundation\Bootstrap\RegisterProviders"
5 => "Illuminate\Foundation\Bootstrap\BootProviders"
]
/home/armleasing.am/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php
$this->app['events']->dispatch(
new RequestHandled($request, $response)
);
return $response;
}
/**
* Send the given request through the middleware / router.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
protected function sendRequestThroughRouter($request)
{
$this->app->instance('request', $request);
Facade::clearResolvedInstance('request');
$this->bootstrap();
return (new Pipeline($this->app))
->send($request)
->through($this->app->shouldSkipMiddleware() ? [] : $this->middleware)
->then($this->dispatchToRouter());
}
/**
* Bootstrap the application for HTTP requests.
*
* @return void
*/
public function bootstrap()
{
if (! $this->app->hasBeenBootstrapped()) {
$this->app->bootstrapWith($this->bootstrappers());
}
}
/**
/home/armleasing.am/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php
public function __construct(Application $app, Router $router)
{
$this->app = $app;
$this->router = $router;
$this->syncMiddlewareToRouter();
}
/**
* Handle an incoming HTTP request.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function handle($request)
{
try {
$request->enableHttpMethodParameterOverride();
$response = $this->sendRequestThroughRouter($request);
} catch (Throwable $e) {
$this->reportException($e);
$response = $this->renderException($request, $e);
}
$this->app['events']->dispatch(
new RequestHandled($request, $response)
);
return $response;
}
/**
* Send the given request through the middleware / router.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
protected function sendRequestThroughRouter($request)
Arguments
Illuminate\Http\Request {#43
#json: null
#convertedFiles: null
#userResolver: null
#routeResolver: null
+attributes: Symfony\Component\HttpFoundation\ParameterBag {#45}
+request: Symfony\Component\HttpFoundation\ParameterBag {#51}
+query: Symfony\Component\HttpFoundation\ParameterBag {#51}
+server: Symfony\Component\HttpFoundation\ServerBag {#47}
+files: Symfony\Component\HttpFoundation\FileBag {#48}
+cookies: Symfony\Component\HttpFoundation\ParameterBag {#46}
+headers: Symfony\Component\HttpFoundation\HeaderBag {#49}
#content: null
#languages: null
#charsets: null
#encodings: null
#acceptableContentTypes: array:1 [
0 => "*/*"
]
#pathInfo: null
#requestUri: null
#baseUrl: null
#basePath: null
#method: null
#format: null
#session: null
#locale: null
#defaultLocale: "en"
-preferredFormat: null
-isHostValid: true
-isForwardedValid: true
pathInfo: "/hy/blog"
requestUri: "/hy/blog"
baseUrl: ""
basePath: ""
method: "GET"
format: "html"
}
/home/armleasing.am/public_html/public/index.php
*/
$app = require_once __DIR__.'/../bootstrap/app.php';
/*
|--------------------------------------------------------------------------
| Run The Application
|--------------------------------------------------------------------------
|
| Once we have the application, we can handle the incoming request
| through the kernel, and send the associated response back to
| the client's browser allowing them to enjoy the creative
| and wonderful application we have prepared for them.
|
*/
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);
$response->send();
$kernel->terminate($request, $response);
Arguments
Illuminate\Http\Request {#43
#json: null
#convertedFiles: null
#userResolver: null
#routeResolver: null
+attributes: Symfony\Component\HttpFoundation\ParameterBag {#45}
+request: Symfony\Component\HttpFoundation\ParameterBag {#51}
+query: Symfony\Component\HttpFoundation\ParameterBag {#51}
+server: Symfony\Component\HttpFoundation\ServerBag {#47}
+files: Symfony\Component\HttpFoundation\FileBag {#48}
+cookies: Symfony\Component\HttpFoundation\ParameterBag {#46}
+headers: Symfony\Component\HttpFoundation\HeaderBag {#49}
#content: null
#languages: null
#charsets: null
#encodings: null
#acceptableContentTypes: array:1 [
0 => "*/*"
]
#pathInfo: null
#requestUri: null
#baseUrl: null
#basePath: null
#method: null
#format: null
#session: null
#locale: null
#defaultLocale: "en"
-preferredFormat: null
-isHostValid: true
-isForwardedValid: true
pathInfo: "/hy/blog"
requestUri: "/hy/blog"
baseUrl: ""
basePath: ""
method: "GET"
format: "html"
}