casino.blade.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. @extends('layout')
  2. @section('content')
  3. <style>
  4. .bd-placeholder-img {
  5. font-size: 1.125rem;
  6. text-anchor: middle;
  7. }
  8. @media (min-width: 768px) {
  9. .bd-placeholder-img-lg {
  10. font-size: 3.5rem;
  11. }
  12. }
  13. </style>
  14. <!-- Custom styles for this template -->
  15. <link href="css/form-validation.css" rel="stylesheet">
  16. </head>
  17. <body class="bg-light">
  18. <div class="container">
  19. <div class="py-5 text-center">
  20. <img class="d-block mx-auto mb-4" src="/docs/4.3.1/assets/brand/bootstrap-solid.svg" alt="" width="72" height="72" alt="bootstrap">
  21. <h1>Try your luck</h1>
  22. <p class="lead">Enter your email and the amount of money you want to bet</p>
  23. <?php
  24. if(!empty($_POST)){
  25. if($newmon!=0){
  26. echo "<div class='alert alert-success'><p class='lead'>You won ".$newmon."!</p></div>";
  27. }
  28. else{
  29. echo "<div class='alert alert-danger'><p class='lead'>You lost ".$mon."!</p></div>";
  30. }
  31. }
  32. ?>
  33. </div>
  34. <form method="POST" class="needs-validation" novalidate="" action="{{url('casino')}}">
  35. {{csrf_field()}}
  36. <div class="mycol-md-4" >
  37. <label for="firstName">Enter the amount of money</label>
  38. @if($errors->has('num')) has-danger @endif
  39. <input type="text" name="num" class="form-control" id="num" @if($errors->has('num')) is-invalid @endif>
  40. @error('num')
  41. @foreach ($errors->all() as $error)
  42. <li>{{ $error }}</li>
  43. @endforeach
  44. @enderror
  45. <hr class="mb-4">
  46. <button class="btn btn-primary btn-lg btn-block" type="submit">Continue to checkout</button>
  47. </div>
  48. </form>
  49. </body>
  50. </html>
  51. @endsection