Commit ad336283 authored by Mahmoud Aglan's avatar Mahmoud Aglan

Fix: InvoicePrintController calling undefined authorize() method

Laravel 13 base Controller has no AuthorizesRequests trait.
Use Gate::authorize() facade instead.
Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent 96a03740
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Domain\Financial\Models\Invoice; use App\Domain\Financial\Models\Invoice;
use Illuminate\Http\Request; use Illuminate\Support\Facades\Gate;
class InvoicePrintController extends Controller class InvoicePrintController extends Controller
{ {
public function __invoke(Invoice $invoice) public function __invoke(Invoice $invoice)
{ {
$this->authorize('invoices.view'); Gate::authorize('invoices.view');
$invoice->load(['items', 'payments', 'billable']); $invoice->load(['items', 'payments', 'billable']);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment