PHP code example of rsvpify / laravel-mail-auto-embed
1. Go to this page and download the library: Download rsvpify/laravel-mail-auto-embed library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
rsvpify / laravel-mail-auto-embed example snippets
$providers = [
...
\Rsvpify\LaravelMailAutoEmbed\ServiceProvider::class,
...
];
namespace App\Models;
use Rsvpify\LaravelMailAutoEmbed\Models\EmbeddableEntity;
use Illuminate\Database\Eloquent\Model;
class Picture extends Model implements EmbeddableEntity
{
/**
* @param mixed $id
* @return Picture
*/
public static function findEmbeddable($id)
{
return static::find($id);
}
/**
* @return mixed
*/
public function getRawContent()
{
return $this->data;
}
/**
* @return string
*/
public function getFileName()
{
return 'profile_'.$this->id.'.png';
}
/**
* @return string
*/
public function getMimeType()
{
return 'image/png';
}
}
shell
php artisan vendor:publish --provider="Rsvpify\LaravelMailAutoEmbed\ServiceProvider"