Authorize destroy function in EarningController
MODIFY
app/Http/Controllers/EarningController.php
app/Http/Controllers/EarningController.php
@@ -45,7 +45,7 @@ class EarningController extends Controller {
}
public function destroy(Earning $earning) {
- // TODO CHECK IF USER IS AUTHORIZED
+ $this->authorize('delete', $earning);
$earning->delete();

Authorize destroy function in EarningController