Monday, March 5, 2018

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

No comments:

Post a Comment