Selaa lähdekoodia

Merge pull request #202 from andrewdwallo/upgrade/laravel-12

Upgrade/laravel 12
3.x
Andrew Wallo 1 kuukausi sitten
vanhempi
commit
597d943ca4
No account linked to committer's email address

+ 4
- 2
.env.example Näytä tiedosto

12
 APP_MAINTENANCE_DRIVER=file
12
 APP_MAINTENANCE_DRIVER=file
13
 APP_MAINTENANCE_STORE=database
13
 APP_MAINTENANCE_STORE=database
14
 
14
 
15
+PHP_CLI_SERVER_WORKERS=4
16
+
15
 BCRYPT_ROUNDS=12
17
 BCRYPT_ROUNDS=12
16
 
18
 
17
 LOG_CHANNEL=stack
19
 LOG_CHANNEL=stack
37
 QUEUE_CONNECTION=database
39
 QUEUE_CONNECTION=database
38
 
40
 
39
 CACHE_STORE=database
41
 CACHE_STORE=database
40
-CACHE_PREFIX=
42
+# CACHE_PREFIX=
41
 
43
 
42
 MEMCACHED_HOST=127.0.0.1
44
 MEMCACHED_HOST=127.0.0.1
43
 
45
 
47
 REDIS_PORT=6379
49
 REDIS_PORT=6379
48
 
50
 
49
 MAIL_MAILER=log
51
 MAIL_MAILER=log
52
+MAIL_SCHEME=null
50
 MAIL_HOST=127.0.0.1
53
 MAIL_HOST=127.0.0.1
51
 MAIL_PORT=2525
54
 MAIL_PORT=2525
52
 MAIL_USERNAME=null
55
 MAIL_USERNAME=null
53
 MAIL_PASSWORD=null
56
 MAIL_PASSWORD=null
54
-MAIL_ENCRYPTION=null
55
 MAIL_FROM_ADDRESS="hello@example.com"
57
 MAIL_FROM_ADDRESS="hello@example.com"
56
 MAIL_FROM_NAME="${APP_NAME}"
58
 MAIL_FROM_NAME="${APP_NAME}"
57
 
59
 

+ 15
- 10
.gitignore Näytä tiedosto

1
+*.log
2
+.DS_Store
3
+.env
4
+.env.backup
5
+.env.production
6
+.phpactor.json
7
+.phpunit.result.cache
8
+/.fleet
9
+/.idea
10
+/.nova
1
 /.phpunit.cache
11
 /.phpunit.cache
12
+/.vscode
13
+/.zed
14
+/auth.json
2
 /node_modules
15
 /node_modules
3
 /public/build
16
 /public/build
4
 /public/hot
17
 /public/hot
5
 /public/storage
18
 /public/storage
