You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CreateInvoice.php 614B

123456789101112131415161718192021222324
  1. <?php
  2. namespace App\Filament\Company\Resources\Sales\InvoiceResource\Pages;
  3. use App\Filament\Company\Resources\Sales\InvoiceResource;
  4. use Filament\Resources\Pages\CreateRecord;
  5. use Filament\Support\Enums\MaxWidth;
  6. class CreateInvoice extends CreateRecord
  7. {
  8. protected static string $resource = InvoiceResource::class;
  9. public function getMaxContentWidth(): MaxWidth | string | null
  10. {
  11. return MaxWidth::Full;
  12. }
  13. protected function mutateFormDataBeforeCreate(array $data): array
  14. {
  15. $data['type'] = 'invoice';
  16. return parent::mutateFormDataBeforeCreate($data);
  17. }
  18. }