mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Update docs
This commit is contained in:
parent
88423df8cb
commit
17872a3158
@ -11,15 +11,11 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers;
|
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\ClientEmailHistoryRequest;
|
||||||
use App\Http\Requests\Email\EntityEmailHistoryRequest;
|
use App\Http\Requests\Email\EntityEmailHistoryRequest;
|
||||||
|
use App\Models\Client;
|
||||||
|
use App\Models\SystemLog;
|
||||||
|
use App\Utils\Traits\MakesHash;
|
||||||
|
|
||||||
class EmailHistoryController extends BaseController
|
class EmailHistoryController extends BaseController
|
||||||
{
|
{
|
||||||
@ -33,17 +29,22 @@ class EmailHistoryController extends BaseController
|
|||||||
{
|
{
|
||||||
$data = SystemLog::where('client_id', $client->id)
|
$data = SystemLog::where('client_id', $client->id)
|
||||||
->where('category_id', SystemLog::CATEGORY_MAIL)
|
->where('category_id', SystemLog::CATEGORY_MAIL)
|
||||||
->orderBy('id','DESC')
|
->orderBy('id', 'DESC')
|
||||||
->map(function ($system_log){
|
->map(function ($system_log) {
|
||||||
if($system_log->log['history'] ?? false) {
|
if($system_log->log['history'] ?? false) {
|
||||||
return json_decode($system_log->log['history'], true);
|
return json_decode($system_log->log['history'], true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return response()->json($data, 200);
|
return response()->json($data, 200);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* May need to expand on this using
|
||||||
|
* just the message-id and search for the
|
||||||
|
* entity in the invitations
|
||||||
|
*/
|
||||||
public function entityHistory(EntityEmailHistoryRequest $request)
|
public function entityHistory(EntityEmailHistoryRequest $request)
|
||||||
{
|
{
|
||||||
/** @var \App\Models\User $user */
|
/** @var \App\Models\User $user */
|
||||||
@ -62,4 +63,4 @@ class EmailHistoryController extends BaseController
|
|||||||
return response()->json($data, 200);
|
return response()->json($data, 200);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user