@if(count($errors) > 0 )
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<ul class="p-0 m-0" style="list-style: none;">
@foreach($errors->all() as $error)
<li>{{$error}}</li>
@endforeach
</ul>
</div>
@endif
<?php
namespace TestsFeature;
use TestsTestCase;
class exampleTest extends TestCase
{
public function test_with_message_on_error()
{
for ($i = 0; $i < 10; $i++)
// assertLessThan(needed, calucalted, onErrorMessage)
$this->assertLessThan(3, $i, ">>>>>>>> different index: " . $i);
}
}
// output
>>>>>>>> different index: 3
Failed asserting that 3 is less than 3.