Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Templating Services #4

Merged
merged 5 commits into from
May 20, 2023
Merged

[Feature] Templating Services #4

merged 5 commits into from
May 20, 2023

Conversation

sethsandaru
Copy link
Member

Feature

This PR extracts the current Blade rendering to another layer and called it "Templating Services". Also introduces
the Markdown templating mode.

The biggest PRO is that we can add new templating on demand if we needed to (eg: volt from phalcon, mustache,...)

Current Drivers

  • Blade
  • Markdown (utilizing Blade for dynamic rendering, then parsing markdown to HTML)

Metadata

Introduces templating metadata property. 2 possible values: blade and markdown.

By default, blade will be used.

Breaking Changes

No

@sethsandaru sethsandaru self-assigned this May 20, 2023
@codecov-commenter
Copy link

codecov-commenter commented May 20, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.18 🎉

Comparison is base (aa56e1d) 96.71% compared to head (addd1e0) 96.90%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@             Coverage Diff              @@
##               main       #4      +/-   ##
============================================
+ Coverage     96.71%   96.90%   +0.18%     
- Complexity      103      110       +7     
============================================
  Files            35       39       +4     
  Lines           457      484      +27     
============================================
+ Hits            442      469      +27     
  Misses           15       15              
Impacted Files Coverage Δ
...pp/Http/Controllers/DocumentTemplateController.php 100.00% <100.00%> (ø)
app/Models/DocumentTemplate.php 100.00% <100.00%> (ø)
...rvices/PdfRenderers/AbstractPdfRendererService.php 100.00% <100.00%> (ø)
app/Services/TemplatingRenderManager.php 100.00% <100.00%> (ø)
...ices/TemplatingServices/BladeTemplatingService.php 100.00% <100.00%> (ø)
...s/TemplatingServices/MarkdownTemplatingService.php 100.00% <100.00%> (ø)
app/Utils/TemplatingErrorMessage.php 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@sethsandaru sethsandaru merged commit a25ead7 into main May 20, 2023
@sethsandaru sethsandaru deleted the templating-services branch May 20, 2023 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants