Answers for "how to update database table columns in laravel"

PHP
3

laravel rename table

Schema::rename($currentTableName, $newTableName);
Posted by: Guest on September-15-2020
3

update column value laravel

$page = Page::find($id);

// Make sure you've got the Page model
if($page) {
    $page->image = 'imagepath';
    $page->save();
}
Posted by: Guest on May-07-2020

Code answers related to "how to update database table columns in laravel"

Browse Popular Code Answers by Language