6
 /storage/*.key
19
 /storage/*.key
20
+/storage/pail
7
 /vendor
21
 /vendor
8
-.env
9
-.env.backup
10
-.env.production
11
-.phpunit.result.cache
12
 Homestead.json
22
 Homestead.json
13
 Homestead.yaml
23
 Homestead.yaml
14
-auth.json
15
-npm-debug.log
16
-yarn-error.log
17
-/.fleet
18
-/.idea
19
-/.vscode
24
+Thumbs.db
20
 /public/css/
25
 /public/css/
21
 /public/js/
26
 /public/js/

+ 5
- 2
app/Models/Accounting/Account.php Näytä tiedosto

13
 use App\Utilities\Currency\CurrencyAccessor;
13
 use App\Utilities\Currency\CurrencyAccessor;
14
 use Database\Factories\Accounting\AccountFactory;
14
 use Database\Factories\Accounting\AccountFactory;
15
 use Illuminate\Database\Eloquent\Attributes\ObservedBy;
15
 use Illuminate\Database\Eloquent\Attributes\ObservedBy;
16
+use Illuminate\Database\Eloquent\Attributes\Scope;
16
 use Illuminate\Database\Eloquent\Builder;
17
 use Illuminate\Database\Eloquent\Builder;
17
 use Illuminate\Database\Eloquent\Casts\Attribute;
18
 use Illuminate\Database\Eloquent\Casts\Attribute;
18
 use Illuminate\Database\Eloquent\Factories\Factory;
19
 use Illuminate\Database\Eloquent\Factories\Factory;
86
         return $this->hasOne(Adjustment::class, 'account_id');
87
         return $this->hasOne(Adjustment::class, 'account_id');
87
     }
88
     }
88
 
89
 
89
-    public function scopeBudgetable(Builder $query): Builder
90
+    #[Scope]
91
+    protected function budgetable(Builder $query): Builder
90
     {
92
     {
91
         return $query->whereIn('category', [
93
         return $query->whereIn('category', [
92
             AccountCategory::Revenue,
94
             AccountCategory::Revenue,
111
             ->where('currency_code', CurrencyAccessor::getDefaultCurrency());
113
             ->where('currency_code', CurrencyAccessor::getDefaultCurrency());
112
     }
114
     }
113
 
115
 
114
-    public function scopeWithLastTransactionDate(Builder $query): Builder
116
+    #[Scope]
117
+    protected function withLastTransactionDate(Builder $query): Builder
115
     {
118
     {
116
         return $query->addSelect([
119
         return $query->addSelect([
117
             'last_transaction_date' => JournalEntry::select(DB::raw('MAX(transactions.posted_at)'))
120
             'last_transaction_date' => JournalEntry::select(DB::raw('MAX(transactions.posted_at)'))

+ 3
- 1
app/Models/Accounting/Bill.php Näytä tiedosto

22
 use Filament\Actions\ReplicateAction;
22
 use Filament\Actions\ReplicateAction;
23
 use Illuminate\Database\Eloquent\Attributes\CollectedBy;
23
 use Illuminate\Database\Eloquent\Attributes\CollectedBy;
24
 use Illuminate\Database\Eloquent\Attributes\ObservedBy;
24
 use Illuminate\Database\Eloquent\Attributes\ObservedBy;
25
+use Illuminate\Database\Eloquent\Attributes\Scope;
25
 use Illuminate\Database\Eloquent\Builder;
26
 use Illuminate\Database\Eloquent\Builder;
26
 use Illuminate\Database\Eloquent\Model;
27
 use Illuminate\Database\Eloquent\Model;
27
 use Illuminate\Database\Eloquent\Relations\BelongsTo;
28
 use Illuminate\Database\Eloquent\Relations\BelongsTo;
196
         return $this->initialTransaction()->exists();
197
         return $this->initialTransaction()->exists();
197
     }
198
     }
198
 
199
 
199
-    public function scopeUnpaid(Builder $query): Builder
200
+    #[Scope]
201
+    protected function unpaid(Builder $query): Builder
200
     {
202
     {
201
         return $query->whereIn('status', [
203
         return $query->whereIn('status', [
202
             BillStatus::Open,
204
             BillStatus::Open,

+ 9
- 4
app/Models/Accounting/Budget.php Näytä tiedosto

12
 use Filament\Actions\Action;
12
 use Filament\Actions\Action;
13
 use Filament\Actions\MountableAction;
13
 use Filament\Actions\MountableAction;
14
 use Filament\Actions\ReplicateAction;
14
 use Filament\Actions\ReplicateAction;
15
+use Illuminate\Database\Eloquent\Attributes\Scope;
15
 use Illuminate\Database\Eloquent\Builder;
16
 use Illuminate\Database\Eloquent\Builder;
16
 use Illuminate\Database\Eloquent\Casts\Attribute;
17
 use Illuminate\Database\Eloquent\Casts\Attribute;
17
 use Illuminate\Database\Eloquent\Factories\HasFactory;
18
 use Illuminate\Database\Eloquent\Factories\HasFactory;
136
         return $this->allocations()->exists();
137
         return $this->allocations()->exists();
137
     }
138
     }
138
 
139
 
139
-    public function scopeDraft(Builder $query): Builder
140
+    #[Scope]
141
+    protected function draft(Builder $query): Builder
140
     {
142
     {
141
         return $query->where('status', BudgetStatus::Draft);
143
         return $query->where('status', BudgetStatus::Draft);
142
     }
144
     }
143
 
145
 
144
-    public function scopeActive(Builder $query): Builder
146
+    #[Scope]
147
+    protected function active(Builder $query): Builder
145
     {
148
     {
146
         return $query->where('status', BudgetStatus::Active);
149
         return $query->where('status', BudgetStatus::Active);
147
     }
150
     }
148
 
151
 
149
-    public function scopeClosed(Builder $query): Builder
152
+    #[Scope]
153
+    protected function closed(Builder $query): Builder
150
     {
154
     {
151
         return $query->where('status', BudgetStatus::Closed);
155
         return $query->where('status', BudgetStatus::Closed);
152
     }
156
     }
153
 
157
 
154
-    public function scopeCurrentlyActive(Builder $query): Builder
158
+    #[Scope]
159
+    protected function currentlyActive(Builder $query): Builder
155
     {
160
     {
156
         return $query->active()
161
         return $query->active()
157
             ->where('start_date', '<=', company_now())
162
             ->where('start_date', '<=', company_now())

+ 3
- 1
app/Models/Accounting/Estimate.php Näytä tiedosto

21
 use Filament\Notifications\Notification;
21
 use Filament\Notifications\Notification;
22
 use Illuminate\Database\Eloquent\Attributes\CollectedBy;
22
 use Illuminate\Database\Eloquent\Attributes\CollectedBy;
23
 use Illuminate\Database\Eloquent\Attributes\ObservedBy;
23
 use Illuminate\Database\Eloquent\Attributes\ObservedBy;
24
+use Illuminate\Database\Eloquent\Attributes\Scope;
24
 use Illuminate\Database\Eloquent\Builder;
25
 use Illuminate\Database\Eloquent\Builder;
25
 use Illuminate\Database\Eloquent\Casts\Attribute;
26
 use Illuminate\Database\Eloquent\Casts\Attribute;
26
 use Illuminate\Database\Eloquent\Model;
27
 use Illuminate\Database\Eloquent\Model;
212
             && ! $this->wasConverted();
213
             && ! $this->wasConverted();
213
     }
214
     }
214
 
215
 
215
-    public function scopeActive(Builder $query): Builder
216
+    #[Scope]
217
+    protected function active(Builder $query): Builder
216
     {
218
     {
217
         return $query->whereIn('status', [
219
         return $query->whereIn('status', [
218
             EstimateStatus::Unsent,
220
             EstimateStatus::Unsent,

+ 7
- 3
app/Models/Accounting/Invoice.php Näytä tiedosto

26
 use Filament\Support\Enums\Alignment;
26
 use Filament\Support\Enums\Alignment;
27
 use Illuminate\Database\Eloquent\Attributes\CollectedBy;
27
 use Illuminate\Database\Eloquent\Attributes\CollectedBy;
28
 use Illuminate\Database\Eloquent\Attributes\ObservedBy;
28
 use Illuminate\Database\Eloquent\Attributes\ObservedBy;
29
+use Illuminate\Database\Eloquent\Attributes\Scope;
29
 use Illuminate\Database\Eloquent\Builder;
30
 use Illuminate\Database\Eloquent\Builder;
30
 use Illuminate\Database\Eloquent\Casts\Attribute;
31
 use Illuminate\Database\Eloquent\Casts\Attribute;
31
 use Illuminate\Database\Eloquent\Model;
32
 use Illuminate\Database\Eloquent\Model;
181
         return $this->amount_due;
182
         return $this->amount_due;
182
     }
183
     }
183
 
184
 
184
-    public function scopeUnpaid(Builder $query): Builder
185
+    #[Scope]
186
+    protected function unpaid(Builder $query): Builder
185
     {
187
     {
186
         return $query->whereIn('status', InvoiceStatus::unpaidStatuses());
188
         return $query->whereIn('status', InvoiceStatus::unpaidStatuses());
187
     }
189
     }
188
 
190
 
189
     // TODO: Consider storing the numeric part of the invoice number separately
191
     // TODO: Consider storing the numeric part of the invoice number separately
190
-    public function scopeByNumber(Builder $query, string $number): Builder
192
+    #[Scope]
193
+    protected function byNumber(Builder $query, string $number): Builder
191
     {
194
     {
192
         $invoicePrefix = DocumentDefault::invoice()->first()->number_prefix ?? '';
195
         $invoicePrefix = DocumentDefault::invoice()->first()->number_prefix ?? '';
193
 
196
 
197
         });
200
         });
198
     }
201
     }
199
 
202
 
200
-    public function scopeOverdue(Builder $query): Builder
203
+    #[Scope]
204
+    protected function overdue(Builder $query): Builder
201
     {
205
     {
202
         return $query
206
         return $query
203
             ->unpaid()
207
             ->unpaid()

+ 11
- 5
app/Models/Setting/DocumentDefault.php Näytä tiedosto

10
 use App\Enums\Setting\PaymentTerms;
10
 use App\Enums\Setting\PaymentTerms;
11
 use App\Enums\Setting\Template;
11
 use App\Enums\Setting\Template;
12
 use Database\Factories\Setting\DocumentDefaultFactory;
12
 use Database\Factories\Setting\DocumentDefaultFactory;
13
+use Illuminate\Database\Eloquent\Attributes\Scope;
13
 use Illuminate\Database\Eloquent\Builder;
14
 use Illuminate\Database\Eloquent\Builder;
14
 use Illuminate\Database\Eloquent\Casts\AsArrayObject;
15
 use Illuminate\Database\Eloquent\Casts\AsArrayObject;
15
 use Illuminate\Database\Eloquent\Casts\Attribute;
16
 use Illuminate\Database\Eloquent\Casts\Attribute;
73
         });
74
         });
74
     }
75
     }
75
 
76
 
76
-    public function scopeType(Builder $query, string | DocumentType $type): Builder
77
+    #[Scope]
78
+    protected function type(Builder $query, string | DocumentType $type): Builder
77
     {
79
     {
78
         return $query->where('type', $type);
80
         return $query->where('type', $type);
79
     }
81
     }
80
 
82
 
81
-    public function scopeInvoice(Builder $query): Builder
83
+    #[Scope]
84
+    protected function invoice(Builder $query): Builder
82
     {
85
     {
83
         return $query->type(DocumentType::Invoice);
86
         return $query->type(DocumentType::Invoice);
84
     }
87
     }
85
 
88
 
86
-    public function scopeRecurringInvoice(Builder $query): Builder
89
+    #[Scope]
90
+    protected function recurringInvoice(Builder $query): Builder
87
     {
91
     {
88
         return $query->type(DocumentType::RecurringInvoice);
92
         return $query->type(DocumentType::RecurringInvoice);
89
     }
93
     }
90
 
94
 
91
-    public function scopeBill(Builder $query): Builder
95
+    #[Scope]
96
+    protected function bill(Builder $query): Builder
92
     {
97
     {
93
         return $query->type(DocumentType::Bill);
98
         return $query->type(DocumentType::Bill);
94
     }
99
     }
95
 
100
 
96
-    public function scopeEstimate(Builder $query): Builder
101
+    #[Scope]
102
+    protected function estimate(Builder $query): Builder
97
     {
103
     {
98
         return $query->type(DocumentType::Estimate);
104
         return $query->type(DocumentType::Estimate);
99
     }
105
     }

+ 2
- 2
bootstrap/app.php Näytä tiedosto

10
         api: __DIR__ . '/../routes/api.php',
10
         api: __DIR__ . '/../routes/api.php',
11
         commands: __DIR__ . '/../routes/console.php',
11
         commands: __DIR__ . '/../routes/console.php',
12
     )
12
     )
13
-    ->withMiddleware(function (Middleware $middleware) {
13
+    ->withMiddleware(function (Middleware $middleware): void {
14
         //
14
         //
15
     })
15
     })
16
-    ->withExceptions(function (Exceptions $exceptions) {
16
+    ->withExceptions(function (Exceptions $exceptions): void {
17
         //
17
         //
18
     })->create();
18
     })->create();

+ 19
- 8
composer.json Näytä tiedosto

1
 {
1
 {
2
+    "$schema": "https://getcomposer.org/schema.json",
2
     "name": "andrewdwallo/erpsaas",
3
     "name": "andrewdwallo/erpsaas",
3
     "type": "project",
4
     "type": "project",
4
     "description": "The skeleton application for the Laravel framework.",
5
     "description": "The skeleton application for the Laravel framework.",
11
         "php": "^8.2",
12
         "php": "^8.2",
12
         "ext-bcmath": "*",
13
         "ext-bcmath": "*",
13
         "ext-intl": "*",
14
         "ext-intl": "*",
14
-        "akaunting/laravel-money": "^5.2",
15
+        "akaunting/laravel-money": "^6.0.2",
15
         "andrewdwallo/filament-companies": "^4.0",
16
         "andrewdwallo/filament-companies": "^4.0",
16
         "andrewdwallo/filament-selectify": "^2.0",
17
         "andrewdwallo/filament-selectify": "^2.0",
17
         "andrewdwallo/transmatic": "^1.1",
18
         "andrewdwallo/transmatic": "^1.1",
21
         "fakerphp/faker": "^1.24",
22
         "fakerphp/faker": "^1.24",
22
         "filament/filament": "^3.2",
23
         "filament/filament": "^3.2",
23
         "guava/filament-clusters": "^1.1",
24
         "guava/filament-clusters": "^1.1",
24
-        "guzzlehttp/guzzle": "^7.8",
25
         "jaocero/radio-deck": "^1.2",
25
         "jaocero/radio-deck": "^1.2",
26
-        "laravel/framework": "^11.0",
26
+        "laravel/framework": "^12.0",
27
         "laravel/sanctum": "^4.0",
27
         "laravel/sanctum": "^4.0",
28
-        "laravel/tinker": "^2.9",
28
+        "laravel/tinker": "^2.10.1",
29
         "squirephp/model": "^3.4",
29
         "squirephp/model": "^3.4",
30
         "squirephp/repository": "^3.4",
30
         "squirephp/repository": "^3.4",
31
         "symfony/intl": "^6.3"
31
         "symfony/intl": "^6.3"
32
     },
32
     },
33
     "require-dev": {
33
     "require-dev": {
34
         "barryvdh/laravel-debugbar": "^3.15",
34
         "barryvdh/laravel-debugbar": "^3.15",
35
-        "laravel/pint": "^1.13",
36
-        "laravel/sail": "^1.26",
35
+        "laravel/pail": "^1.2.2",
36
+        "laravel/pint": "^1.24",
37
+        "laravel/sail": "^1.41",
37
         "mockery/mockery": "^1.6",
38
         "mockery/mockery": "^1.6",
38
-        "nunomaduro/collision": "^8.0",
39
+        "nunomaduro/collision": "^8.6",
39
         "pestphp/pest": "^3.0",
40
         "pestphp/pest": "^3.0",
40
         "pestphp/pest-plugin-livewire": "^3.0",
41
         "pestphp/pest-plugin-livewire": "^3.0",
41
         "spatie/laravel-ignition": "^2.4",
42
         "spatie/laravel-ignition": "^2.4",
69
             "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
70
             "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
70
         ],
71
         ],
71
         "post-create-project-cmd": [
72
         "post-create-project-cmd": [
72
-            "@php artisan key:generate --ansi"
73
+            "@php artisan key:generate --ansi",
74
+            "@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"",
75
+            "@php artisan migrate --graceful --ansi"
76
+        ],
77
+        "dev": [
78
+            "Composer\\Config::disableProcessTimeout",
79
+            "npx concurrently -c \"#93c5fd,#c4b5fd,#fb7185,#fdba74\" \"php artisan serve\" \"php artisan queue:listen --tries=1\" \"php artisan pail --timeout=0\" \"npm run dev\" --names=server,queue,logs,vite --kill-others"
80
+        ],
81
+        "test": [
82
+            "@php artisan config:clear --ansi",
83
+            "@php artisan test"
73
         ]
84
         ]
74
     },
85
     },
75
     "extra": {
86
     "extra": {

+ 786
- 410
composer.lock
File diff suppressed because it is too large
Näytä tiedosto


+ 1
- 1
config/app.php Näytä tiedosto

101
 
101
 
102
     'previous_keys' => [
102
     'previous_keys' => [
103
         ...array_filter(
103
         ...array_filter(
104
-            explode(',', env('APP_PREVIOUS_KEYS', ''))
104
+            explode(',', (string) env('APP_PREVIOUS_KEYS', ''))
105
         ),
105
         ),
106
     ],
106
     ],
107
 
107
 

+ 1
- 1
config/auth.php Näytä tiedosto

104
     | Password Confirmation Timeout
104
     | Password Confirmation Timeout
105
     |--------------------------------------------------------------------------
105
     |--------------------------------------------------------------------------
106
     |
106
     |
107
-    | Here you may define the amount of seconds before a password confirmation
107
+    | Here you may define the number of seconds before a password confirmation
108
     | window expires and users are asked to re-enter their password via the
108
     | window expires and users are asked to re-enter their password via the
109
     | confirmation screen. By default, the timeout lasts for three hours.
109
     | confirmation screen. By default, the timeout lasts for three hours.
110
     |
110
     |

+ 5
- 4
config/cache.php Näytä tiedosto

26
     | well as their drivers. You may even define multiple stores for the
26
     | well as their drivers. You may even define multiple stores for the
27
     | same cache driver to group types of items stored in your caches.
27
     | same cache driver to group types of items stored in your caches.
28
     |
28
     |
29
-    | Supported drivers: "apc", "array", "database", "file", "memcached",
29
+    | Supported drivers: "array", "database", "file", "memcached",
30
     |                    "redis", "dynamodb", "octane", "null"
30
     |                    "redis", "dynamodb", "octane", "null"
31
     |
31
     |
32
     */
32
     */
40
 
40
 
41
         'database' => [
41
         'database' => [
42
             'driver' => 'database',
42
             'driver' => 'database',
43
+            'connection' => env('DB_CACHE_CONNECTION'),
43
             'table' => env('DB_CACHE_TABLE', 'cache'),
44
             'table' => env('DB_CACHE_TABLE', 'cache'),
44
-            'connection' => env('DB_CACHE_CONNECTION', null),
45
-            'lock_connection' => env('DB_CACHE_LOCK_CONNECTION', null),
45
+            'lock_connection' => env('DB_CACHE_LOCK_CONNECTION'),
46
+            'lock_table' => env('DB_CACHE_LOCK_TABLE'),
46
         ],
47
         ],
47
 
48
 
48
         'file' => [
49
         'file' => [
102
     |
103
     |
103
     */
104
     */
104
 
105
 
105
-    'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_cache_'),
106
+    'prefix' => env('CACHE_PREFIX', Str::slug((string) env('APP_NAME', 'laravel')) . '-cache-'),
106
 
107
 
107
 ];
108
 ];

+ 5
- 1
config/database.php Näytä tiedosto

37
             'database' => env('DB_DATABASE', database_path('database.sqlite')),
37
             'database' => env('DB_DATABASE', database_path('database.sqlite')),
38
             'prefix' => '',
38
             'prefix' => '',
39
             'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
39
             'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
40
+            'busy_timeout' => null,
41
+            'journal_mode' => null,
42
+            'synchronous' => null,
40
         ],
43
         ],
41
 
44
 
42
         'mysql' => [
45
         'mysql' => [
144
 
147
 
145
         'options' => [
148
         'options' => [
146
             'cluster' => env('REDIS_CLUSTER', 'redis'),
149
             'cluster' => env('REDIS_CLUSTER', 'redis'),
147
-            'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_database_'),
150
+            'prefix' => env('REDIS_PREFIX', Str::slug((string) env('APP_NAME', 'laravel')) . '-database-'),
151
+            'persistent' => env('REDIS_PERSISTENT', false),
148
         ],
152
         ],
149
 
153
 
150
         'default' => [
154
         'default' => [

+ 6
- 2
config/filesystems.php Näytä tiedosto

24
     | may even configure multiple disks for the same driver. Examples for
24
     | may even configure multiple disks for the same driver. Examples for
25
     | most supported storage drivers are configured here for reference.
25
     | most supported storage drivers are configured here for reference.
26
     |
26
     |
27
-    | Supported Drivers: "local", "ftp", "sftp", "s3"
27
+    | Supported drivers: "local", "ftp", "sftp", "s3"
28
     |
28
     |
29
     */
29
     */
30
 
30
 
32
 
32
 
33
         'local' => [
33
         'local' => [
34
             'driver' => 'local',
34
             'driver' => 'local',
35
-            'root' => storage_path('app'),
35
+            'root' => storage_path('app/private'),
36
+            'serve' => true,
36
             'throw' => false,
37
             'throw' => false,
38
+            'report' => false,
37
         ],
39
         ],
38
 
40
 
39
         'public' => [
41
         'public' => [
42
             'url' => env('APP_URL') . '/storage',
44
             'url' => env('APP_URL') . '/storage',
43
             'visibility' => 'public',
45
             'visibility' => 'public',
44
             'throw' => false,
46
             'throw' => false,
47
+            'report' => false,
45
         ],
48
         ],
46
 
49
 
47
         's3' => [
50
         's3' => [
54
             'endpoint' => env('AWS_ENDPOINT'),
57
             'endpoint' => env('AWS_ENDPOINT'),
55
             'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
58
             'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
56
             'throw' => false,
59
             'throw' => false,
60
+            'report' => false,
57
         ],
61
         ],
58
 
62
 
59
     ],
63
     ],

+ 4
- 4
config/logging.php Näytä tiedosto

45
     | utilizes the Monolog PHP logging library, which includes a variety
45
     | utilizes the Monolog PHP logging library, which includes a variety
46
     | of powerful log handlers and formatters that you're free to use.
46
     | of powerful log handlers and formatters that you're free to use.
47
     |
47
     |
48
-    | Available Drivers: "single", "daily", "slack", "syslog",
48
+    | Available drivers: "single", "daily", "slack", "syslog",
49
     |                    "errorlog", "monolog", "custom", "stack"
49
     |                    "errorlog", "monolog", "custom", "stack"
50
     |
50
     |
51
     */
51
     */
54
 
54
 
55
         'stack' => [
55
         'stack' => [
56
             'driver' => 'stack',
56
             'driver' => 'stack',
57
-            'channels' => explode(',', env('LOG_STACK', 'single')),
57
+            'channels' => explode(',', (string) env('LOG_STACK', 'single')),
58
             'ignore_exceptions' => false,
58
             'ignore_exceptions' => false,
59
         ],
59
         ],
60
 
60
 
98
             'driver' => 'monolog',
98
             'driver' => 'monolog',
99
             'level' => env('LOG_LEVEL', 'debug'),
99
             'level' => env('LOG_LEVEL', 'debug'),
100
             'handler' => StreamHandler::class,
100
             'handler' => StreamHandler::class,
101
-            'formatter' => env('LOG_STDERR_FORMATTER'),
102
-            'with' => [
101
+            'handler_with' => [
103
                 'stream' => 'php://stderr',
102
                 'stream' => 'php://stderr',
104
             ],
103
             ],
104
+            'formatter' => env('LOG_STDERR_FORMATTER'),
105
             'processors' => [PsrLogMessageProcessor::class],
105
             'processors' => [PsrLogMessageProcessor::class],
106
         ],
106
         ],
107
 
107
 

+ 18
- 3
config/mail.php Näytä tiedosto

30
     | your mailers below. You may also add additional mailers if needed.
30
     | your mailers below. You may also add additional mailers if needed.
31
     |
31
     |
32
     | Supported: "smtp", "sendmail", "mailgun", "ses", "ses-v2",
32
     | Supported: "smtp", "sendmail", "mailgun", "ses", "ses-v2",
33
-    |            "postmark", "log", "array", "failover", "roundrobin"
33
+    |            "postmark", "resend", "log", "array",
34
+    |            "failover", "roundrobin"
34
     |
35
     |
35
     */
36
     */
36
 
37
 
38
 
39
 
39
         'smtp' => [
40
         'smtp' => [
40
             'transport' => 'smtp',
41
             'transport' => 'smtp',
42
+            'scheme' => env('MAIL_SCHEME'),
41
             'url' => env('MAIL_URL'),
43
             'url' => env('MAIL_URL'),
42
             'host' => env('MAIL_HOST', '127.0.0.1'),
44
             'host' => env('MAIL_HOST', '127.0.0.1'),
43
             'port' => env('MAIL_PORT', 2525),
45
             'port' => env('MAIL_PORT', 2525),
44
-            'encryption' => env('MAIL_ENCRYPTION', 'tls'),
45
             'username' => env('MAIL_USERNAME'),
46
             'username' => env('MAIL_USERNAME'),
46
             'password' => env('MAIL_PASSWORD'),
47
             'password' => env('MAIL_PASSWORD'),
47
             'timeout' => null,
48
             'timeout' => null,
48
-            'local_domain' => env('MAIL_EHLO_DOMAIN'),
49
+            'local_domain' => env('MAIL_EHLO_DOMAIN', parse_url((string) env('APP_URL', 'http://localhost'), PHP_URL_HOST)),
49
         ],
50
         ],
50
 
51
 
51
         'ses' => [
52
         'ses' => [
60
             // ],
61
             // ],
61
         ],
62
         ],
62
 
63
 
64
+        'resend' => [
65
+            'transport' => 'resend',
66
+        ],
67
+
63
         'sendmail' => [
68
         'sendmail' => [
64
             'transport' => 'sendmail',
69
             'transport' => 'sendmail',
65
             'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'),
70
             'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'),
80
                 'smtp',
85
                 'smtp',
81
                 'log',
86
                 'log',
82
             ],
87
             ],
88
+            'retry_after' => 60,
89
+        ],
90
+
91
+        'roundrobin' => [
92
+            'transport' => 'roundrobin',
93
+            'mailers' => [
94
+                'ses',
95
+                'postmark',
96
+            ],
97
+            'retry_after' => 60,
83
         ],
98
         ],
84
 
99
 
85
     ],
100
     ],

+ 4
- 4
config/queue.php Näytä tiedosto

36
 
36
 
37
         'database' => [
37
         'database' => [
38
             'driver' => 'database',
38
             'driver' => 'database',
39
-            'connection' => env('DB_QUEUE_CONNECTION', null),
39
+            'connection' => env('DB_QUEUE_CONNECTION'),
40
             'table' => env('DB_QUEUE_TABLE', 'jobs'),
40
             'table' => env('DB_QUEUE_TABLE', 'jobs'),
41
             'queue' => env('DB_QUEUE', 'default'),
41
             'queue' => env('DB_QUEUE', 'default'),
42
-            'retry_after' => env('DB_QUEUE_RETRY_AFTER', 90),
42
+            'retry_after' => (int) env('DB_QUEUE_RETRY_AFTER', 90),
43
             'after_commit' => true,
43
             'after_commit' => true,
44
         ],
44
         ],
