• You MUST read the Babiato Rules before making your first post otherwise you may get permanent warning points or a permanent Ban.

    Our resources on Babiato Forum are CLEAN and SAFE. So you can use them for development and testing purposes. If your are on Windows and have an antivirus that alerts you about a possible infection: Know it's a false positive because all scripts are double checked by our experts. We advise you to add Babiato to trusted sites/sources or disable your antivirus momentarily while downloading a resource. "Enjoy your presence on Babiato"

RaffleLab - Superlative Lottery Platform

RaffleLab - Superlative Lottery Platform v1.1

No permission to download
Hi all.
Who knows what the problem is??? and how to fix...

Route [user.withdraw.history] not defined. (View:​

core/resources/views/templates/basic/user/dashboard.blade.php)​

 

Attachments

  • 2023-11-29_17-30-34.png
    2023-11-29_17-30-34.png
    47.6 KB · Views: 10
  • Like
Reactions: rmd10
Hi all.
Who knows what the problem is??? and how to fix...

Route [user.withdraw.history] not defined. (View:​

core/resources/views/templates/basic/user/dashboard.blade.php)​

1-good evening, gentlemen, you have to make three routes (in the core/routes file), one of which is the route to the user.withdraw.history function.
After doing this, the user dashboard appears.

2-but the cashout still keeps giving an error making it impossible for the user to withdraw.

I've tried everything but I couldn't get past step 2.
 
1-good evening, gentlemen, you have to make three routes (in the core/routes file), one of which is the route to the user.withdraw.history function.
After doing this, the user dashboard appears.

2-but the cashout still keeps giving an error making it impossible for the user to withdraw.

I've tried everything but I couldn't get past step 2.
shows how to fix
 
No solution yet :-(
It’s a pity that I’m not a programmer, just a technician, I think I could solve this problem.
 
  • Like
Reactions: rmd10
Good morning everyone, so that the user dashboard works, add it to the core/routes/web.php folder

Route::get('/user/withdraw/history', [WithdrawController::class, 'withdrawHistory'])->name('user.withdraw.history');
Route::get('/user/withdraw', [WithdrawController::class, 'withdraw'])->name('user.withdraw');

The withdrawal error will still continue in the cashout part, so far I haven't been able to resolve it
 
  • Like
Reactions: leedhanu
Thank you very much for your help, but indeed there is an error when withdrawing funds.
Good morning everyone, so that the user dashboard works, add it to the core/routes/web.php folder

Route::get('/user/withdraw/history', [WithdrawController::class, 'withdrawHistory'])->name('user.withdraw.history');
Route::get('/user/withdraw', [WithdrawController::class, 'withdraw'])->name('user.withdraw');

The withdrawal error will still continue in the cashout part, so far I haven't been able to resolve it
Thank you very much for your help :) , but indeed there is an error when withdrawing funds.
 
  • Like
Reactions: rmd10
updates on cashout, so far I can activate the withdraw user dashboard, although it is not 100% functional:

in the core/resources/routes/web.php folder

in the part after
use Illuminate\Support\Facades\Route;
(add below)

use App\Http\Controllers\User\WithdrawController;

-------------------------------------------------- -------------------------------------------------- --------------
still in the core/resources/routes/web.php folder

add:

Route::match(['get', 'post'], '/user/withdraw/money', [WithdrawController::class, 'withdrawMoney'])->name('user.withdraw.money');
-------------------------------------------------- -------------------------------------------------- --------------

In the folder core/app/Http/Controllers/User/WithdrawController.php

right after

class WithdrawController extends Controller
{
Add this function below:
public function withdraw()
{
$withdrawMethod = WithdrawMethod::where('status', Status::ENABLE)->get();
$pageTitle = withrdawKeyword();
$user = auth()->user();
$withdraw = new Withdrawal();


return view($this->activeTemplate . 'user.withdraw.methods', compact('pageTitle', 'withdrawMethod'));
}

-------------------------------------------------- -------------------------------------------------- -------------- remembering that this does not solve the problem, the script will still have errors, working to resolve
 
