stdClass Object ( [id] => 151 [name] => Masjid Izzul Allawi [email] => mia@app.com [phone] => 6281224992721 [password] => $2y$12$SsQYng1rEHnbmwpB1zjCIOFfUgbSNi8nQY7ZnQf.zeM2O9Y2.P5Wa [role] => inkubator [status] => active [created_at] => 2026-03-27 09:38:36.688491 ) SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "masjid" does not exist LINE 1: select * from "masjid" where "user_id" = $1 limit 1 ^ (Connection: pgsql, SQL: select * from "masjid" where "user_id" = 151 limit 1) (500 Internal Server Error)

Symfony Exception

PDOException QueryException

HTTP 500 Internal Server Error

SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "masjid" does not exist
LINE 1: select * from "masjid" where "user_id" = $1 limit 1
^ (Connection: pgsql, SQL: select * from "masjid" where "user_id" = 151 limit 1)

Exceptions 2

Illuminate\Database\ QueryException

Show exception properties
Illuminate\Database\QueryException {#60
  +errorInfo: array:3 [
    0 => "42P01"
    1 => 7
    2 => """
      ERROR:  relation "masjid" does not exist\n
      LINE 1: select * from "masjid" where "user_id" = $1 limit 1\n
                            ^
      """
  ]
  +connectionName: "pgsql"
  #sql: "select * from "masjid" where "user_id" = ? limit 1"
  #bindings: array:1 [
    0 => 151
  ]
}
  1. throw new UniqueConstraintViolationException(
  2. $this->getName(), $query, $this->prepareBindings($bindings), $e
  3. );
  4. }
  5. throw new QueryException(
  6. $this->getName(), $query, $this->prepareBindings($bindings), $e
  7. );
  8. }
  9. }
  1. // Here we will run this query. If an exception occurs we'll determine if it was
  2. // caused by a connection that has been lost. If that is the cause, we'll try
  3. // to re-establish connection and re-run the query with a fresh connection.
  4. try {
  5. $result = $this->runQueryCallback($query, $bindings, $callback);
  6. } catch (QueryException $e) {
  7. $result = $this->handleQueryException(
  8. $e, $query, $bindings, $callback
  9. );
  10. }
  1. * @param bool $useReadPdo
  2. * @return array
  3. */
  4. public function select($query, $bindings = [], $useReadPdo = true)
  5. {
  6. return $this->run($query, $bindings, function ($query, $bindings) use ($useReadPdo) {
  7. if ($this->pretending()) {
  8. return [];
  9. }
  10. // For select statements, we'll simply execute the query and return an array
  1. *
  2. * @return array
  3. */
  4. protected function runSelect()
  5. {
  6. return $this->connection->select(
  7. $this->toSql(), $this->getBindings(), ! $this->useWritePdo
  8. );
  9. }
  10. /**
  1. * @return \Illuminate\Support\Collection
  2. */
  3. public function get($columns = ['*'])
  4. {
  5. return collect($this->onceWithColumns(Arr::wrap($columns), function () {
  6. return $this->processor->processSelect($this, $this->runSelect());
  7. }));
  8. }
  9. /**
  10. * Run the query as a "select" statement against the connection.
in /home/vzizxmil/public_html/banyal-connect-api/vendor/illuminate/database/Query/Builder.php -> {closure:Illuminate\Database\Query\Builder::get():2901} (line 3456)
  1. if (is_null($original)) {
  2. $this->columns = $columns;
  3. }
  4. $result = $callback();
  5. $this->columns = $original;
  6. return $result;
  7. }
  1. * @param array|string $columns
  2. * @return \Illuminate\Support\Collection
  3. */
  4. public function get($columns = ['*'])
  5. {
  6. return collect($this->onceWithColumns(Arr::wrap($columns), function () {
  7. return $this->processor->processSelect($this, $this->runSelect());
  8. }));
  9. }
  10. /**
  1. * @param array|string $columns
  2. * @return \Illuminate\Database\Eloquent\Model|object|static|null
  3. */
  4. public function first($columns = ['*'])
  5. {
  6. return $this->take(1)->get($columns)->first();
  7. }
  8. /**
  9. * Execute the query and get the first result if it's the sole matching record.
  10. *
  1. <?php
  2. require 'vendor/autoload.php';
  3. $app = require 'bootstrap/app.php';
  4. $user = Illuminate\Support\Facades\DB::table('users')->where('id', 151)->first();
  5. print_r($user);
  6. $masjid = Illuminate\Support\Facades\DB::table('masjid')->where('user_id', 151)->first();
  7. print_r($masjid);

PDOException

SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "masjid" does not exist LINE 1: select * from "masjid" where "user_id" = $1 limit 1 ^

  1. $this->getPdoForSelect($useReadPdo)->prepare($query)
  2. );
  3. $this->bindValues($statement, $this->prepareBindings($bindings));
  4. $statement->execute();
  5. return $statement->fetchAll();
  6. });
  7. }
  1. $this->getPdoForSelect($useReadPdo)->prepare($query)
  2. );
  3. $this->bindValues($statement, $this->prepareBindings($bindings));
  4. $statement->execute();
  5. return $statement->fetchAll();
  6. });
  7. }
in /home/vzizxmil/public_html/banyal-connect-api/vendor/illuminate/database/Connection.php -> {closure:Illuminate\Database\Connection::select():414} (line 816)
  1. {
  2. // To execute the statement, we'll simply call the callback, which will actually
  3. // run the SQL against the PDO connection. Then we can calculate the time it
  4. // took to execute and log the query SQL, bindings and time in our memory.
  5. try {
  6. return $callback($query, $bindings);
  7. }
  8. // If an exception occurs when attempting to run a query, we'll format the error
  9. // message to include the bindings with SQL, which will make this exception a
  10. // lot more helpful to the developer instead of just the database's errors.
  1. // Here we will run this query. If an exception occurs we'll determine if it was
  2. // caused by a connection that has been lost. If that is the cause, we'll try
  3. // to re-establish connection and re-run the query with a fresh connection.
  4. try {
  5. $result = $this->runQueryCallback($query, $bindings, $callback);
  6. } catch (QueryException $e) {
  7. $result = $this->handleQueryException(
  8. $e, $query, $bindings, $callback
  9. );
  10. }
  1. * @param bool $useReadPdo
  2. * @return array
  3. */
  4. public function select($query, $bindings = [], $useReadPdo = true)
  5. {
  6. return $this->run($query, $bindings, function ($query, $bindings) use ($useReadPdo) {
  7. if ($this->pretending()) {
  8. return [];
  9. }
  10. // For select statements, we'll simply execute the query and return an array
  1. *
  2. * @return array
  3. */
  4. protected function runSelect()
  5. {
  6. return $this->connection->select(
  7. $this->toSql(), $this->getBindings(), ! $this->useWritePdo
  8. );
  9. }
  10. /**
  1. * @return \Illuminate\Support\Collection
  2. */
  3. public function get($columns = ['*'])
  4. {
  5. return collect($this->onceWithColumns(Arr::wrap($columns), function () {
  6. return $this->processor->processSelect($this, $this->runSelect());
  7. }));
  8. }
  9. /**
  10. * Run the query as a "select" statement against the connection.
in /home/vzizxmil/public_html/banyal-connect-api/vendor/illuminate/database/Query/Builder.php -> {closure:Illuminate\Database\Query\Builder::get():2901} (line 3456)
  1. if (is_null($original)) {
  2. $this->columns = $columns;
  3. }
  4. $result = $callback();
  5. $this->columns = $original;
  6. return $result;
  7. }
  1. * @param array|string $columns
  2. * @return \Illuminate\Support\Collection
  3. */
  4. public function get($columns = ['*'])
  5. {
  6. return collect($this->onceWithColumns(Arr::wrap($columns), function () {
  7. return $this->processor->processSelect($this, $this->runSelect());
  8. }));
  9. }
  10. /**
  1. * @param array|string $columns
  2. * @return \Illuminate\Database\Eloquent\Model|object|static|null
  3. */
  4. public function first($columns = ['*'])
  5. {
  6. return $this->take(1)->get($columns)->first();
  7. }
  8. /**
  9. * Execute the query and get the first result if it's the sole matching record.
  10. *
  1. <?php
  2. require 'vendor/autoload.php';
  3. $app = require 'bootstrap/app.php';
  4. $user = Illuminate\Support\Facades\DB::table('users')->where('id', 151)->first();
  5. print_r($user);
  6. $masjid = Illuminate\Support\Facades\DB::table('masjid')->where('user_id', 151)->first();
  7. print_r($masjid);

Stack Traces 2

[2/2] QueryException
Illuminate\Database\QueryException:
SQLSTATE[42P01]: Undefined table: 7 ERROR:  relation "masjid" does not exist
LINE 1: select * from "masjid" where "user_id" = $1 limit 1
                      ^ (Connection: pgsql, SQL: select * from "masjid" where "user_id" = 151 limit 1)

  at /home/vzizxmil/public_html/banyal-connect-api/vendor/illuminate/database/Connection.php:829
  at Illuminate\Database\Connection->runQueryCallback('select * from "masjid" where "user_id" = ? limit 1', array(151), object(Closure))
     (/home/vzizxmil/public_html/banyal-connect-api/vendor/illuminate/database/Connection.php:783)
  at Illuminate\Database\Connection->run('select * from "masjid" where "user_id" = ? limit 1', array(151), object(Closure))
     (/home/vzizxmil/public_html/banyal-connect-api/vendor/illuminate/database/Connection.php:414)
  at Illuminate\Database\Connection->select('select * from "masjid" where "user_id" = ? limit 1', array(151), true)
     (/home/vzizxmil/public_html/banyal-connect-api/vendor/illuminate/database/Query/Builder.php:2913)
  at Illuminate\Database\Query\Builder->runSelect()
     (/home/vzizxmil/public_html/banyal-connect-api/vendor/illuminate/database/Query/Builder.php:2902)
  at Illuminate\Database\Query\Builder->{closure:Illuminate\Database\Query\Builder::get():2901}()
     (/home/vzizxmil/public_html/banyal-connect-api/vendor/illuminate/database/Query/Builder.php:3456)
  at Illuminate\Database\Query\Builder->onceWithColumns(array('*'), object(Closure))
     (/home/vzizxmil/public_html/banyal-connect-api/vendor/illuminate/database/Query/Builder.php:2901)
  at Illuminate\Database\Query\Builder->get(array('*'))
     (/home/vzizxmil/public_html/banyal-connect-api/vendor/illuminate/database/Concerns/BuildsQueries.php:333)
  at Illuminate\Database\Query\Builder->first()
     (/home/vzizxmil/public_html/banyal-connect-api/debug_masjid_fk.php:6)                
[1/2] PDOException
PDOException:
SQLSTATE[42P01]: Undefined table: 7 ERROR:  relation "masjid" does not exist
LINE 1: select * from "masjid" where "user_id" = $1 limit 1
                      ^

  at /home/vzizxmil/public_html/banyal-connect-api/vendor/illuminate/database/Connection.php:428
  at PDOStatement->execute()
     (/home/vzizxmil/public_html/banyal-connect-api/vendor/illuminate/database/Connection.php:428)
  at Illuminate\Database\Connection->{closure:Illuminate\Database\Connection::select():414}('select * from "masjid" where "user_id" = ? limit 1', array(151))
     (/home/vzizxmil/public_html/banyal-connect-api/vendor/illuminate/database/Connection.php:816)
  at Illuminate\Database\Connection->runQueryCallback('select * from "masjid" where "user_id" = ? limit 1', array(151), object(Closure))
     (/home/vzizxmil/public_html/banyal-connect-api/vendor/illuminate/database/Connection.php:783)
  at Illuminate\Database\Connection->run('select * from "masjid" where "user_id" = ? limit 1', array(151), object(Closure))
     (/home/vzizxmil/public_html/banyal-connect-api/vendor/illuminate/database/Connection.php:414)
  at Illuminate\Database\Connection->select('select * from "masjid" where "user_id" = ? limit 1', array(151), true)
     (/home/vzizxmil/public_html/banyal-connect-api/vendor/illuminate/database/Query/Builder.php:2913)
  at Illuminate\Database\Query\Builder->runSelect()
     (/home/vzizxmil/public_html/banyal-connect-api/vendor/illuminate/database/Query/Builder.php:2902)
  at Illuminate\Database\Query\Builder->{closure:Illuminate\Database\Query\Builder::get():2901}()
     (/home/vzizxmil/public_html/banyal-connect-api/vendor/illuminate/database/Query/Builder.php:3456)
  at Illuminate\Database\Query\Builder->onceWithColumns(array('*'), object(Closure))
     (/home/vzizxmil/public_html/banyal-connect-api/vendor/illuminate/database/Query/Builder.php:2901)
  at Illuminate\Database\Query\Builder->get(array('*'))
     (/home/vzizxmil/public_html/banyal-connect-api/vendor/illuminate/database/Concerns/BuildsQueries.php:333)
  at Illuminate\Database\Query\Builder->first()
     (/home/vzizxmil/public_html/banyal-connect-api/debug_masjid_fk.php:6)