Temporarily fix invoice emailing
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Clarkeash\Doorman\Exceptions\{ExpiredInviteCode,InvalidInviteCode,NotYourInviteCode};
|
||||
use Clarkeash\Doorman\Facades\Doorman;
|
||||
use Illuminate\View\View;
|
||||
use Barryvdh\Snappy\Facades\SnappyPdf as PDF;
|
||||
|
||||
@@ -33,10 +35,20 @@ class InvoiceController extends Controller
|
||||
* Render a specific invoice for the user
|
||||
*
|
||||
* @param Invoice $o
|
||||
* @param string|null $code
|
||||
* @return View
|
||||
*/
|
||||
public function view(Invoice $o): View
|
||||
public function view(Invoice $o,string $code=NULL): View
|
||||
{
|
||||
if ($code) {
|
||||
try {
|
||||
Doorman::redeem($code,$o->account->user->email);
|
||||
|
||||
} catch (ExpiredInviteCode|InvalidInviteCode|NotYourInviteCode $e) {
|
||||
abort(404);
|
||||
}
|
||||
}
|
||||
|
||||
return view('theme.backend.adminlte.invoice.view')
|
||||
->with('o',$o);
|
||||
}
|
||||
|
Reference in New Issue
Block a user