  • Like
Reactions: wolverinejf21
Code:
Good evening, gentlemen, I am here to inform you that I am able to make the 100% cashout part work:

core/routes/web.php:


<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\User\WithdrawController;

Route::get('/clear', function () {
     \Illuminate\Support\Facades\Artisan::call('optimize:clear');
});

Route::get('cron', 'CronController@cron')->name('cron');

// User Support Ticket
Route::controller('TicketController')->prefix('ticket')->name('ticket.')->group(function () {
     Route::get('/', 'supportTicket')->name('index');
     Route::get('new', 'openSupportTicket')->name('open');
     Route:ost('create', 'storeSupportTicket')->name('store');
     Route::get('view/{ticket}', 'viewTicket')->name('view');
     Route:ost('reply/{ticket}', 'replyTicket')->name('reply');
     Route:ost('close/{ticket}', 'closeTicket')->name('close');
     Route::get('download/{ticket}', 'ticketDownload')->name('download');
});

Route::get('/user/withdraw/history', [WithdrawController::class, 'withdrawLog'])->name('user.withdraw.history');
Route::get('/user/withdraw', [WithdrawController::class, 'withdrawMoney'])->name('user.withdraw');

Route:ost('/user/withdraw/submit', [WithdrawController::class, 'withdrawSubmit'])->name('user.withdraw.submit');
Route::get('/user/withdraw/preview', [WithdrawController::class, 'withdrawPreview'])->name('user.withdraw.preview');
Route::get('user/withdraw/withdraw-method', [WithdrawController::class, 'withdrawMethod'])->name('withdraw.method');

Route:ost('user/withdraw/withdraw-request/confirm', [WithdrawController::class, 'withdrawSubmit'])->name('withdraw.submit');

Route:ost('/user/withdraw/withdraw-request', [WithdrawController::class, 'withdrawStore'])->name('user.withdraw.money');



Route::get('app/deposit/confirm/{hash}', 'Gateway\PaymentController@appDepositConfirm')->name('deposit.app.confirm');

Route::controller('SiteController')->group(function () {

     Route:ost('/request/coin', 'requestCoin')->name('request.coin')->middleware('auth');
     Route::get('/contact', 'contact')->name('contact');
     Route:ost('/contact', 'contactSubmit');
     Route::get('/change/{lang?}', 'changeLanguage')->name('lang');

     Route::get('cookie-policy', 'cookiePolicy')->name('cookie.policy');

     Route::get('/cookie/accept', 'cookieAccept')->name('cookie.accept');

     Route::get('blog/{slug}/{id}', 'blogDetails')->name('blog.details');

     Route::get('policy/{slug}/{id}', 'policyPages')->name('policy.pages');

     Route::get('placeholder-image/{size}', 'placeholderImage')->name('placeholder.image');

     Route::get('lottery-ticket', 'getSingleTicket')->name('lottery.ticket.single');
     Route::get('lottery-tickets', 'lotteryTickets')->name('lottery.tickets');
     Route::get('{slug}/{id}/play', 'playLottery')->name('lottery.play');

     Route::get('results', 'results')->name('results');
     Route::get('blogs', 'blogs')->name('blogs');
     Route::get('faqs', 'faqs')->name('faqs');
     Route::get('/{slug}', 'pages')->name('pages');
     Route::get('/', 'index')->name('home');



});

-------------------------------------------------- ------------------------------------------------------------------------

core/app/Http/Controllers/User/WithdrawController.php


<?php
namespace App\Http\Controllers\User;
use App\Constants\Status;
use App\Http\Controllers\Controller;
use App\Lib\FormProcessor;
use App\Models\AdminNotification;
use App\Models\Transaction;
use App\Models\Withdrawal;
use App\Models\WithdrawMethod;
use Illuminate\Http\Request;
class WithdrawController extends Controller
{

