Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 33 additions & 28 deletions WebSecService/resources/views/welcome.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,40 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap Test</title>
<link href="public/css/bootstrap.min.css" rel="stylesheet">
<script src="public/js/bootstrap.bundle.min.js"></script>
<title>Multiplication Table</title>
<link rel="stylesheet" href="{{ asset('css/bootstrap.min.css') }}">
<script src="{{ asset('js/bootstrap.bundle.min.js') }}"></script>
</head>
<?php
function isPrime($number) {
if($number<=1) return false;
$i = $number - 1;
while($i>1) {
if($number%$i==0) return false;
$i--;
}
return true;
}
?>

<body>
<div class="card m-4">
<div class="card-header">Prime Numbers</div>
<div class="card-body">
@foreach (range(1, 100) as $i)
@if(isPrime($i))
<span class="badge bg-primary">{{$i}}</span>
@else
<span class="badge bg-secondary">{{$i}}</span>
@endif
@endforeach
</div>
</div>
<div class="container text-center mt-5">
<h1 class="text-primary">Multiplication Table bootstrap Styled</h1>
<p class="lead">This is a simple Multiplication table using bootstrap.</p>
</div>
<div class="container mt-5">
<h2 class="text-center mb-4">Multiplication Table</h2>
<div class="table-responsive">
<table class="table table-bordered table-striped text-center">
<thead class="table-dark">
<tr>
<th>&times;</th>
@for ($col = 1; $col <= 9; $col++)
<th>{{ $col }}</th>
@endfor
</tr>
</thead>
<tbody>
@for ($row = 1; $row <= 5; $row++)
<tr>
<th class="table-secondary">{{ $row }}</th>
@for ($col = 1; $col <= 9; $col++)
<td>{{ $row * $col }}</td>
@endfor
</tr>
@endfor
</tbody>
</table>
</div>
</div>
</body>

</html>