fix: 🐛 See last commit
This commit is contained in:
parent
b80a8640de
commit
e3e7329d31
|
@ -106,11 +106,12 @@ class ServerController extends Controller
|
||||||
if (FacadesRequest::has("product")) {
|
if (FacadesRequest::has("product")) {
|
||||||
$product = Product::findOrFail(FacadesRequest::input("product"));
|
$product = Product::findOrFail(FacadesRequest::input("product"));
|
||||||
|
|
||||||
|
error_log(Auth::user()->credits);
|
||||||
|
error_log($product->price);
|
||||||
|
|
||||||
|
error_log(Auth::user()->credits < $product->price ? "true" : "false");
|
||||||
if (
|
if (
|
||||||
Auth::user()->credits <
|
Auth::user()->credits < $product->minimum_credits ||
|
||||||
($product->minimum_credits == -1
|
|
||||||
? config('SETTINGS::USER:MINIMUM_REQUIRED_CREDITS_TO_MAKE_SERVER', 50)
|
|
||||||
: $product->minimum_credits) ||
|
|
||||||
Auth::user()->credits < $product->price
|
Auth::user()->credits < $product->price
|
||||||
) {
|
) {
|
||||||
return redirect()->route('servers.index')->with('error', "You do not have the required amount of " . CREDITS_DISPLAY_NAME . " to use this product!");
|
return redirect()->route('servers.index')->with('error', "You do not have the required amount of " . CREDITS_DISPLAY_NAME . " to use this product!");
|
||||||
|
|
Loading…
Reference in a new issue