Artem-Schander/L5Modular

View on GitHub
src/Traits/ConfiguresFolder.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
<?php

namespace ArtemSchander\L5Modular\Traits;

trait ConfiguresFolder
{
    /**
     * The module where the class will be generated.
     *
     * @var string
     */
    protected $module;

    /**
     * Get the configured path for the asked component.
     *
     * @param  string  $component
     * @return string
     */
    protected function getConfiguredFolder(string $component)
    {
        return config("{$this->module}.structure.{$component}", config("modules.default.structure.{$component}"));
    }
}