Skip to content

Commit

Permalink
Merge pull request #60 from zfhassaan/master
Browse files Browse the repository at this point in the history
Update for #58 Issue
  • Loading branch information
Flynsarmy authored Feb 17, 2023
2 parents e2cc151 + 8622265 commit 5336b97
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/Flynsarmy/DbBladeCompiler/DbBladeCompilerEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,14 @@ public function __construct(DbBladeCompiler $bladeCompiler)
{
parent::__construct($bladeCompiler);
}

/**
* @param string $compiled_path
* @param array $data
* @return string
*/
public function getContent(string $compiled_path, array $data)
{
return $this->evaluatePath($compiled_path, $data);
}
}
4 changes: 3 additions & 1 deletion src/Flynsarmy/DbBladeCompiler/DbView.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,10 @@ protected function getContents()
{
$field = $this->config->get('db-blade-compiler.model_property');
$this->path->{$field} = $this->content_field;
$compiler = $this->engine->getCompiler();
$compiler->compile($this->path);

return parent::getContents();
return $this->engine->getContent($compiler->getCompiledPath($this->path), $this->data);
}

/**
Expand Down

0 comments on commit 5336b97

Please sign in to comment.