2
2
3
3
namespace Elnooronline \LaravelBootstrapForms \Components ;
4
4
5
+ use Illuminate \Support \Str ;
5
6
use Illuminate \Support \Facades \Lang ;
6
7
use Illuminate \Support \Facades \Config ;
7
8
use Illuminate \Contracts \Support \Htmlable ;
@@ -112,8 +113,8 @@ public function __construct($resource)
112
113
/**
113
114
* Initialized the input arguments.
114
115
*
115
- * @param null $name
116
- * @param null $value
116
+ * @param null $name
117
+ * @param null $value
117
118
* @return $this
118
119
*/
119
120
abstract public function init ();
@@ -177,7 +178,7 @@ public function name($name)
177
178
/**
178
179
* The key to be used for the view error bag.
179
180
*
180
- * @param string $bag
181
+ * @param string $bag
181
182
* @return $this
182
183
*/
183
184
public function errorBag ($ bag = 'default ' )
@@ -246,8 +247,8 @@ public function autofocus($autofocus = true)
246
247
/**
247
248
* Add custom attribute.
248
249
*
249
- * @param string|array $key
250
- * @param null $value
250
+ * @param string|array $key
251
+ * @param null $value
251
252
* @return $this
252
253
*/
253
254
public function attribute ($ key , $ value = null )
@@ -274,6 +275,15 @@ public function note($note)
274
275
275
276
protected function getViewPath ()
276
277
{
278
+ if (Str::contains ($ this ->viewPath , ':: ' )) {
279
+ $ alias = explode (':: ' , $ this ->viewPath )[0 ];
280
+ $ path = explode (':: ' , $ this ->viewPath )[1 ];
281
+
282
+ $ bootstrap = explode (':: ' , Config::get ('laravel-bootstrap-forms.views ' ));
283
+
284
+ return $ alias .':: ' .$ bootstrap [1 ].'. ' .$ path .'. ' .$ this ->style ;
285
+ }
286
+
277
287
return Config::get ('laravel-bootstrap-forms.views ' ).'. ' .$ this ->viewPath .'. ' .$ this ->style ;
278
288
}
279
289
@@ -293,7 +303,7 @@ public function style($style)
293
303
/**
294
304
* Set the input inline validation errors option.
295
305
*
296
- * @param bool $bool
306
+ * @param bool $bool
297
307
* @return $this
298
308
*/
299
309
public function inlineValidation ($ bool = true )
@@ -339,7 +349,7 @@ protected function viewComposer()
339
349
/**
340
350
* Transform the properties to be used in view.
341
351
*
342
- * @param array $properties
352
+ * @param array $properties
343
353
* @return array
344
354
*/
345
355
protected function transformProperties (array $ properties )
0 commit comments