1 | <?php |
||
12 | class ServiceProvider extends \Illuminate\Support\ServiceProvider |
||
13 | { |
||
14 | use AppNamespaceDetectorTrait; |
||
15 | |||
16 | /** |
||
17 | * Register the service provider. |
||
18 | * |
||
19 | * @return void |
||
20 | */ |
||
21 | public function register() |
||
49 | |||
50 | /** |
||
51 | * Bootstrap the application events. |
||
52 | * |
||
53 | * @return void |
||
54 | */ |
||
55 | public function boot() |
||
56 | { |
||
57 | $this->publishes([ |
||
58 | __DIR__.'/config/config.php' => config_path('laravel-widgets.php'), |
||
59 | ]); |
||
60 | |||
61 | $routeConfig = [ |
||
62 | 'namespace' => 'Arrilot\Widgets\Controllers', |
||
63 | 'prefix' => 'arrilot', |
||
64 | 'middleware' => $this->app['config']->get('laravel-widgets.route_middleware', []), |
||
65 | ]; |
||
66 | |||
67 | if (!$this->app->routesAreCached()) { |
||
|
|||
68 | $this->app['router']->group($routeConfig, function ($router) { |
||
69 | $router->get('load-widget', 'WidgetController@showWidget'); |
||
70 | }); |
||
71 | } |
||
72 | |||
73 | Blade::directive('widget', function ($expression) { |
||
74 | return "<?php echo app('arrilot.widget')->run{$expression}; ?>"; |
||
75 | }); |
||
76 | |||
77 | Blade::directive('async-widget', function ($expression) { |
||
78 | return "<?php echo app('arrilot.async-widget')->run{$expression}; ?>"; |
||
79 | }); |
||
80 | |||
81 | Blade::directive('asyncWidget', function ($expression) { |
||
82 | return "<?php echo app('arrilot.async-widget')->run{$expression}; ?>"; |
||
83 | }); |
||
84 | |||
85 | Blade::directive('asyncWidget', function ($expression) { |
||
86 | return "<?php echo app('arrilot.arrilot.widget-group-collection')->group{$expression}->display(); ?>"; |
||
87 | }); |
||
88 | } |
||
89 | |||
90 | /** |
||
91 | * Get the services provided by the provider. |
||
92 | * |
||
93 | * @return array |
||
94 | */ |
||
95 | public function provides() |
||
99 | |||
100 | /** |
||
101 | * Register a blade directive. |
||
102 | * |
||
103 | * @param $name |
||
104 | * @param $expression |
||
105 | */ |
||
106 | protected function registerBladeDirective($name, $expression) |
||
114 | |||
115 | /** |
||
116 | * Substitution for $compiler->createMatcher(). |
||
117 | * |
||
118 | * Get the regular expression for a generic Blade function. |
||
119 | * |
||
120 | * @param string $function |
||
121 | * |
||
122 | * @return string |
||
123 | */ |
||
124 | protected function createMatcher($function) |
||
128 | } |
||
129 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.