Flarum\Database\Migration::renameTable PHP Method

renameTable() public static method

Rename a table.
public static renameTable ( $from, $to )
    public static function renameTable($from, $to)
    {
        return ['up' => function (Builder $schema) use($from, $to) {
            $schema->rename($from, $to);
        }, 'down' => function (Builder $schema) use($from, $to) {
            $schema->rename($to, $from);
        }];
    }

Usage Example

<?php

/*
 * This file is part of Flarum.
 *
 * (c) Toby Zerner <*****@*****.**>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
use Flarum\Database\Migration;
return Migration::renameTable('config', 'settings');