Commit d05174286d4eff8c5eda35151bb8e0feec639ee8

Authored by poskrobkaA
1 parent 330dc38810

условия размещения - изменили email администратора

Showing 2 changed files with 3 additions and 2 deletions Inline Diff

app/Http/Controllers/PagesController.php
1 <?php 1 <?php
2 2
3 namespace App\Http\Controllers; 3 namespace App\Http\Controllers;
4 4
5 use App\Http\Requests\RequestSendAdmin; 5 use App\Http\Requests\RequestSendAdmin;
6 use App\Mail\MailAdminy; 6 use App\Mail\MailAdminy;
7 use App\Mail\MailRepair; 7 use App\Mail\MailRepair;
8 use App\Models\pages; 8 use App\Models\pages;
9 use Illuminate\Http\Request; 9 use Illuminate\Http\Request;
10 use Illuminate\Support\Facades\Mail; 10 use Illuminate\Support\Facades\Mail;
11 use Illuminate\Support\Facades\Redis; 11 use Illuminate\Support\Facades\Redis;
12 use PhpOffice\PhpSpreadsheet\Spreadsheet; 12 use PhpOffice\PhpSpreadsheet\Spreadsheet;
13 use PhpOffice\PhpSpreadsheet\Writer\Xlsx; 13 use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
14 14
15 class PagesController extends Controller 15 class PagesController extends Controller
16 { 16 {
17 public function pages(pages $pages) { 17 public function pages(pages $pages) {
18 $page = pages::query()->where('slug', $pages->slug)->first(); 18 $page = pages::query()->where('slug', $pages->slug)->first();
19 $slug = $pages->slug; 19 $slug = $pages->slug;
20 20
21 return view('pages', compact('page', 'slug')); 21 return view('pages', compact('page', 'slug'));
22 } 22 }
23 23
24 public function form_feedback(RequestSendAdmin $request){ 24 public function form_feedback(RequestSendAdmin $request){
25 $all = $request->all(); 25 $all = $request->all();
26 26 // Mail::to(env('EMAIL_ADMIN'))->send(new MailAdminy($all));
27 Mail::to(env('EMAIL_ADMIN'))->send(new MailAdminy($all)); 27 Mail::to(config('mail.emailAdmin'))->send(new MailAdminy($all));
28 28
29 return redirect()->back()->with('Сообщение было успешно отправлено и будет обработано'); 29 return redirect()->back()->with('Сообщение было успешно отправлено и будет обработано');
30 } 30 }
31 31
32 public function redis() { 32 public function redis() {
33 $redis = Redis::connection(); 33 $redis = Redis::connection();
34 $redis->set('User:CompanyName', 'РЕКАМОРЕ'); 34 $redis->set('User:CompanyName', 'РЕКАМОРЕ');
35 $id = 1; 35 $id = 1;
36 //dd(Redis::get('MyVar')); 36 //dd(Redis::get('MyVar'));
37 $redis->command('rpush', array("Сообщение1")); 37 $redis->command('rpush', array("Сообщение1"));
38 $redis->command('rpush', array("Сообщение2")); 38 $redis->command('rpush', array("Сообщение2"));
39 $values = $redis->command('lrange', array("mylist", 0, 1)); 39 $values = $redis->command('lrange', array("mylist", 0, 1));
40 dd($values); 40 dd($values);
41 41
42 } 42 }
43 43
44 public function excel() { 44 public function excel() {
45 $spreadsheet = new Spreadsheet(); 45 $spreadsheet = new Spreadsheet();
46 $activeWorksheet = $spreadsheet->getActiveSheet(); 46 $activeWorksheet = $spreadsheet->getActiveSheet();
47 $activeWorksheet->setCellValue('A1', 'Hello World !'); 47 $activeWorksheet->setCellValue('A1', 'Hello World !');
48 48
49 $writer = new Xlsx($spreadsheet); 49 $writer = new Xlsx($spreadsheet);
50 $writer->save('hello_world.xlsx'); 50 $writer->save('hello_world.xlsx');
51 } 51 }
52 52
53 public function private_policy() { 53 public function private_policy() {
54 return view('private_policy'); 54 return view('private_policy');
55 } 55 }
56 56
57 public function terms_of_use() { 57 public function terms_of_use() {
58 return view('terms_of_use'); 58 return view('terms_of_use');
59 } 59 }
60 } 60 }
61 61
1 <?php 1 <?php
2 2
3 return [ 3 return [
4 4
5 /* 5 /*
6 |-------------------------------------------------------------------------- 6 |--------------------------------------------------------------------------
7 | Default Mailer 7 | Default Mailer
8 |-------------------------------------------------------------------------- 8 |--------------------------------------------------------------------------
9 | 9 |
10 | This option controls the default mailer that is used to send any email 10 | This option controls the default mailer that is used to send any email
11 | messages sent by your application. Alternative mailers may be setup 11 | messages sent by your application. Alternative mailers may be setup
12 | and used as needed; however, this mailer will be used by default. 12 | and used as needed; however, this mailer will be used by default.
13 | 13 |
14 */ 14 */
15 15
16 'default' => env('MAIL_MAILER', 'smtp'), 16 'default' => env('MAIL_MAILER', 'smtp'),
17 17
18 /* 18 /*
19 |-------------------------------------------------------------------------- 19 |--------------------------------------------------------------------------
20 | Mailer Configurations 20 | Mailer Configurations
21 |-------------------------------------------------------------------------- 21 |--------------------------------------------------------------------------
22 | 22 |
23 | Here you may configure all of the mailers used by your application plus 23 | Here you may configure all of the mailers used by your application plus
24 | their respective settings. Several examples have been configured for 24 | their respective settings. Several examples have been configured for
25 | you and you are free to add your own as your application requires. 25 | you and you are free to add your own as your application requires.
26 | 26 |
27 | Laravel supports a variety of mail "transport" drivers to be used while 27 | Laravel supports a variety of mail "transport" drivers to be used while
28 | sending an e-mail. You will specify which one you are using for your 28 | sending an e-mail. You will specify which one you are using for your
29 | mailers below. You are free to add additional mailers as required. 29 | mailers below. You are free to add additional mailers as required.
30 | 30 |
31 | Supported: "smtp", "sendmail", "mailgun", "ses", 31 | Supported: "smtp", "sendmail", "mailgun", "ses",
32 | "postmark", "log", "array", "failover" 32 | "postmark", "log", "array", "failover"
33 | 33 |
34 */ 34 */
35 35
36 'mailers' => [ 36 'mailers' => [
37 'smtp' => [ 37 'smtp' => [
38 'transport' => 'smtp', 38 'transport' => 'smtp',
39 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), 39 'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
40 'port' => env('MAIL_PORT', 587), 40 'port' => env('MAIL_PORT', 587),
41 'encryption' => env('MAIL_ENCRYPTION', 'tls'), 41 'encryption' => env('MAIL_ENCRYPTION', 'tls'),
42 'username' => env('MAIL_USERNAME'), 42 'username' => env('MAIL_USERNAME'),
43 'password' => env('MAIL_PASSWORD'), 43 'password' => env('MAIL_PASSWORD'),
44 'timeout' => null, 44 'timeout' => null,
45 'local_domain' => env('MAIL_EHLO_DOMAIN'), 45 'local_domain' => env('MAIL_EHLO_DOMAIN'),
46 ], 46 ],
47 47
48 'ses' => [ 48 'ses' => [
49 'transport' => 'ses', 49 'transport' => 'ses',
50 ], 50 ],
51 51
52 'mailgun' => [ 52 'mailgun' => [
53 'transport' => 'mailgun', 53 'transport' => 'mailgun',
54 ], 54 ],
55 55
56 'postmark' => [ 56 'postmark' => [
57 'transport' => 'postmark', 57 'transport' => 'postmark',
58 ], 58 ],
59 59
60 'sendmail' => [ 60 'sendmail' => [
61 'transport' => 'sendmail', 61 'transport' => 'sendmail',
62 'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'), 62 'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'),
63 ], 63 ],
64 64
65 'log' => [ 65 'log' => [
66 'transport' => 'log', 66 'transport' => 'log',
67 'channel' => env('MAIL_LOG_CHANNEL'), 67 'channel' => env('MAIL_LOG_CHANNEL'),
68 ], 68 ],
69 69
70 'array' => [ 70 'array' => [
71 'transport' => 'array', 71 'transport' => 'array',
72 ], 72 ],
73 73
74 'failover' => [ 74 'failover' => [
75 'transport' => 'failover', 75 'transport' => 'failover',
76 'mailers' => [ 76 'mailers' => [
77 'smtp', 77 'smtp',
78 'log', 78 'log',
79 ], 79 ],
80 ], 80 ],
81 ], 81 ],
82 82
83 /* 83 /*
84 |-------------------------------------------------------------------------- 84 |--------------------------------------------------------------------------
85 | Global "From" Address 85 | Global "From" Address
86 |-------------------------------------------------------------------------- 86 |--------------------------------------------------------------------------
87 | 87 |
88 | You may wish for all e-mails sent by your application to be sent from 88 | You may wish for all e-mails sent by your application to be sent from
89 | the same address. Here, you may specify a name and address that is 89 | the same address. Here, you may specify a name and address that is
90 | used globally for all e-mails that are sent by your application. 90 | used globally for all e-mails that are sent by your application.
91 | 91 |
92 */ 92 */
93 93
94 'from' => [ 94 'from' => [
95 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), 95 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
96 'name' => env('MAIL_FROM_NAME', 'Example'), 96 'name' => env('MAIL_FROM_NAME', 'Example'),
97 ], 97 ],
98 98
99 /* 99 /*
100 |-------------------------------------------------------------------------- 100 |--------------------------------------------------------------------------
101 | Markdown Mail Settings 101 | Markdown Mail Settings
102 |-------------------------------------------------------------------------- 102 |--------------------------------------------------------------------------
103 | 103 |
104 | If you are using Markdown based email rendering, you may configure your 104 | If you are using Markdown based email rendering, you may configure your
105 | theme and component paths here, allowing you to customize the design 105 | theme and component paths here, allowing you to customize the design
106 | of the emails. Or, you may simply stick with the Laravel defaults! 106 | of the emails. Or, you may simply stick with the Laravel defaults!
107 | 107 |
108 */ 108 */
109 109
110 'markdown' => [ 110 'markdown' => [
111 'theme' => 'default', 111 'theme' => 'default',
112 112
113 'paths' => [ 113 'paths' => [
114 resource_path('views/vendor/mail'), 114 resource_path('views/vendor/mail'),
115 ], 115 ],
116 ], 116 ],
117 117
118 'emailAdmin' => env('EMAIL_ADMIN', 'info1@rekamore.su'),
118 ]; 119 ];
119 120