We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bed4033 commit f8bf46bCopy full SHA for f8bf46b
src/Illuminate/Foundation/Testing/Concerns/InteractsWithDatabase.php
@@ -153,18 +153,14 @@ protected function getConnection($connection = null)
153
}
154
155
/**
156
- * Get the table name.
+ * Get the table name from the given model or string.
157
*
158
* @param \Illuminate\Database\Eloquent\Model|string $table
159
* @return string
160
*/
161
protected function getTable($table)
162
{
163
- if (is_subclass_of($table, Model::class)) {
164
- return (new $table)->getTable();
165
- }
166
-
167
- return $table;
+ return is_subclass_of($table, Model::class) ? (new $table)->getTable() : $table;
168
169
170
0 commit comments