Actualizacuion de Rama Kquiroz

This commit is contained in:
ellecio2
2023-09-04 19:53:37 -04:00
parent d2e9ba53ab
commit 2e99d7b290
2206 changed files with 100145 additions and 467275 deletions

View File

@@ -3,7 +3,10 @@
namespace App\Http\Controllers\Seller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Notification;
use App\Notifications\PayoutNotification;
use App\Models\SellerWithdrawRequest;
use App\Models\User;
use Auth;
class SellerWithdrawRequestController extends Controller
@@ -35,6 +38,10 @@ class SellerWithdrawRequestController extends Controller
$seller_withdraw_request->status = '0';
$seller_withdraw_request->viewed = '0';
if ($seller_withdraw_request->save()) {
$users = User::findMany([auth()->user()->id, User::where('user_type', 'admin')->first()->id]);
Notification::send($users, new PayoutNotification(Auth::user(), $request->amount, 'pending'));
flash(translate('Request has been sent successfully'))->success();
return redirect()->route('seller.money_withdraw_requests.index');
}