add basic logging

This commit is contained in:
TimmensOne
2023-04-04 15:52:47 +02:00
parent a9bb17d7bc
commit faee0574ae
6 changed files with 34 additions and 3 deletions

View File

@@ -5,6 +5,7 @@ namespace App\Http\Controllers;
use App\Models\Device;
use App\Models\OwnerTransaction;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
class OwnerTransactionController extends Controller
{
@@ -23,6 +24,8 @@ class OwnerTransactionController extends Controller
$formFields['device_id'] = $device->device_id;
OwnerTransaction::create($formFields);
Log::info('Owner saved successfully');
return redirect('/');
}
@@ -42,6 +45,8 @@ class OwnerTransactionController extends Controller
$owner->update($formFields);
Log::info('Owner updated successfully');
return redirect('/');
}
@@ -49,6 +54,9 @@ class OwnerTransactionController extends Controller
{
$this->authorize('admin-only');
$owner->delete();
Log::info('Owner deleted successfully');
return back();
}
}