mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
b35bff3cde
* Sending support messages via API * Sending log files only if self-hosted * Remove legacy code
27 lines
587 B
PHP
27 lines
587 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Support\Messages;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Mail\SupportMessageSent;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Facades\Mail;
|
|
|
|
class SendingController extends Controller
|
|
{
|
|
public function __invoke(Request $request)
|
|
{
|
|
$request->validate([
|
|
'message' => ['required'],
|
|
]);
|
|
|
|
Mail::to(config('ninja.contact.ninja_official_contact'))
|
|
->send(new SupportMessageSent($request->message));
|
|
|
|
return response()->json([
|
|
'success' => true
|
|
]);
|
|
}
|
|
|
|
}
|