Update, rebuild, and add a new API endpoint.

This commit is contained in:
James Cole
2024-01-17 20:23:02 +01:00
parent 66b0d9d309
commit 44df07a5f5
52 changed files with 1638 additions and 241 deletions

View File

@@ -23,12 +23,12 @@ declare(strict_types=1);
namespace FireflyIII\Providers;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\Facades\Response;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\ServiceProvider;
use Laravel\Passport\Passport;
use Laravel\Sanctum\Sanctum;
use Illuminate\Support\Facades\Blade;
/**
* Class AppServiceProvider
@@ -52,12 +52,13 @@ class AppServiceProvider extends ServiceProvider
return response()
->json($value)
->withHeaders($headers);
->withHeaders($headers)
;
});
// blade extension
Blade::directive('activeXRoutePartial', function (string $route) {
$name = \Route::getCurrentRoute()->getName() ?? '';
$name = \Route::getCurrentRoute()->getName() ?? '';
if (str_contains($name, $route)) {
return 'menu-open';
}
@@ -65,7 +66,7 @@ class AppServiceProvider extends ServiceProvider
return '';
});
Blade::if('partialroute', function (string $route) {
$name = \Route::getCurrentRoute()->getName() ?? '';
$name = \Route::getCurrentRoute()->getName() ?? '';
if (str_contains($name, $route)) {
return true;
}