Hello guys,
So, bought a php script on some site, and for the life of my I cannot reach the dev.
I scourged google, but I have no understanding of laravel...
I have 2 bugs that stop me from using the script, so I ask for some help here...
It seems I have 2 variables which are undefined and won't allow me to login, neither as a user, nor as admin.
code1 and coins
First:
Undefined variable: code1 (View: C:\laragon\www\ventz\app\resources\views\auth\login.blade.php)
My RedirectifAutenthicated.php
public function handle($request, Closure $next, $guard = null)
{
if (Auth::guard($guard)->check()) {
return redirect('user/home');
}
return $next($request);
}
}
My login.blade.php
<? $code1 = substr(str_shuffle('ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890') , 0 , 5 );?>
<div class="form-group">
<b>Code: {{$code1}}</b>
<script>
function myFunction() {
var code = $('#usd').val() ;
var a = "{{$code1}}";
if(code == a){
document.getElementById("show").innerHTML = "<br><button type='submit' class='btn btn-bg--primary btn-size--md btn-hover--3d'>Sign In</button>"; }
else
{
document.getElementById("show").innerHTML = "<p class='text-danger'>Please enter a correct code to activate login button</p>";
}
};
</script>
<input type="email" class="form-control" id="usd" onkeyup="myFunction()" placeholder="Enter Code" required/>
And second :coins
Undefined variable: coins (View: C:\laragon\www\ventz\app\resources\views\include\admindashboard.blade.php)
My admindashboard.blade.php
<? $coins = DB::table('coins')->get(); ?>
@foreach($coins as $data)
<li><a href="{{route('admin.blockchainwallet', $data->id)}}"><em class="text-primary cf cf-coin"></em> {{$data->name}}</a></li>
@endforeach
Could you please give some hints? Can this be fixed?
Thank you