Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. $array = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20];
  2.  
  3. $t = "";
  4. foreach ($array as $i)
  5. {
  6. $t .= $i . PHP_EOL;
  7. }
  8.  
  9. IlluminateSupportFacadesStorage::disk('public')->put('400.txt', $t);
  10.  
  11. 'public' => [
  12. 'driver' => 'local',
  13. 'root' => storage_path('app/public'),
  14. 'url' => env('APP_URL').'/storage',
  15. 'visibility' => 'public',
  16. ],
  17.  
  18. <?php namespace AppMail;
  19.  
  20. use IlluminateBusQueueable;
  21. use IlluminateMailMailable;
  22. use IlluminateQueueSerializesModels;
  23. use IlluminateContractsQueueShouldQueue;
  24.  
  25. class MailTxt extends Mailable
  26. {
  27. use Queueable, SerializesModels;
  28.  
  29. public function __construct()
  30. {
  31. //
  32. }
  33. public function build()
  34. {
  35. return $this->view('email_txt')
  36. ->from('email@com.pt')
  37. ->attach(public_path('/storage/400.txt'));
  38. }
  39. }
  40.  
  41. $array = [
  42. 1,2,3,4,5,6,7,8,9,10,
  43. 11,12,13,14,15,16,17,18,19,20
  44. ];
  45.  
  46. $t = "";
  47. foreach ($array as $i)
  48. {
  49. $t .= $i . PHP_EOL;
  50. }
  51.  
  52. IlluminateSupportFacadesStorage::disk('public')->put('400.txt', $t);
  53.  
  54. IlluminateSupportFacadesMail::to("parapua@sapo.pt")->send(new AppMailMailTxt());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement