Skip to content

Instantly share code, notes, and snippets.

@pariz
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pariz/d9aaaf081296b5df578b to your computer and use it in GitHub Desktop.
Save pariz/d9aaaf081296b5df578b to your computer and use it in GitHub Desktop.
Setting dynamic tables via model
class TestModel extends Eloquent {
public static function dynamicTable($table) {
$instance = new static;
$instance->setTable($table);
return $instance;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment