File tree Expand file tree Collapse file tree 3 files changed +20
-6
lines changed
app/Livewire/Project/Shared
resources/views/components Expand file tree Collapse file tree 3 files changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -91,10 +91,12 @@ public function mount()
91
91
92
92
public function delete ($ password )
93
93
{
94
- if (! Hash::check ($ password , Auth::user ()->password )) {
95
- $ this ->addError ('password ' , 'The provided password is incorrect. ' );
94
+ if (isProduction ()) {
95
+ if (! Hash::check ($ password , Auth::user ()->password )) {
96
+ $ this ->addError ('password ' , 'The provided password is incorrect. ' );
96
97
97
- return ;
98
+ return ;
99
+ }
98
100
}
99
101
100
102
if (! $ this ->resource ) {
Original file line number Diff line number Diff line change @@ -343,6 +343,11 @@ function isSubscribed()
343
343
{
344
344
return isSubscriptionActive () || auth ()->user ()->isInstanceAdmin ();
345
345
}
346
+
347
+ function isProduction (): bool
348
+ {
349
+ return ! isDev ();
350
+ }
346
351
function isDev (): bool
347
352
{
348
353
return config ('app.env ' ) === 'local ' ;
Original file line number Diff line number Diff line change @@ -296,9 +296,16 @@ class="w-24 dark:bg-coolgray-200 dark:hover:bg-coolgray-300">
296
296
</template >
297
297
298
298
<template x-if =" step === 1" >
299
- <x-forms .button @click =" step++" class =" w-auto" isError >
300
- <span x-text =" step1ButtonText" ></span >
301
- </x-forms .button >
299
+ @if (isDev () )
300
+ <x-forms .button class =" w-auto" isError
301
+ @click =" $wire.delete('hello')" >
302
+ <span x-text =" step3ButtonText" ></span >
303
+ </x-forms .button >
304
+ @else
305
+ <x-forms .button @click =" step++" class =" w-auto" isError >
306
+ <span x-text =" step1ButtonText" ></span >
307
+ </x-forms .button >
308
+ @endif
302
309
</template >
303
310
304
311
<template x-if =" step === 2" >
You can’t perform that action at this time.
0 commit comments