Maremarsik
Alpine.js button from standard Laravel Breeze package not working in prod
<div x-data="{ open: {{ $errors->userDeletion->isNotEmpty() ? 'true' : 'false' }} }">
<x-danger-button class="btn btn-danger" x-on:click="open = ! open">
{{ __('Delete Account') }}
</x-danger-button>
<div x-show="open" @click.outside="open = false">
<form method="post" action="{{ route('profile.destroy') }}">
@csrf
@method('delete')
<p style="margin-top:1em">
{{ __('Please enter your password to confirm you would like to permanently delete your account.') }}
</p>
<div class="form-group" style="margin-bottom:10px">
<x-text-input
id="password"
name="password"
type="password"
class="form-control"
placeholder="{{ __('Password') }}"
/>
<x-input-error :messages="$errors->userDeletion->get('password')" class="mt-2" />
</div>
<div class="form-group">
<x-secondary-button x-on:click="open = false">
{{ __('Cancel') }}
</x-secondary-button>
<x-danger-button x-on:click="open = true" class="btn btn-danger">
{{ __('Delete Account') }}
</x-danger-button>
</div>
</form>
</div>
</div>
48 replies
Alpine.js button from standard Laravel Breeze package not working in prod
Hey man!
I'm telling you - something is wrong with Railway in this case. Some variable treating alpine.js there is set differently, or something...
So - I followed your advise, went through this alpine.js basic tutorial and completely refactored my code (along the way finding and fixing one more bug). But IT' STILL DOESN'T WORK PROPERLY on RAILWAY! Now the lower section is always expanded and never collapses! Though, again, locally it works as charm!
https://manul-shop-production.up.railway.app/profile (you can login under b@b email using 'bbbbbb' password)
48 replies
Alpine.js button from standard Laravel Breeze package not working in prod
I've got close to zero experience with alpine.js,, so it's really hard to debug... Maybe I shall place all attributes of this button in a single line?..
It's annoying that obviously I shall use trial and error method to find what's wrong, but this is very cumbersome 'cause I need to deploy the whole project every time to see the result.
48 replies
Alpine.js button from standard Laravel Breeze package not working in prod
So, now we can return to the original question. Now the button WORKS AGAIN, when I run the app from docker! Doesn't it mean that this is the Railway issue, for all that?
48 replies
Alpine.js button from standard Laravel Breeze package not working in prod
but they work for me. When I run my app locally - I can interact with my DB using these credentials.
Here they are (in my .env file)
DB_CONNECTION=pgsql
DB_HOST=localhost
DB_PORT=5432
DB_DATABASE=ecommerce
DB_USERNAME=marre
DB_PASSWORD=***
48 replies
Alpine.js button from standard Laravel Breeze package not working in prod
So, executing of 'nixpacks build' command outputted in docker image. But when I try to launch it:
SQLSTATE[08006] [7] connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused Is the server running on that host and accepting TCP/IP connections? connection to server at "localhost" (::1), port 5432 failed: Cannot assign requested address Is the server running on that host and accepting TCP/IP connections? (Connection: pgsql, SQL: select tablename, concat('"', schemaname, '"."', tablename, '"') as qualifiedname from pg_catalog.pg_tables where schemaname in ('public'))
48 replies