Nwidart\Modules\Repository::assetPath PHP Method

assetPath() public method

Get asset path for a specific module.
public assetPath ( $module ) : string
$module
return string
    public function assetPath($module)
    {
        return $this->config('paths.assets') . '/' . $module;
    }

Usage Example

 /** @test */
 public function it_finds_the_module_asset_path()
 {
     $this->repository->addLocation(__DIR__ . '/stubs/Recipe');
     $assetPath = $this->repository->assetPath('recipe');
     $this->assertEquals(public_path('modules/recipe'), $assetPath);
 }