45
 
45
 
47
             'driver' => 'beanstalkd',
47
             'driver' => 'beanstalkd',
48
             'host' => env('BEANSTALKD_QUEUE_HOST', 'localhost'),
48
             'host' => env('BEANSTALKD_QUEUE_HOST', 'localhost'),
49
             'queue' => env('BEANSTALKD_QUEUE', 'default'),
49
             'queue' => env('BEANSTALKD_QUEUE', 'default'),
50
-            'retry_after' => env('BEANSTALKD_QUEUE_RETRY_AFTER', 90),
50
+            'retry_after' => (int) env('BEANSTALKD_QUEUE_RETRY_AFTER', 90),
51
             'block_for' => 0,
51
             'block_for' => 0,
52
             'after_commit' => true,
52
             'after_commit' => true,
53
         ],
53
         ],
67
             'driver' => 'redis',
67
             'driver' => 'redis',
68
             'connection' => env('REDIS_QUEUE_CONNECTION', 'default'),
68
             'connection' => env('REDIS_QUEUE_CONNECTION', 'default'),
69
             'queue' => env('REDIS_QUEUE', 'default'),
69
             'queue' => env('REDIS_QUEUE', 'default'),
70
-            'retry_after' => env('REDIS_QUEUE_RETRY_AFTER', 90),
70
+            'retry_after' => (int) env('REDIS_QUEUE_RETRY_AFTER', 90),
71
             'block_for' => null,
