Skip to main content

bytefury/crater

8224 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.