Update docs

This commit is contained in:
David Bomba 2023-08-23 15:02:32 +10:00
parent 88423df8cb
commit 17872a3158

View File

@ -11,15 +11,11 @@
namespace App\Http\Controllers;
use App\Models\Quote;
use App\Models\Client;
use App\Models\Invoice;
use App\Models\SystemLog;
use App\Models\PurchaseOrder;
use App\Utils\Traits\MakesHash;
use App\Models\RecurringInvoice;
use App\Http\Requests\Email\ClientEmailHistoryRequest;
use App\Http\Requests\Email\EntityEmailHistoryRequest;
use App\Models\Client;
use App\Models\SystemLog;
use App\Utils\Traits\MakesHash;
class EmailHistoryController extends BaseController
{
@ -33,8 +29,8 @@ class EmailHistoryController extends BaseController
{
$data = SystemLog::where('client_id', $client->id)
->where('category_id', SystemLog::CATEGORY_MAIL)
->orderBy('id','DESC')
->map(function ($system_log){
->orderBy('id', 'DESC')
->map(function ($system_log) {
if($system_log->log['history'] ?? false) {
return json_decode($system_log->log['history'], true);
}
@ -44,6 +40,11 @@ class EmailHistoryController extends BaseController
}
/**
* May need to expand on this using
* just the message-id and search for the
* entity in the invitations
*/
public function entityHistory(EntityEmailHistoryRequest $request)
{
/** @var \App\Models\User $user */