@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | { |
| 16 | 16 | $tableNames = config('invoice.table_names'); |
| 17 | 17 | |
| 18 | - Schema::create($tableNames['invoices'], function (Blueprint $table) { |
|
| 18 | + Schema::create($tableNames['invoices'], function(Blueprint $table) { |
|
| 19 | 19 | $table->uuid('id')->primary(); |
| 20 | 20 | $table->uuid('related_id'); |
| 21 | 21 | $table->string('related_type'); |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | $table->index(['invoicable_id', 'invoicable_type']); |
| 38 | 38 | }); |
| 39 | 39 | |
| 40 | - Schema::create($tableNames['invoice_lines'], function (Blueprint $table) { |
|
| 40 | + Schema::create($tableNames['invoice_lines'], function(Blueprint $table) { |
|
| 41 | 41 | $table->uuid('id')->primary(); |
| 42 | 42 | $table->bigInteger('amount')->default(0)->description('in cents, including tax'); |
| 43 | 43 | $table->bigInteger('tax')->default(0)->description('in cents'); |
@@ -35,10 +35,10 @@ |
||
| 35 | 35 | => database_path('migrations/2017_06_17_163005_create_invoices_tables.php'), |
| 36 | 36 | ], 'migrations'); |
| 37 | 37 | |
| 38 | - $this->app->bind(InvoiceServiceInterface::class, function ($app) { |
|
| 38 | + $this->app->bind(InvoiceServiceInterface::class, function($app) { |
|
| 39 | 39 | return new InvoiceService(); |
| 40 | 40 | }); |
| 41 | - $this->app->bind(BillServiceInterface::class, function ($app) { |
|
| 41 | + $this->app->bind(BillServiceInterface::class, function($app) { |
|
| 42 | 42 | return new BillService(); |
| 43 | 43 | }); |
| 44 | 44 | } |
@@ -212,11 +212,11 @@ discard block |
||
| 212 | 212 | */ |
| 213 | 213 | public function pdf(array $data = []): string |
| 214 | 214 | { |
| 215 | - if (! defined('DOMPDF_ENABLE_AUTOLOAD')) { |
|
| 215 | + if (!defined('DOMPDF_ENABLE_AUTOLOAD')) { |
|
| 216 | 216 | define('DOMPDF_ENABLE_AUTOLOAD', false); |
| 217 | 217 | } |
| 218 | 218 | |
| 219 | - if (file_exists($configPath = base_path().'/vendor/dompdf/dompdf/dompdf_config.inc.php')) { |
|
| 219 | + if (file_exists($configPath = base_path() . '/vendor/dompdf/dompdf/dompdf_config.inc.php')) { |
|
| 220 | 220 | require_once $configPath; |
| 221 | 221 | } |
| 222 | 222 | |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | |
| 236 | 236 | return new Response($this->pdf($data), 200, [ |
| 237 | 237 | 'Content-Description' => 'File Transfer', |
| 238 | - 'Content-Disposition' => 'attachment; filename="'.$filename.'"', |
|
| 238 | + 'Content-Disposition' => 'attachment; filename="' . $filename . '"', |
|
| 239 | 239 | 'Content-Transfer-Encoding' => 'binary', |
| 240 | 240 | 'Content-Type' => 'application/pdf', |
| 241 | 241 | ]); |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | protected static function boot() |
| 35 | 35 | { |
| 36 | 36 | parent::boot(); |
| 37 | - static::creating(function ($model) { |
|
| 37 | + static::creating(function($model) { |
|
| 38 | 38 | /** |
| 39 | 39 | * @var \Illuminate\Database\Eloquent\Model $model |
| 40 | 40 | */ |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | { |
| 30 | 30 | parent::boot(); |
| 31 | 31 | static::addGlobalScope(new InvoiceScope()); |
| 32 | - static::creating(function ($model) { |
|
| 32 | + static::creating(function($model) { |
|
| 33 | 33 | /** |
| 34 | 34 | * @var \Illuminate\Database\Eloquent\Model $model |
| 35 | 35 | */ |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | * @var array |
| 17 | 17 | */ |
| 18 | 18 | protected $fillable = [ |
| 19 | - 'related_id', 'related_type', 'tax', 'total', 'discount', 'currency', |
|
| 19 | + 'related_id', 'related_type', 'tax', 'total', 'discount', 'currency', |
|
| 20 | 20 | 'reference', 'status', 'receiver_info', 'sender_info', 'payment_info', 'note', 'is_bill' |
| 21 | 21 | ]; |
| 22 | 22 | |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | { |
| 29 | 29 | parent::boot(); |
| 30 | 30 | static::addGlobalScope(new BillScope()); |
| 31 | - static::creating(function ($model) { |
|
| 31 | + static::creating(function($model) { |
|
| 32 | 32 | /** |
| 33 | 33 | * @var \Illuminate\Database\Eloquent\Model $model |
| 34 | 34 | */ |