diff --git a/src/mailEclipse.php b/src/mailEclipse.php index af993ca..e70f3bc 100644 --- a/src/mailEclipse.php +++ b/src/mailEclipse.php @@ -28,7 +28,6 @@ static public function getMailables() { return self::mailablesList(); } - static public function getMailable($key, $name) { @@ -39,7 +38,6 @@ static public function getMailable($key, $name) static public function deleteTemplate($templateSlug) { - $template = DB::table(self::$templates_table) ->where('template_slug', $templateSlug)->first(); @@ -50,8 +48,6 @@ static public function deleteTemplate($templateSlug) $template_view = self::$view_namespace.'::templates.'.$templateSlug; $template_plaintext_view = $template_view.'_plain_text'; - // return $template_plaintext_view; - if ( View::exists( $template_view ) ) { unlink( View($template_view)->getPath() ); @@ -631,6 +627,8 @@ static public function handleMailableViewDataArgs($mailable) $params = $reflection->getConstructor()->getParameters(); + DB::beginTransaction(); + $eloquentFactory = app(EloquentFactory::class); $args = collect($params)->map(function( $param ){ @@ -709,6 +707,8 @@ static public function handleMailableViewDataArgs($mailable) return $foo; } + + DB::rollBack(); } }