-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from MotivoZwolle/feature/custom-embedders
The answer to life, the universe and custom embedders
- Loading branch information
Showing
7 changed files
with
155 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
namespace Eduardokum\LaravelMailAutoEmbed\Tests\fixtures; | ||
|
||
use Eduardokum\LaravelMailAutoEmbed\Embedder\AttachmentEmbedder; | ||
|
||
class CustomEmbedder extends AttachmentEmbedder | ||
{ | ||
/** | ||
* @param string $url | ||
*/ | ||
public function fromUrl($url) | ||
{ | ||
return "custom:{$url}"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
</head> | ||
|
||
<body> | ||
<main> | ||
<article> | ||
<p> | ||
Lorem ipsum dolor sit amet consectetur adipisicing elit. Nulla, dolorum assumenda aliquam blanditiis, | ||
necessitatibus mollitia delectus sapiente amet earum minima qui non deserunt quidem, doloremque | ||
architecto voluptatem eveniet illo aperiam. | ||
</p> | ||
|
||
<p> | ||
<figure> | ||
<!-- default --><img src="http://localhost/test.png" /> | ||
<caption>Lorem ipsum</caption> | ||
</figure> | ||
</p> | ||
</article> | ||
|
||
<aside> | ||
<header> | ||
<h1>Lorem Ipsum</h1> | ||
</header> | ||
|
||
<p> | ||
Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempore cum, blanditiis a minima aspernatur | ||
corporis pariatur, perferendis explicabo consectetur tenetur iste, fuga possimus corrupti dolorem | ||
laudantium sapiente sunt error autem. | ||
</p> | ||
|
||
<figure> | ||
<!-- custom embedder --><img data-auto-embed="custom" src="http://localhost/test.png" /> | ||
<caption>Lorem Ipsum</caption> | ||
</figure> | ||
</aside> | ||
|
||
|
||
<aside> | ||
<header> | ||
<h1>Lorem Ipsum Two</h1> | ||
</header> | ||
|
||
<p> | ||
Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempore cum, blanditiis a minima aspernatur | ||
corporis pariatur, perferendis explicabo consectetur tenetur iste, fuga possimus corrupti dolorem | ||
laudantium sapiente sunt error autem. | ||
</p> | ||
|
||
<figure> | ||
<!-- invalid embedder --><img data-auto-embed="unknown" src="http://localhost/test.png" /> | ||
<caption>Lorem Ipsum</caption> | ||
</figure> | ||
</aside> | ||
</main> | ||
</body> | ||
|
||
</html> |