File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -72,11 +72,15 @@ protected function buildClass($name)
7272 */
7373 protected function getStub ()
7474 {
75- if ($ this ->option ('plain ' )) {
76- return __DIR__ .'/stubs/widget_plain.stub ' ;
75+ $ stubName = $ this ->option ('plain ' ) ? 'widget_plain ' : 'widget ' ;
76+ $ stubPath = $ this ->laravel ->make ('config ' )->get ('laravel-widgets. ' .$ stubName .'_stub ' );
77+
78+ // for BC
79+ if (is_null ($ stubPath )) {
80+ return __DIR__ .'/stubs/ ' .$ stubName .'.stub ' ;
7781 }
7882
79- return __DIR__ .'/stubs/widget.stub ' ;
83+ return $ this -> laravel -> basePath () .'/ ' . $ stubPath ;
8084 }
8185
8286 /**
Original file line number Diff line number Diff line change 22
33return [
44 //'default_namespace' => 'App\Widgets',
5+
56 'use_jquery_for_ajax_calls ' => false ,
7+
8+ /*
9+ * Relative path from the base directory to a regular widget stub.
10+ */
11+ 'widget_stub ' => 'vendor/arrilot/laravel-widgets/src/Console/stubs/widget.stub ' ,
12+
13+ /*
14+ * Relative path from the base directory to a plain widget stub.
15+ */
16+ 'widget_plain_stub ' => 'vendor/arrilot/laravel-widgets/src/Console/stubs/widget_plain.stub ' ,
617];
You can’t perform that action at this time.
0 commit comments