71
             'block_for' => null,
72
             'after_commit' => true,
72
             'after_commit' => true,
73
         ],
73
         ],

+ 4
- 0
config/services.php Näytä tiedosto

18
         'token' => env('POSTMARK_TOKEN'),
18
         'token' => env('POSTMARK_TOKEN'),
19
     ],
19
     ],
20
 
20
 
21
+    'resend' => [
22
+        'key' => env('RESEND_KEY'),
23
+    ],
24
+
21
     'ses' => [
25
     'ses' => [
22
         'key' => env('AWS_ACCESS_KEY_ID'),
26
         'key' => env('AWS_ACCESS_KEY_ID'),
23
         'secret' => env('AWS_SECRET_ACCESS_KEY'),
27
         'secret' => env('AWS_SECRET_ACCESS_KEY'),

+ 5
- 6
config/session.php Näytä tiedosto

13
     | incoming requests. Laravel supports a variety of storage options to
13
     | incoming requests. Laravel supports a variety of storage options to
14
     | persist session data. Database storage is a great default choice.
14
     | persist session data. Database storage is a great default choice.
15
     |
15
     |
16
-    | Supported: "file", "cookie", "database", "apc",
17
-    |            "memcached", "redis", "dynamodb", "array"
16
+    | Supported: "file", "cookie", "database", "memcached",
17
+    |            "redis", "dynamodb", "array"
18
     |
18
     |
19
     */
19
     */
20
 
20
 
32
     |
32
     |
33
     */
33
     */
34
 
34
 
35
-    'lifetime' => env('SESSION_LIFETIME', 120),
35
+    'lifetime' => (int) env('SESSION_LIFETIME', 120),
36
 
36
 
37
     'expire_on_close' => env('SESSION_EXPIRE_ON_CLOSE', false),
37
     'expire_on_close' => env('SESSION_EXPIRE_ON_CLOSE', false),
38
 
38
 
97
     | define the cache store which should be used to store the session data
97
     | define the cache store which should be used to store the session data
98
     | between requests. This must match one of your defined cache stores.
98
     | between requests. This must match one of your defined cache stores.
99
     |
99
     |
100
-    | Affects: "apc", "dynamodb", "memcached", "redis"
100
+    | Affects: "dynamodb", "memcached", "redis"
101
     |
101
     |
102
     */
102
     */
103
 
103
 
125
     | the framework. Typically, you should not need to change this value
125
     | the framework. Typically, you should not need to change this value
126
     | since doing so does not grant a meaningful security improvement.
126
     | since doing so does not grant a meaningful security improvement.
127
     |
127
     |
128
-    |
129
     */
128
     */
130
 
129
 
131
     'cookie' => env(
130
     'cookie' => env(
132
         'SESSION_COOKIE',
131
         'SESSION_COOKIE',
133
-        Str::slug(env('APP_NAME', 'laravel'), '_') . '_session'
132
+        Str::slug(env('APP_NAME', 'laravel')) . '-session'
134
     ),
133
     ),
135
 
134
 
136
     /*
135
     /*

+ 0
- 1
package-lock.json Näytä tiedosto

4
     "requires": true,
4
     "requires": true,
5
     "packages": {
5
     "packages": {
6
         "": {
6
         "": {
7
-            "name": "erpsaas",
8
             "devDependencies": {
7
             "devDependencies": {
9
                 "@tailwindcss/forms": "^0.5.9",
8
                 "@tailwindcss/forms": "^0.5.9",
10
                 "@tailwindcss/typography": "^0.5.15",
9
                 "@tailwindcss/typography": "^0.5.15",

+ 1
- 0
package.json Näytä tiedosto

1
 {
1
 {
2
+    "$schema": "https://json.schemastore.org/package.json",
2
     "private": true,
3
     "private": true,
3
     "type": "module",
4
     "type": "module",
4
     "scripts": {
5
     "scripts": {

Loading…
Peruuta
Tallenna