Skip to content

Commit

Permalink
Merge pull request #22 from jkudish/patch-1
Browse files Browse the repository at this point in the history
Add default value for the new custom template
  • Loading branch information
ConsoleTVs committed Mar 29, 2018
2 parents 6935762 + 47d7db5 commit b248716
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Classes/Invoice.php
Expand Up @@ -305,7 +305,7 @@ public function taxPriceFormatted()
*
* @return self
*/
private function generate($template = null)
private function generate($template = 'vendor.invoices.default')
{
$this->pdf = PDF::generate($this, $template);

Expand All @@ -321,7 +321,7 @@ private function generate($template = null)
*
* @return response
*/
public function download($name = 'invoice', $template = null)
public function download($name = 'invoice', $template = 'vendor.invoices.default')
{
$this->generate($template);

Expand All @@ -336,7 +336,7 @@ public function download($name = 'invoice', $template = null)
* @param string $name
*
*/
public function save($name = 'invoice.pdf', $template = null)
public function save($name = 'invoice.pdf', $template = 'vendor.invoices.default')
{
$invoice = $this->generate($template);

Expand All @@ -352,7 +352,7 @@ public function save($name = 'invoice.pdf', $template = null)
*
* @return response
*/
public function show($name = 'invoice', $template = null)
public function show($name = 'invoice', $template = 'vendor.invoices.default')
{
$this->generate($template);

Expand Down

0 comments on commit b248716

Please sign in to comment.