Guest User

Untitled

a guest
Jun 19th, 2019
113
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. ->attach(public_path('/storage/400.txt'));
  37. }
  38. }
  39.  
  40. $array = [
  41. 1,2,3,4,5,6,7,8,9,10,
  42. 11,12,13,14,15,16,17,18,19,20
  43. ];
  44.  
  45. $t = "";
  46. foreach ($array as $i)
  47. {
  48. $t .= $i . PHP_EOL;
  49. }
  50.  
  51. IlluminateSupportFacadesStorage::disk('public')->put('400.txt', $t);
  52.  
  53. IlluminateSupportFacadesMail::to("[email protected]")->send(new AppMailMailTxt());
Advertisement
Add Comment
Please, Sign In to add comment