Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

bytefury/crater

8213 stars
2 code files
View bytefury/crater on GitHub

routes/web.php

Open in GitHub
use Illuminate\Support\Facades\Route;
use Crater\Http\Controllers\V1\Invoice\InvoicePdfController;
 
//
Route::get('/invoices/pdf/{invoice:unique_hash}', InvoicePdfController::class);
//

app/Http/Controllers/V1/Invoice/InvoicePdfController.php

Open in GitHub
use Crater\Http\Controllers\Controller;
use Crater\Models\Invoice;
 
class InvoicePdfController extends Controller
{
public function __invoke(Invoice $invoice)
{
return $invoice->getGeneratedPDFOrStream('invoice');
}
}

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.