PHP code example of hivelink / mail
1. Go to this page and download the library: Download hivelink/mail 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/ */
hivelink / mail example snippets
php artisan vendor:publish --provider=Pleb\\EmailTemplatesServiceProvider
php artisan vendor:publish --tag=pleb-email-templates-config // to copy config files
php artisan vendor:publish --tag=pleb-email-templates-views // to copy views files
php artisan vendor:publish --tag=pleb-email-templates-lang // to copy lang files
php artisan vendor:publish --tag=pleb-email-templates-img // to copy img files
php artisan vendor:publish --tag=pleb-email-templates-app // to copy app files
'from' => [
'address' => env('MAIL_FROM_ADDRESS', '[email protected] '),
'name' => env('MAIL_FROM_NAME', 'Example'),
],
use App\User;
use App\Mail\WelcomeMember;
$options = array(
'unsubscribe_url' => 'http://mysite.com/unsub',
'play_url' => 'http://google-play.com/myapp',
'ios_url' => 'http://apple-store.com/myapp',
'sendfriend_url' => 'http://mysite.com/send_friend',
'webview_url' => 'http://mysite.com/webview_url',
);
$user = User:find(1);
Mail::to($user)->send(new WelcomeMember($user, $options));
Route::get('pleb/welcome_member', function () {
$member = App\User::find(1);
return new App\Mail\WelcomeMember($member);
});
bash
/config/pleb.php
/resources/views/email/*
/resources/lang/en/pleb.php
/public/assets/img/email/*
/app/Mail/*
config/pleb.php
/resources/lang/en/pleb.php
/config/mail.php
/routes/web.php
routes/web.php