@@ 233-250 (lines=18) @@ | ||
230 | * @param string $name |
|
231 | * @return string |
|
232 | */ |
|
233 | protected function qualifyClass($name) |
|
234 | { |
|
235 | $rootNamespace = $this->laravel->getNamespace(); |
|
236 | ||
237 | if (Str::startsWith($name, $rootNamespace)) { |
|
238 | return $name; |
|
239 | } |
|
240 | ||
241 | if (Str::contains($name, '/')) { |
|
242 | $name = str_replace('/', '\\', $name); |
|
243 | } |
|
244 | ||
245 | if (! Str::contains(Str::lower($name), 'datatable')) { |
|
246 | $name .= 'DataTableHtml'; |
|
247 | } |
|
248 | ||
249 | return $this->getDefaultNamespace(trim($rootNamespace, '\\')) . '\\' . $name; |
|
250 | } |
|
251 | ||
252 | /** |
|
253 | * Get the default namespace for the class. |
@@ 139-156 (lines=18) @@ | ||
136 | * @param string $name |
|
137 | * @return string |
|
138 | */ |
|
139 | protected function qualifyClass($name) |
|
140 | { |
|
141 | $rootNamespace = $this->laravel->getNamespace(); |
|
142 | ||
143 | if (Str::startsWith($name, $rootNamespace)) { |
|
144 | return $name; |
|
145 | } |
|
146 | ||
147 | if (Str::contains($name, '/')) { |
|
148 | $name = str_replace('/', '\\', $name); |
|
149 | } |
|
150 | ||
151 | if (! Str::contains(Str::lower($name), 'datatable')) { |
|
152 | $name .= 'DataTable'; |
|
153 | } |
|
154 | ||
155 | return $this->getDefaultNamespace(trim($rootNamespace, '\\')) . '\\' . $name; |
|
156 | } |
|
157 | ||
158 | /** |
|
159 | * Get the default namespace for the class. |