    public function withdrawMoney()
    {
        $withdrawMethod = WithdrawMethod::where('status',Status::ENABLE)->get();
        $pageTitle = 'Withdraw Money';
        return view($this->activeTemplate.'user.withdraw.methods', compact('pageTitle','withdrawMethod'));
    }
    public function withdrawStore(Request $request)
    {
        $this->validate($request, [
            'method_code' => 'required',
            'amount' => 'required|numeric'
        ]);
        $method = WithdrawMethod::where('id', $request->method_code)->where('status', Status::ENABLE)->firstOrFail();
        $user = auth()->user();
        if ($request->amount < $method->min_limit) {
            $notify[] = ['error', 'Your requested amount is smaller than minimum amount.'];
            return back()->withNotify($notify);
        }
        if ($request->amount > $method->max_limit) {
            $notify[] = ['error', 'Your requested amount is larger than maximum amount.'];
            return back()->withNotify($notify);
        }
        if ($request->amount > $user->balance) {
            $notify[] = ['error', 'You do not have sufficient balance for withdraw.'];
            return back()->withNotify($notify);
        }

        $charge = $method->fixed_charge + ($request->amount * $method->percent_charge / 100);
        $afterCharge = $request->amount - $charge;
        $finalAmount = $afterCharge * $method->rate;
        $withdraw = new Withdrawal();
        $withdraw->method_id = $method->id; // wallet method ID
        $withdraw->user_id = $user->id;
        $withdraw->amount = $request->amount;
        $withdraw->currency = $method->currency;
        $withdraw->rate = $method->rate;
        $withdraw->charge = $charge;
        $withdraw->final_amount = $finalAmount;
        $withdraw->after_charge = $afterCharge;
        $withdraw->trx = getTrx();
        $withdraw->save();
        session()->put('wtrx', $withdraw->trx);
        return to_route('user.withdraw.preview');
    }
    public function withdrawPreview()
    {
        $withdraw = Withdrawal::with('method','user')->where('trx', session()->get('wtrx'))->where('status', Status:AYMENT_INITIATE)->orderBy('id','desc')->firstOrFail();
        $pageTitle = 'Withdraw Preview';
        return view($this->activeTemplate . 'user.withdraw.preview', compact('pageTitle','withdraw'));
    }
    public function withdrawSubmit(Request $request)
    {
        $withdraw = Withdrawal::with('method','user')->where('trx', session()->get('wtrx'))->where('status', Status:AYMENT_INITIATE)->orderBy('id','desc')->firstOrFail();
        $method = $withdraw->method;
        if ($method->status == Status:ISABLE) {
            abort(404);
        }
        $formData = $method->form->form_data;
        $formProcessor = new FormProcessor();
        $validationRule = $formProcessor->valueValidation($formData);
        $request->validate($validationRule);
        $userData = $formProcessor->processFormData($request, $formData);
        $user = auth()->user();
        if ($user->ts) {
            $response = verifyG2fa($user,$request->authenticator_code);
            if (!$response) {
                $notify[] = ['error', 'Wrong verification code'];
                return back()->withNotify($notify);
            }
        }
        if ($withdraw->amount > $user->balance) {
            $notify[] = ['error', 'Your request amount is larger then your current balance.'];
            return back()->withNotify($notify);
        }
        $withdraw->status = Status:AYMENT_PENDING;
        $withdraw->withdraw_information = $userData;
        $withdraw->save();
        $user->balance  -=  $withdraw->amount;
        $user->save();
        $transaction = new Transaction();
        $transaction->user_id = $withdraw->user_id;
        $transaction->amount = $withdraw->amount;
        $transaction->post_balance = $user->balance;
        $transaction->charge = $withdraw->charge;
        $transaction->trx_type = '-';
        $transaction->details = showAmount($withdraw->final_amount) . ' ' . $withdraw->currency . ' Withdraw Via ' . $withdraw->method->name;
        $transaction->trx = $withdraw->trx;
        $transaction->remark = 'withdraw';
        $transaction->save();
        $adminNotification = new AdminNotification();
        $adminNotification->user_id = $user->id;
        $adminNotification->title = 'New withdraw request from '.$user->username;
        $adminNotification->click_url = urlPath('admin.withdraw.details',$withdraw->id);
        $adminNotification->save();
        notify($user, 'WITHDRAW_REQUEST', [
            'method_name' => $withdraw->method->name,
            'method_currency' => $withdraw->currency,
            'method_amount' => showAmount($withdraw->final_amount),
            'amount' => showAmount($withdraw->amount),
            'charge' => showAmount($withdraw->charge),
            'rate' => showAmount($withdraw->rate),
            'trx' => $withdraw->trx,
            'post_balance' => showAmount($user->balance),
        ]);
        $notify[] = ['success', 'Withdraw request sent successfully'];
        return to_route('user.withdraw.history')->withNotify($notify);
    }
    public function withdrawLog(Request $request)
    {
        $pageTitle = "Withdraw Log";
        $withdraws = Withdrawal::where('user_id', auth()->id())->where('status', '!=', Status:AYMENT_INITIATE);
        if ($request->search) {
            $withdraws = $withdraws->where('trx',$request->search);
        }
        $withdraws = $withdraws->with('method')->orderBy('id','desc')->paginate(getPaginate());
        return view($this->activeTemplate.'user.withdraw.log', compact('pageTitle','withdraws'));
    }
}



---------------------------------------------------------------------------------------------------------------------------
gentlemen, good use everyone, I'm glad I was able to help you
 
Last edited:
Good evening, gentlemen, I am here to inform you that I am able to make the 100% cashout part work:

core/routes/web.php:


<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\User\WithdrawController;

Route::get('/clear', function () {
\Illuminate\Support\Facades\Artisan::call('optimize:clear');
});

Route::get('cron', 'CronController@cron')->name('cron');

// User Support Ticket
Route::controller('TicketController')->prefix('ticket')->name('ticket.')->group(function () {
Route::get('/', 'supportTicket')->name('index');
Route::get('new', 'openSupportTicket')->name('open');
Route::post('create', 'storeSupportTicket')->name('store');
Route::get('view/{ticket}', 'viewTicket')->name('view');
Route::post('reply/{ticket}', 'replyTicket')->name('reply');
Route::post('close/{ticket}', 'closeTicket')->name('close');
Route::get('download/{ticket}', 'ticketDownload')->name('download');
});

Route::get('/user/withdraw/history', [WithdrawController::class, 'withdrawLog'])->name('user.withdraw.history');
Route::get('/user/withdraw', [WithdrawController::class, 'withdrawMoney'])->name('user.withdraw');

Route::post('/user/withdraw/submit', [WithdrawController::class, 'withdrawSubmit'])->name('user.withdraw.submit');
Route::get('/user/withdraw/preview', [WithdrawController::class, 'withdrawPreview'])->name('user.withdraw.preview');
Route::get('user/withdraw/withdraw-method', [WithdrawController::class, 'withdrawMethod'])->name('withdraw.method');

Route::post('user/withdraw/withdraw-request/confirm', [WithdrawController::class, 'withdrawSubmit'])->name('withdraw.submit');

Route::post('/user/withdraw/withdraw-request', [WithdrawController::class, 'withdrawStore'])->name('user.withdraw.money');



Route::get('app/deposit/confirm/{hash}', 'Gateway\PaymentController@appDepositConfirm')->name('deposit.app.confirm');

Route::controller('SiteController')->group(function () {

Route::post('/request/coin', 'requestCoin')->name('request.coin')->middleware('auth');
Route::get('/contact', 'contact')->name('contact');
Route::post('/contact', 'contactSubmit');
Route::get('/change/{lang?}', 'changeLanguage')->name('lang');

Route::get('cookie-policy', 'cookiePolicy')->name('cookie.policy');

Route::get('/cookie/accept', 'cookieAccept')->name('cookie.accept');

Route::get('blog/{slug}/{id}', 'blogDetails')->name('blog.details');

Route::get('policy/{slug}/{id}', 'policyPages')->name('policy.pages');

Route::get('placeholder-image/{size}', 'placeholderImage')->name('placeholder.image');

Route::get('lottery-ticket', 'getSingleTicket')->name('lottery.ticket.single');
Route::get('lottery-tickets', 'lotteryTickets')->name('lottery.tickets');
Route::get('{slug}/{id}/play', 'playLottery')->name('lottery.play');

Route::get('results', 'results')->name('results');
Route::get('blogs', 'blogs')->name('blogs');
Route::get('faqs', 'faqs')->name('faqs');
Route::get('/{slug}', 'pages')->name('pages');
Route::get('/', 'index')->name('home');



});

-------------------------------------------------- ------------------------------------------------------------------------

core/app/Http/Controllers/User/WithdrawController.php


<?php
namespace App\Http\Controllers\User;
use App\Constants\Status;
use App\Http\Controllers\Controller;
use App\Lib\FormProcessor;
use App\Models\AdminNotification;
use App\Models\Transaction;
use App\Models\Withdrawal;
use App\Models\WithdrawMethod;
use Illuminate\Http\Request;
class WithdrawController extends Controller
{

public function withdrawMoney()
{
$withdrawMethod = WithdrawMethod::where('status',Status::ENABLE)->get();
$pageTitle = 'Withdraw Money';
return view($this->activeTemplate.'user.withdraw.methods', compact('pageTitle','withdrawMethod'));
}
public function withdrawStore(Request $request)
{
$this->validate($request, [
'method_code' => 'required',
'amount' => 'required|numeric'
]);
$method = WithdrawMethod::where('id', $request->method_code)->where('status', Status::ENABLE)->firstOrFail();
$user = auth()->user();
if ($request->amount < $method->min_limit) {
$notify[] = ['error', 'Your requested amount is smaller than minimum amount.'];
return back()->withNotify($notify);
}
if ($request->amount > $method->max_limit) {
$notify[] = ['error', 'Your requested amount is larger than maximum amount.'];
return back()->withNotify($notify);
}
if ($request->amount > $user->balance) {
$notify[] = ['error', 'You do not have sufficient balance for withdraw.'];
return back()->withNotify($notify);
}

$charge = $method->fixed_charge + ($request->amount * $method->percent_charge / 100);
$afterCharge = $request->amount - $charge;
$finalAmount = $afterCharge * $method->rate;
$withdraw = new Withdrawal();
$withdraw->method_id = $method->id; // wallet method ID
$withdraw->user_id = $user->id;
$withdraw->amount = $request->amount;
$withdraw->currency = $method->currency;
$withdraw->rate = $method->rate;
$withdraw->charge = $charge;
$withdraw->final_amount = $finalAmount;
$withdraw->after_charge = $afterCharge;
$withdraw->trx = getTrx();
$withdraw->save();
session()->put('wtrx', $withdraw->trx);
return to_route('user.withdraw.preview');
}
public function withdrawPreview()
{
$withdraw = Withdrawal::with('method','user')->where('trx', session()->get('wtrx'))->where('status', Status::pAYMENT_INITIATE)->orderBy('id','desc')->firstOrFail();
$pageTitle = 'Withdraw Preview';
return view($this->activeTemplate . 'user.withdraw.preview', compact('pageTitle','withdraw'));
}
public function withdrawSubmit(Request $request)
{
$withdraw = Withdrawal::with('method','user')->where('trx', session()->get('wtrx'))->where('status', Status::pAYMENT_INITIATE)->orderBy('id','desc')->firstOrFail();
$method = $withdraw->method;
if ($method->status == Status::DISABLE) {
abort(404);
}
$formData = $method->form->form_data;
$formProcessor = new FormProcessor();
$validationRule = $formProcessor->valueValidation($formData);
$request->validate($validationRule);
$userData = $formProcessor->processFormData($request, $formData);
$user = auth()->user();
if ($user->ts) {
$response = verifyG2fa($user,$request->authenticator_code);
if (!$response) {
$notify[] = ['error', 'Wrong verification code'];
return back()->withNotify($notify);
}
}
if ($withdraw->amount > $user->balance) {
$notify[] = ['error', 'Your request amount is larger then your current balance.'];
return back()->withNotify($notify);
}
$withdraw->status = Status::pAYMENT_PENDING;
$withdraw->withdraw_information = $userData;
$withdraw->save();
$user->balance -= $withdraw->amount;
$user->save();
$transaction = new Transaction();
$transaction->user_id = $withdraw->user_id;
$transaction->amount = $withdraw->amount;
$transaction->post_balance = $user->balance;
$transaction->charge = $withdraw->charge;
$transaction->trx_type = '-';
$transaction->details = showAmount($withdraw->final_amount) . ' ' . $withdraw->currency . ' Withdraw Via ' . $withdraw->method->name;
$transaction->trx = $withdraw->trx;
$transaction->remark = 'withdraw';
$transaction->save();
$adminNotification = new AdminNotification();
$adminNotification->user_id = $user->id;
$adminNotification->title = 'New withdraw request from '.$user->username;
$adminNotification->click_url = urlPath('admin.withdraw.details',$withdraw->id);
$adminNotification->save();
notify($user, 'WITHDRAW_REQUEST', [
'method_name' => $withdraw->method->name,
'method_currency' => $withdraw->currency,
'method_amount' => showAmount($withdraw->final_amount),
'amount' => showAmount($withdraw->amount),
'charge' => showAmount($withdraw->charge),
'rate' => showAmount($withdraw->rate),
'trx' => $withdraw->trx,
'post_balance' => showAmount($user->balance),
]);
$notify[] = ['success', 'Withdraw request sent successfully'];
return to_route('user.withdraw.history')->withNotify($notify);
}
public function withdrawLog(Request $request)
{
$pageTitle = "Withdraw Log";
$withdraws = Withdrawal::where('user_id', auth()->id())->where('status', '!=', Status::pAYMENT_INITIATE);
if ($request->search) {
$withdraws = $withdraws->where('trx',$request->search);
}
$withdraws = $withdraws->with('method')->orderBy('id','desc')->paginate(getPaginate());
return view($this->activeTemplate.'user.withdraw.log', compact('pageTitle','withdraws'));
}
}



---------------------------------------------------------------------------------------------------------------------------
gentlemen, good use everyone, I'm glad I was able to help you
please use code to paste code so this emoji wont show up and useful focn1`r\ othec1`r\\
 
  • Like
Reactions: Olegus and rmd10
Ladies & gentlemen. How's it going, has anyone found a solution to the output problem?
 
I am tormented by vague doubts!!!
I tried 5 installations of this script, downloaded from different resources, everywhere the same error!!!
It seems to me that the same script was leaked onto the network and now it’s hanging out on different sites.
The developer did a good job of advertising himself.:):):)
 

Undefined constant App\Constants\Status::pAYMENT_INITIATE ???​

Who can tell me how to fix it???
Appears when requesting a withdrawal through any payment system, Bank Transfer, Payer USD

2023-12-08_14-36-17.png
 
AdBlock Detected

We get it, advertisements are annoying!

However in order to keep our huge array of resources free of charge we need to generate income from ads so to use the site you will need to turn off your adblocker.

If you'd like to have an ad free experience you can become a Babiato Lover by donating as little as $5 per month. Click on the Donate menu tab for more info.

I've Disabled AdBlock