Showing mysql error for DB class in laravel - development

Showing mysql error for DB class in laravel

this example code that works with database:

    $status = DB::table('post')->where('id', 2)->update([
        'title' => 'new title',
        'content' => 'new content'
    ]);

think $status = false means there was an problem in updating action. How can I show mysql error for DB class ?



from Laravel Questions and Answers https://laravelquestions.com/php/showing-mysql-error-for-db-class-in-laravel/
via Lzo Media

Comments

Popular posts from this blog

ng-show doesn’t work correct with value boolean

ng-include of inline SVG does not display gradient except in Chrome

Using PHP and MySQL data to generate PDF letters like in MS Word mailmerge functionality - development