File tree Expand file tree Collapse file tree 3 files changed +8
-25
lines changed
Expand file tree Collapse file tree 3 files changed +8
-25
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ public function handle()
135135 return gettype ($ value );
136136 });
137137
138- $ content = $ this ->view ->make ('meta ' , [
138+ $ content = $ this ->view ->make ('ide-helper:: meta ' , [
139139 'bindings ' => $ bindings ,
140140 'methods ' => $ this ->methods ,
141141 'factories ' => $ factories ,
@@ -191,6 +191,8 @@ protected function getExpectedArgumentSets()
191191 return [
192192 'configs ' => $ this ->loadTemplate ('configs ' )->pluck ('name ' )->filter (),
193193 'routes ' => $ this ->loadTemplate ('routes ' )->pluck ('name ' )->filter (),
194+ 'views ' => $ this ->loadTemplate ('views ' )->pluck ('key ' )->filter (),
195+
194196 ];
195197 }
196198
@@ -215,6 +217,9 @@ protected function getExpectedArguments()
215217 '\route() ' => [
216218 0 => 'routes ' ,
217219 ],
220+ '\view() ' => [
221+ 0 => 'views ' ,
222+ ],
218223 ];
219224 }
220225
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ public function __construct(
7979 public function generate ()
8080 {
8181 $ app = app ();
82- return $ this ->view ->make ('helper ' )
82+ return $ this ->view ->make ('ide-helper:: helper ' )
8383 ->with ('namespaces_by_extends_ns ' , $ this ->getAliasesByExtendsNamespace ())
8484 ->with ('namespaces_by_alias_ns ' , $ this ->getAliasesByAliasNamespace ())
8585 ->with ('real_time_facades ' , $ this ->getRealTimeFacades ())
@@ -105,7 +105,7 @@ public function generateEloquent()
105105 }
106106
107107 $ app = app ();
108- return $ this ->view ->make ('helper ' )
108+ return $ this ->view ->make ('ide-helper:: helper ' )
109109 ->with ('namespaces_by_extends_ns ' , [])
110110 ->with ('namespaces_by_alias_ns ' , ['__root ' => [$ alias ]])
111111 ->with ('real_time_facades ' , [])
Original file line number Diff line number Diff line change @@ -65,12 +65,6 @@ public function register()
6565 $ configPath = __DIR__ . '/../config/ide-helper.php ' ;
6666 $ this ->mergeConfigFrom ($ configPath , 'ide-helper ' );
6767
68- $ this ->app ->when ([GeneratorCommand::class, MetaCommand::class, ModelsCommand::class])
69- ->needs (\Illuminate \Contracts \View \Factory::class)
70- ->give (function () {
71- return $ this ->createLocalViewFactory ();
72- });
73-
7468 $ this ->commands (
7569 [
7670 GeneratorCommand::class,
@@ -95,20 +89,4 @@ public function provides()
9589 EloquentCommand::class,
9690 ];
9791 }
98-
99- /**
100- * @return Factory
101- */
102- private function createLocalViewFactory ()
103- {
104- $ resolver = new EngineResolver ();
105- $ resolver ->register ('php ' , function () {
106- return new PhpEngine ($ this ->app ['files ' ]);
107- });
108- $ finder = new FileViewFinder ($ this ->app ['files ' ], [__DIR__ . '/../resources/views ' ]);
109- $ factory = new Factory ($ resolver , $ finder , $ this ->app ['events ' ]);
110- $ factory ->addExtension ('php ' , 'php ' );
111-
112- return $ factory ;
113- }
11492}
You can’t perform that action at this time.
0 commit comments