Completed
Push — dev ( 8e4a13...e9dbc4 )
by Marc
02:06
created

PluginManager::outputRoutes()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 12
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 12
rs 9.4285
cc 2
eloc 6
nc 2
nop 0
1
<?php namespace Mascame\Artificer\Extension;
2
3
class PluginManager extends \Mascame\Extender\Manager
4
{
5
    use Slugged;
6
7
    /**
8
     * @return array
9
     */
10
    public function outputRoutes()
11
    {
12
        $installedPlugins = $this->installer()->getInstalled();
13
14
        foreach ($installedPlugins as $plugin) {
15
            $pluginInstance = $this->get($plugin);
16
17
            \Route::group(['prefix' => $pluginInstance->getSlug()], function() use ($pluginInstance) {
18
                $pluginInstance->getRoutes();
19
            });
20
        }
21
    }
22
23
}