File tree Expand file tree Collapse file tree 2 files changed +19
-19
lines changed Expand file tree Collapse file tree 2 files changed +19
-19
lines changed Original file line number Diff line number Diff line change 44
55trait ElasticquentConfigTrait
66{
7+ /**
8+ * Get Index Name
9+ *
10+ * @return string
11+ */
12+ public function getIndexName ()
13+ {
14+ // The first thing we check is if there is an elasticquent
15+ // config file and if there is a default index.
16+ $ index_name = $ this ->getElasticConfig ('default_index ' );
17+
18+ if (!empty ($ index_name )) {
19+ return $ index_name ;
20+ }
21+
22+ // Otherwise we will just go with 'default'
23+ return 'default ' ;
24+ }
25+
726 /**
827 * Get the Elasticquent config
928 *
Original file line number Diff line number Diff line change @@ -64,25 +64,6 @@ public function newCollection(array $models = array())
6464 return new ElasticquentCollection ($ models );
6565 }
6666
67- /**
68- * Get Index Name
69- *
70- * @return string
71- */
72- public function getIndexName ()
73- {
74- // The first thing we check is if there is an elasticquent
75- // config file and if there is a default index.
76- $ index_name = $ this ->getElasticConfig ('default_index ' );
77-
78- if (!empty ($ index_name )) {
79- return $ index_name ;
80- }
81-
82- // Otherwise we will just go with 'default'
83- return 'default ' ;
84- }
85-
8667 /**
8768 * Get Type Name
8869 *
You can’t perform that action at this time.
0 commit comments