Total Images: 20
ErrorException {#37 #severity: E_WARNING }
require __DIR__.'/vendor/autoload.php';$app = require __DIR__.'/bootstrap/app.php';$images = app('db')->table('product_images')->orderBy('id', 'desc')->limit(10)->get();echo "Total Images: " . count(app('db')->table('product_images')->get()) . "\n";foreach($images as $img) { echo "ID: {$img->id}, ProdID: {$img->product_id}, Image: {$img->image}\n";} protected function registerErrorHandling() { error_reporting(-1); set_error_handler(function ($level, $message, $file = '', $line = 0) { $this->handleError($level, $message, $file, $line); }); set_exception_handler(function ($e) { $this->handleException($e); });require __DIR__.'/vendor/autoload.php';$app = require __DIR__.'/bootstrap/app.php';$images = app('db')->table('product_images')->orderBy('id', 'desc')->limit(10)->get();echo "Total Images: " . count(app('db')->table('product_images')->get()) . "\n";foreach($images as $img) { echo "ID: {$img->id}, ProdID: {$img->product_id}, Image: {$img->image}\n";}|
ErrorException
|
|---|
ErrorException:
Undefined property: stdClass::$product_id
at /home/vzizxmil/public_html/banyal-connect-api/test_db4.php:7
at Laravel\Lumen\Application->handleError(2, 'Undefined property: stdClass::$product_id', '/home/vzizxmil/public_html/banyal-connect-api/test_db4.php', 7)
(/home/vzizxmil/public_html/banyal-connect-api/vendor/laravel/lumen-framework/src/Concerns/RegistersExceptionHandlers.php:47)
at Laravel\Lumen\Application->{closure:Laravel\Lumen\Concerns\RegistersExceptionHandlers::registerErrorHandling():46}(2, 'Undefined property: stdClass::$product_id', '/home/vzizxmil/public_html/banyal-connect-api/test_db4.php', 7)
(/home/vzizxmil/public_html/banyal-connect-api/test_db4.php:7)
|