add basic logging
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user