PHP code example of sefirosweb / laravel-mailing

1. Go to this page and download the library: Download sefirosweb/laravel-mailing 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/ */

    

sefirosweb / laravel-mailing example snippets


'providers' => [
        ...
    	Sefirosweb\LaravelMailing\LaravelMailingServiceProvider::class,
]

return [
    'prefix' => 'mailgroups', // Prefix path
    'middleware' => ['web', 'auth'], // Use your self auth system
    'stage_to' => env('MAIL_LIST_STAGE_TO', 'Create "MAIL_LIST_STAGE_TO" in .env with default mail'), // Used for staging area, if not are in production return this value
];


return [
    'prefix' => 'mailgroups',
    'middleware' => ['web', 'auth', 'checkAcl:mailing_edit'], // Create access list "mailing_edit" and assign to role and user
];



use Sefirosweb\LaravelMailing\Http\Helpers\MailingList;

      ...
      $to = MailingList::get('mailing list');
      // Returns array
      //   $to = [
      //      0 => '[email protected]'
      //    ]


php artisan migrate

php artisan vendor:publish --provider="Sefirosweb\LaravelMailing\LaravelMailingServiceProvider" --tag=mailing-assets --force

php artisan vendor:publish --provider="Sefirosweb\LaravelMailing\LaravelMailingServiceProvider" --tag=config --force