Archived
feat: logging
This commit is contained in:
1 parent
b3784b77b1
commit
ceb4f36ba1
12 files changed
+169
-24
No files matched your search
@@ -19,7 +19,12 @@ class RequestedQuote extends Model
|
||||
|
||||
public function approve(): void
|
||||
{
|
||||
// TODO: we'll probs want to log who approved this quote
|
||||
Log::create([
|
||||
'user_id' => auth()?->user()?->id,
|
||||
'requested_quote_id' => $this->id,
|
||||
'content' => 'Quote approved.'
|
||||
]);
|
||||
|
||||
Quote::create([
|
||||
'quote' => $this->quote,
|
||||
]);
|
||||
@@ -29,7 +34,11 @@ class RequestedQuote extends Model
|
||||
|
||||
public function reject(): void
|
||||
{
|
||||
// TODO: we'll probs want to log who reject this quote
|
||||
Log::create([
|
||||
'user_id' => auth()?->user()?->id,
|
||||
'requested_quote_id' => $this->id,
|
||||
'content' => 'Quote rejected.'
|
||||
]);
|
||||
|
||||
$this->delete();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user