uawdijnntqw1x1x1
IP : 18.118.126.51
Hostname : host45.registrar-servers.com
Kernel : Linux host45.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
home
/
jackpotjunglegam
/
public_html
/
core
/
app
/
Http
/
Controllers
/
Admin
/
SubscriberController.php
/
/
<?php namespace App\Http\Controllers\Admin; use App\Http\Controllers\Controller; use App\Models\Subscriber; use Illuminate\Http\Request; class SubscriberController extends Controller { public function index() { $pageTitle = 'Subscriber Manager'; $subscribers = Subscriber::orderBy('id', 'desc')->paginate(getPaginate()); return view('admin.subscriber.index', compact('pageTitle', 'subscribers')); } public function sendEmailForm() { $pageTitle = 'Email to Subscribers'; return view('admin.subscriber.send_email', compact('pageTitle')); } public function remove($id) { $subscriber = Subscriber::findOrFail($id); $subscriber->delete(); $notify[] = ['success', 'Subscriber deleted successfully']; return back()->withNotify($notify); } public function sendEmail(Request $request) { $request->validate([ 'subject' => 'required', 'body' => 'required', ]); $subscribers = Subscriber::cursor(); foreach ($subscribers as $subscriber) { $receiverName = explode('@', $subscriber->email)[0]; $user = [ 'username' => $subscriber->email, 'email' => $subscriber->email, 'fullname' => $receiverName, ]; notify($user, 'DEFAULT', [ 'subject' => $request->subject, 'message' => $request->body, ], ['email']); } $notify[] = ['success', 'Email will be send to all subscribers']; return back()->withNotify($notify); } }
/home/jackpotjunglegam/public_html/core/app/Http/Controllers/Admin/SubscriberController.php