mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-19 11:14:06 +00:00
Laravel 11 (#84)
* Convert string references to `::class` PHP 5.5.9 adds the new static `class` property which provides the fully qualified class name. This is preferred over using strings for class names since the `class` property references are checked by PHP. * Use Faker methods Accessing Faker properties was deprecated in Faker 1.14. * Convert route options to fluent methods Laravel 8 adopts the tuple syntax for controller actions. Since the old options array is incompatible with this syntax, Shift converted them to use modern, fluent methods. * Adopt class based routes * Remove default `app` files * Shift core files * Streamline config files * Set new `ENV` variables * Default new `bootstrap/app.php` * Re-register HTTP middleware * Consolidate service providers * Re-register service providers * Re-register routes * Re-register scheduled commands * Bump Composer dependencies * Use `<env>` tags for configuration `<env>` tags have a lower precedence than system environment variables making it easier to overwrite PHPUnit configuration values in additional environments, such a CI. Review this blog post for more details on configuration precedence when testing Laravel: https://jasonmccreary.me/articles/laravel-testing-configuration-precedence/ * Adopt anonymous migrations * Rename `password_resets` table * Convert `$casts` property to method * Adopt Laravel type hints * Mark base controller as `abstract` * Remove `CreatesApplication` testing trait * Shift cleanup * Fix shift first issues * Updating Rules for laravel 11, sanctum config and pint * Fix Carbon issue on dashboard * Temporary fix for tests while migration is issue fixed on laravel side * Carbon needs numerical values, not strings * Minimum php version * Fix domain installation step not fetching the correct company_id * Fix Role Policy wasn't properly registered ---------
This commit is contained in:
214
routes/api.php
214
routes/api.php
@@ -1,111 +1,111 @@
|
||||
<?php
|
||||
|
||||
use App\Http\Controllers\AppVersionController;
|
||||
use App\Http\Controllers\V1\Admin\Auth\ForgotPasswordController;
|
||||
use App\Http\Controllers\V1\Admin\Auth\ResetPasswordController;
|
||||
use App\Http\Controllers\V1\Admin\Backup\BackupsController;
|
||||
use App\Http\Controllers\V1\Admin\Backup\DownloadBackupController;
|
||||
use App\Http\Controllers\V1\Admin\Company\CompaniesController;
|
||||
use App\Http\Controllers\V1\Admin\Company\CompanyController as AdminCompanyController;
|
||||
use App\Http\Controllers\V1\Admin\Customer\CustomersController;
|
||||
use App\Http\Controllers\V1\Admin\Customer\CustomerStatsController;
|
||||
use App\Http\Controllers\V1\Admin\CustomField\CustomFieldsController;
|
||||
use App\Http\Controllers\V1\Admin\Dashboard\DashboardController;
|
||||
use App\Http\Controllers\V1\Admin\Estimate\ChangeEstimateStatusController;
|
||||
use App\Http\Controllers\V1\Admin\Estimate\ConvertEstimateController;
|
||||
use App\Http\Controllers\V1\Admin\Estimate\EstimatesController;
|
||||
use App\Http\Controllers\V1\Admin\Estimate\EstimateTemplatesController;
|
||||
use App\Http\Controllers\V1\Admin\Estimate\SendEstimateController;
|
||||
use App\Http\Controllers\V1\Admin\Estimate\SendEstimatePreviewController;
|
||||
use App\Http\Controllers\V1\Admin\ExchangeRate\ExchangeRateProviderController;
|
||||
use App\Http\Controllers\V1\Admin\ExchangeRate\GetActiveProviderController;
|
||||
use App\Http\Controllers\V1\Admin\ExchangeRate\GetExchangeRateController;
|
||||
use App\Http\Controllers\V1\Admin\ExchangeRate\GetSupportedCurrenciesController;
|
||||
use App\Http\Controllers\V1\Admin\ExchangeRate\GetUsedCurrenciesController;
|
||||
use App\Http\Controllers\V1\Admin\Expense\ExpenseCategoriesController;
|
||||
use App\Http\Controllers\V1\Admin\Expense\ExpensesController;
|
||||
use App\Http\Controllers\V1\Admin\Expense\ShowReceiptController;
|
||||
use App\Http\Controllers\V1\Admin\Expense\UploadReceiptController;
|
||||
use App\Http\Controllers\V1\Admin\General\BootstrapController;
|
||||
use App\Http\Controllers\V1\Admin\General\BulkExchangeRateController;
|
||||
use App\Http\Controllers\V1\Admin\General\ConfigController;
|
||||
use App\Http\Controllers\V1\Admin\General\CountriesController;
|
||||
use App\Http\Controllers\V1\Admin\General\CurrenciesController;
|
||||
use App\Http\Controllers\V1\Admin\General\DateFormatsController;
|
||||
use App\Http\Controllers\V1\Admin\General\GetAllUsedCurrenciesController;
|
||||
use App\Http\Controllers\V1\Admin\General\NextNumberController;
|
||||
use App\Http\Controllers\V1\Admin\General\NotesController;
|
||||
use App\Http\Controllers\V1\Admin\General\NumberPlaceholdersController;
|
||||
use App\Http\Controllers\V1\Admin\General\SearchController;
|
||||
use App\Http\Controllers\V1\Admin\General\SearchUsersController;
|
||||
use App\Http\Controllers\V1\Admin\General\TimezonesController;
|
||||
use App\Http\Controllers\V1\Admin\Invoice\ChangeInvoiceStatusController;
|
||||
use App\Http\Controllers\V1\Admin\Invoice\CloneInvoiceController;
|
||||
use App\Http\Controllers\V1\Admin\Invoice\InvoicesController;
|
||||
use App\Http\Controllers\V1\Admin\Invoice\InvoiceTemplatesController;
|
||||
use App\Http\Controllers\V1\Admin\Invoice\SendInvoiceController;
|
||||
use App\Http\Controllers\V1\Admin\Invoice\SendInvoicePreviewController;
|
||||
use App\Http\Controllers\V1\Admin\Item\ItemsController;
|
||||
use App\Http\Controllers\V1\Admin\Item\UnitsController;
|
||||
use App\Http\Controllers\V1\Admin\Mobile\AuthController;
|
||||
use App\Http\Controllers\V1\Admin\Modules\ApiTokenController;
|
||||
use App\Http\Controllers\V1\Admin\Modules\CompleteModuleInstallationController;
|
||||
use App\Http\Controllers\V1\Admin\Modules\CopyModuleController;
|
||||
use App\Http\Controllers\V1\Admin\Modules\DisableModuleController;
|
||||
use App\Http\Controllers\V1\Admin\Modules\DownloadModuleController;
|
||||
use App\Http\Controllers\V1\Admin\Modules\EnableModuleController;
|
||||
use App\Http\Controllers\V1\Admin\Modules\ModuleController;
|
||||
use App\Http\Controllers\V1\Admin\Modules\ModulesController;
|
||||
use App\Http\Controllers\V1\Admin\Modules\UnzipModuleController;
|
||||
use App\Http\Controllers\V1\Admin\Modules\UploadModuleController;
|
||||
use App\Http\Controllers\V1\Admin\Payment\PaymentMethodsController;
|
||||
use App\Http\Controllers\V1\Admin\Payment\PaymentsController;
|
||||
use App\Http\Controllers\V1\Admin\Payment\SendPaymentController;
|
||||
use App\Http\Controllers\V1\Admin\Payment\SendPaymentPreviewController;
|
||||
use App\Http\Controllers\V1\Admin\RecurringInvoice\RecurringInvoiceController;
|
||||
use App\Http\Controllers\V1\Admin\RecurringInvoice\RecurringInvoiceFrequencyController;
|
||||
use App\Http\Controllers\V1\Admin\Role\AbilitiesController;
|
||||
use App\Http\Controllers\V1\Admin\Role\RolesController;
|
||||
use App\Http\Controllers\V1\Admin\Settings\CompanyController;
|
||||
use App\Http\Controllers\V1\Admin\Settings\CompanyCurrencyCheckTransactionsController;
|
||||
use App\Http\Controllers\V1\Admin\Settings\DiskController;
|
||||
use App\Http\Controllers\V1\Admin\Settings\GetCompanyMailConfigurationController;
|
||||
use App\Http\Controllers\V1\Admin\Settings\GetCompanySettingsController;
|
||||
use App\Http\Controllers\V1\Admin\Settings\GetSettingsController;
|
||||
use App\Http\Controllers\V1\Admin\Settings\GetUserSettingsController;
|
||||
use App\Http\Controllers\V1\Admin\Settings\MailConfigurationController;
|
||||
use App\Http\Controllers\V1\Admin\Settings\TaxTypesController;
|
||||
use App\Http\Controllers\V1\Admin\Settings\UpdateCompanySettingsController;
|
||||
use App\Http\Controllers\V1\Admin\Settings\UpdateSettingsController;
|
||||
use App\Http\Controllers\V1\Admin\Settings\UpdateUserSettingsController;
|
||||
use App\Http\Controllers\V1\Admin\Update\CheckVersionController;
|
||||
use App\Http\Controllers\V1\Admin\Update\CopyFilesController;
|
||||
use App\Http\Controllers\V1\Admin\Update\DeleteFilesController;
|
||||
use App\Http\Controllers\V1\Admin\Update\DownloadUpdateController;
|
||||
use App\Http\Controllers\V1\Admin\Update\FinishUpdateController;
|
||||
use App\Http\Controllers\V1\Admin\Update\MigrateUpdateController;
|
||||
use App\Http\Controllers\V1\Admin\Update\UnzipUpdateController;
|
||||
use App\Http\Controllers\V1\Admin\Users\UsersController;
|
||||
use App\Http\Controllers\V1\Customer\Auth\ForgotPasswordController as AuthForgotPasswordController;
|
||||
use App\Http\Controllers\V1\Customer\Auth\ResetPasswordController as AuthResetPasswordController;
|
||||
use App\Http\Controllers\V1\Customer\Estimate\AcceptEstimateController as CustomerAcceptEstimateController;
|
||||
use App\Http\Controllers\V1\Customer\Estimate\EstimatesController as CustomerEstimatesController;
|
||||
use App\Http\Controllers\V1\Customer\Expense\ExpensesController as CustomerExpensesController;
|
||||
use App\Http\Controllers\V1\Customer\General\BootstrapController as CustomerBootstrapController;
|
||||
use App\Http\Controllers\V1\Customer\General\DashboardController as CustomerDashboardController;
|
||||
use App\Http\Controllers\V1\Customer\General\ProfileController as CustomerProfileController;
|
||||
use App\Http\Controllers\V1\Customer\Invoice\InvoicesController as CustomerInvoicesController;
|
||||
use App\Http\Controllers\V1\Customer\Payment\PaymentMethodController;
|
||||
use App\Http\Controllers\V1\Customer\Payment\PaymentsController as CustomerPaymentsController;
|
||||
use App\Http\Controllers\V1\Installation\AppDomainController;
|
||||
use App\Http\Controllers\V1\Installation\DatabaseConfigurationController;
|
||||
use App\Http\Controllers\V1\Installation\FilePermissionsController;
|
||||
use App\Http\Controllers\V1\Installation\FinishController;
|
||||
use App\Http\Controllers\V1\Installation\LoginController;
|
||||
use App\Http\Controllers\V1\Installation\OnboardingWizardController;
|
||||
use App\Http\Controllers\V1\Installation\RequirementsController;
|
||||
use App\Http\Controllers\V1\Webhook\CronJobController;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use InvoiceShelf\Http\Controllers\AppVersionController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Auth\ForgotPasswordController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Auth\ResetPasswordController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Backup\BackupsController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Backup\DownloadBackupController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Company\CompaniesController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Company\CompanyController as AdminCompanyController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Customer\CustomersController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Customer\CustomerStatsController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\CustomField\CustomFieldsController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Dashboard\DashboardController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Estimate\ChangeEstimateStatusController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Estimate\ConvertEstimateController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Estimate\EstimatesController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Estimate\EstimateTemplatesController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Estimate\SendEstimateController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Estimate\SendEstimatePreviewController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\ExchangeRate\ExchangeRateProviderController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\ExchangeRate\GetActiveProviderController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\ExchangeRate\GetExchangeRateController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\ExchangeRate\GetSupportedCurrenciesController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\ExchangeRate\GetUsedCurrenciesController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Expense\ExpenseCategoriesController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Expense\ExpensesController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Expense\ShowReceiptController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Expense\UploadReceiptController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\General\BootstrapController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\General\BulkExchangeRateController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\General\ConfigController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\General\CountriesController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\General\CurrenciesController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\General\DateFormatsController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\General\GetAllUsedCurrenciesController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\General\NextNumberController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\General\NotesController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\General\NumberPlaceholdersController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\General\SearchController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\General\SearchUsersController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\General\TimezonesController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Invoice\ChangeInvoiceStatusController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Invoice\CloneInvoiceController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Invoice\InvoicesController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Invoice\InvoiceTemplatesController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Invoice\SendInvoiceController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Invoice\SendInvoicePreviewController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Item\ItemsController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Item\UnitsController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Mobile\AuthController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Modules\ApiTokenController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Modules\CompleteModuleInstallationController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Modules\CopyModuleController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Modules\DisableModuleController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Modules\DownloadModuleController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Modules\EnableModuleController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Modules\ModuleController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Modules\ModulesController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Modules\UnzipModuleController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Modules\UploadModuleController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Payment\PaymentMethodsController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Payment\PaymentsController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Payment\SendPaymentController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Payment\SendPaymentPreviewController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\RecurringInvoice\RecurringInvoiceController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\RecurringInvoice\RecurringInvoiceFrequencyController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Role\AbilitiesController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Role\RolesController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Settings\CompanyController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Settings\CompanyCurrencyCheckTransactionsController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Settings\DiskController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Settings\GetCompanyMailConfigurationController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Settings\GetCompanySettingsController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Settings\GetSettingsController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Settings\GetUserSettingsController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Settings\MailConfigurationController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Settings\TaxTypesController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Settings\UpdateCompanySettingsController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Settings\UpdateSettingsController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Settings\UpdateUserSettingsController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Update\CheckVersionController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Update\CopyFilesController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Update\DeleteFilesController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Update\DownloadUpdateController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Update\FinishUpdateController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Update\MigrateUpdateController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Update\UnzipUpdateController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Admin\Users\UsersController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Customer\Auth\ForgotPasswordController as AuthForgotPasswordController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Customer\Auth\ResetPasswordController as AuthResetPasswordController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Customer\Estimate\AcceptEstimateController as CustomerAcceptEstimateController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Customer\Estimate\EstimatesController as CustomerEstimatesController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Customer\Expense\ExpensesController as CustomerExpensesController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Customer\General\BootstrapController as CustomerBootstrapController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Customer\General\DashboardController as CustomerDashboardController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Customer\General\ProfileController as CustomerProfileController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Customer\Invoice\InvoicesController as CustomerInvoicesController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Customer\Payment\PaymentMethodController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Customer\Payment\PaymentsController as CustomerPaymentsController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Installation\AppDomainController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Installation\DatabaseConfigurationController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Installation\FilePermissionsController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Installation\FinishController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Installation\LoginController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Installation\OnboardingWizardController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Installation\RequirementsController;
|
||||
use InvoiceShelf\Http\Controllers\V1\Webhook\CronJobController;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -139,7 +139,7 @@ Route::prefix('/v1')->group(function () {
|
||||
// Authentication & Password Reset
|
||||
//----------------------------------
|
||||
|
||||
Route::group(['prefix' => 'auth'], function () {
|
||||
Route::prefix('auth')->group(function () {
|
||||
Route::post('login', [AuthController::class, 'login']);
|
||||
|
||||
Route::post('logout', [AuthController::class, 'logout'])->middleware('auth:sanctum');
|
||||
@@ -467,7 +467,7 @@ Route::prefix('/v1')->group(function () {
|
||||
// Authentication & Password Reset
|
||||
//----------------------------------
|
||||
|
||||
Route::group(['prefix' => 'auth'], function () {
|
||||
Route::prefix('auth')->group(function () {
|
||||
|
||||
// Send reset password mail
|
||||
Route::post('password/email', [AuthForgotPasswordController::class, 'sendResetLinkEmail']);
|
||||
|
||||
Reference in New Issue
Block a user