Microweber\Providers\DatabaseManager::last_id PHP Method

last_id() public method

Get last id from a table.
public last_id ( $table ) : boolean | integer
$table
return boolean | integer
    public function last_id($table)
    {
        // DB::getPdo()->lastInsertId();
        $last_id = $this->table($table)->orderBy('id', 'DESC')->take(1)->first();
        if (isset($last_id->id)) {
            return $last_id->id;
        }
    }