Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

Commit

Permalink
crater-invoice-inc#1047: upgrade vite, had to upgrade Laravel as well
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsdrost7 committed Jan 27, 2024
1 parent e1baac7 commit 67a3503
Show file tree
Hide file tree
Showing 17 changed files with 3,685 additions and 3,322 deletions.
3 changes: 2 additions & 1 deletion app/Http/Controllers/V1/Installation/AppDomainController.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ public function __invoke(DomainEnvironmentRequest $request)
$results = $environmentManager->saveDomainVariables($request);

if (in_array('error', $results)) {
return response()->json($results);
dd($results);
//return response()->json($results);
}

return response()->json([
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ class Kernel extends HttpKernel
* @var array
*/
protected $middleware = [
\Crater\Http\Middleware\TrustProxies::class,
\Illuminate\Http\Middleware\HandleCors::class,
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
\Crater\Http\Middleware\TrimStrings::class,
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
\Crater\Http\Middleware\TrustProxies::class,
\Crater\Http\Middleware\ConfigMiddleware::class,
\Fruitcake\Cors\HandleCors::class,
];

/**
Expand Down
15 changes: 10 additions & 5 deletions app/Http/Middleware/TrustProxies.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,27 @@

namespace Crater\Http\Middleware;

use Fideloper\Proxy\TrustProxies as Middleware;
use Illuminate\Http\Middleware\TrustProxies as Middleware;
use Illuminate\Http\Request;

class TrustProxies extends Middleware
{
/**
* The trusted proxies for this application.
*
* @var array
* @var array<int, string>|string|null
*/
protected $proxies;

/**
* The current proxy header mappings.
* The headers that should be used to detect proxies.
*
* @var array
* @var int
*/
protected $headers = Request::HEADER_X_FORWARDED_ALL;
protected $headers =
Request::HEADER_X_FORWARDED_FOR |
Request::HEADER_X_FORWARDED_HOST |
Request::HEADER_X_FORWARDED_PORT |
Request::HEADER_X_FORWARDED_PROTO |
Request::HEADER_X_FORWARDED_AWS_ELB;
}
4 changes: 2 additions & 2 deletions app/Models/Estimate.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Crater\Models;

use App;
use Barryvdh\DomPDF\Facade as PDF;
use Barryvdh\DomPDF\Facade\Pdf as PDF;
use Carbon\Carbon;
use Crater\Mail\SendEstimateMail;
use Crater\Services\SerialNumberFormatter;
Expand Down Expand Up @@ -495,7 +495,7 @@ public static function estimateTemplates()
foreach ($templates as $key => $template) {
$templateName = Str::before(basename($template), '.blade.php');
$estimateTemplates[$key]['name'] = $templateName;
$estimateTemplates[$key]['path'] = vite_asset('/img/PDF/'.$templateName.'.png');
$estimateTemplates[$key]['path'] = asset('/img/PDF/'.$templateName.'.png');
}

return $estimateTemplates;
Expand Down
2 changes: 1 addition & 1 deletion app/Models/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Crater\Models;

use App;
use Barryvdh\DomPDF\Facade as PDF;
use Barryvdh\DomPDF\Facade\Pdf as PDF;
use Carbon\Carbon;
use Crater\Mail\SendInvoiceMail;
use Crater\Services\SerialNumberFormatter;
Expand Down
2 changes: 1 addition & 1 deletion app/Models/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Crater\Models;

use Barryvdh\DomPDF\Facade as PDF;
use Barryvdh\DomPDF\Facade\Pdf as PDF;
use Carbon\Carbon;
use Crater\Jobs\GeneratePaymentPdfJob;
use Crater\Mail\SendPaymentMail;
Expand Down
68 changes: 33 additions & 35 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,42 @@
"license": "MIT",
"type": "project",
"require": {
"php": "^7.4 || ^8.0",
"aws/aws-sdk-php": "^3.142",
"barryvdh/laravel-dompdf": "^0.9.0",
"crater-invoice/modules": "^1.0.0",
"doctrine/dbal": "^2.10",
"dragonmantank/cron-expression": "^3.1",
"fideloper/proxy": "^4.0",
"fruitcake/laravel-cors": "^1.0",
"guzzlehttp/guzzle": "^7.0.1",
"intervention/image": "^2.3",
"jasonmccreary/laravel-test-assertions": "^2.0",
"laravel/framework": "^8.0",
"laravel/helpers": "^1.1",
"laravel/sanctum": "^2.6",
"laravel/tinker": "^2.0",
"laravel/ui": "^3.0",
"lavary/laravel-menu": "^1.8",
"league/flysystem-aws-s3-v3": "^1.0",
"predis/predis": "^1.1",
"silber/bouncer": "v1.0.0-rc.10",
"spatie/flysystem-dropbox": "^1.2",
"spatie/laravel-backup": "^6.11",
"spatie/laravel-medialibrary": "^8.7",
"vinkla/hashids": "^9.0"
"php": "^8.1",
"aws/aws-sdk-php": "^3.296.6",
"barryvdh/laravel-dompdf": "^2.0.1",
"crater-invoice/modules": "^1.0",
"doctrine/dbal": "^3.7.2",
"dragonmantank/cron-expression": "^3.3.3",
"guzzlehttp/guzzle": "^7.8.1",
"intervention/image": "^2.7.2",
"jasonmccreary/laravel-test-assertions": "^2.3",
"laravel/framework": "^10.41",
"laravel/helpers": "^1.7",
"laravel/sanctum": "^3.3.3",
"laravel/tinker": "^2.9",
"laravel/ui": "^4.4",
"lavary/laravel-menu": "^1.8.4",
"league/flysystem-aws-s3-v3": "^3.22",
"predis/predis": "^2.2.2",
"silber/bouncer": "^1.0.1",
"spatie/flysystem-dropbox": "^3.0.1",
"spatie/laravel-backup": "^8.5",
"spatie/laravel-medialibrary": "^10.15",
"vinkla/hashids": "^11.0"
},
"require-dev": {
"barryvdh/laravel-ide-helper": "^2.6",
"beyondcode/laravel-dump-server": "^1.0",
"facade/ignition": "^2.3.6",
"friendsofphp/php-cs-fixer": "^3.8",
"fakerphp/faker": "^1.9.1",
"mockery/mockery": "^1.3.1",
"nunomaduro/collision": "^5.0",
"pestphp/pest": "^1.0",
"barryvdh/laravel-ide-helper": "^2.13",
"beyondcode/laravel-dump-server": "^1.9",
"friendsofphp/php-cs-fixer": "^3.48",
"fakerphp/faker": "^1.23.1",
"mockery/mockery": "^1.6.7",
"nunomaduro/collision": "^6.4",
"pestphp/pest": "^1.23.1",
"pestphp/pest-plugin-faker": "^1.0",
"pestphp/pest-plugin-laravel": "^1.0",
"pestphp/pest-plugin-parallel": "^0.2.1",
"phpunit/phpunit": "^9.3"
"pestphp/pest-plugin-laravel": "^1.4",
"pestphp/pest-plugin-parallel": "^1.2.1",
"phpunit/phpunit": "^9.6.16",
"spatie/laravel-ignition": "^2.4.1"
},
"autoload": {
"psr-4": {
Expand Down
Loading

0 comments on commit 67a3503

Please sign in to comment.