Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request - Allow users to change connection when using multiple connections #7

Closed
miscbits opened this issue Nov 9, 2016 · 0 comments · Fixed by #8
Closed

Comments

@miscbits
Copy link

miscbits commented Nov 9, 2016

Currently in FormMaker, the behavior gets the information of a table and creates a form based on the information gathered.

For my project, I have multiple data sources to pull from so I have multiple connections that I want to be able to create cruds for. That being the case, I need to be able to specify the connection.

    public function fromTable(
        $table,
        $columns = null,
        $class = 'form-control',
        $view = null,
        $reformatted = true,
        $populated = false,
        $idAndTimestamps = false,
        $connection = null
    ) 

This would probably be an ideal signature to avoid breaking earlier versions.

The following line will work exactly the same with this new signature, but will use a different schema if connection is defined.

$tableColumns = Schema::connection($connection)->getColumnListing($table);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants