Add ability to delete earnings from earnings' index view
MODIFY
resources/views/earnings/index.blade.php
resources/views/earnings/index.blade.php
<div class="color-dark">{{ $earning->description }}</div>
<div class="mt-1" style="font-size: 14px; font-weight: 600;">{{ $earning->formatted_happened_on }}</div>
</div>
- <div class="row__column row__column--middle color-dark text-right">&euro; {{ $earning->formatted_amount }}</div>
+ <div class="row__column row__column--middle color-dark">&euro; {{ $earning->formatted_amount }}</div>
+ <div class="row__column row__column--middle row__column--compact">
+ <form method="POST" action="/earnings/{{ $earning->id }}">
+ {{ method_field('DELETE') }}
+ {{ csrf_field() }}
+ <button class="button link">
+ <i class="far fa-trash-alt"></i>
+ </button>
+ </form>
+ </div>
</div>
@endforeach
@else

Add ability to delete earnings from earnings' index view