Last active
August 29, 2015 14:08
-
-
Save pariz/d9aaaf081296b5df578b to your computer and use it in GitHub Desktop.
Setting dynamic tables via model
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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