@@ -67,7 +67,7 @@ public function createOrUpdateIndex()
6767 protected function createIndex ()
6868 {
6969 $ indexName = $ this ->modelService ->indexName ;
70- $ tableName = $ this ->modelService ->tableName ;
70+ $ tableName = $ this ->modelService ->tablePrefixedName ;
7171 $ indexFields = implode (', ' , array_map (function ($ indexField ) {
7272 return "` $ indexField` " ;
7373 }, $ this ->modelService ->getFullTextIndexFields ()));
@@ -84,7 +84,7 @@ protected function createIndex()
8484
8585 protected function indexAlreadyExists ()
8686 {
87- $ tableName = $ this ->modelService ->tableName ;
87+ $ tableName = $ this ->modelService ->tablePrefixedName ;
8888 $ indexName = $ this ->modelService ->indexName ;
8989
9090 return !empty (DB ::connection ($ this ->modelService ->connectionName )->
@@ -102,7 +102,7 @@ protected function indexNeedsUpdate()
102102 protected function getIndexFields ()
103103 {
104104 $ indexName = $ this ->modelService ->indexName ;
105- $ tableName = $ this ->modelService ->tableName ;
105+ $ tableName = $ this ->modelService ->tablePrefixedName ;
106106
107107 $ index = DB ::connection ($ this ->modelService ->connectionName )->
108108 select ("SHOW INDEX FROM $ tableName WHERE Key_name = ? " , [$ indexName ]);
@@ -131,7 +131,7 @@ protected function updateIndex()
131131 public function dropIndex ()
132132 {
133133 $ indexName = $ this ->modelService ->indexName ;
134- $ tableName = $ this ->modelService ->tableName ;
134+ $ tableName = $ this ->modelService ->tablePrefixedName ;
135135
136136 if ($ this ->indexAlreadyExists ()) {
137137 DB ::connection ($ this ->modelService ->connectionName )
0 commit comments