Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Doesn't work when running on Laravel Sail #278

Closed
1 task done
fenestron opened this issue Aug 30, 2023 · 1 comment
Closed
1 task done

[Bug]: Doesn't work when running on Laravel Sail #278

fenestron opened this issue Aug 30, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@fenestron
Copy link

Short bug description

Unable to connect to DB when running with Laravel Sail

Extended bug description

Application launched on Laravel Sail - https://laravel.com/docs/10.x/sail

image

If I use Tinker from Sail everything works fine
image

Your project is not the problem

  • I tried using a fresh laravel install - I'm fairly certain it has nothing to do with my project.

How to reproduce?

  1. Create a project with Laravel Sail
curl -s "https://laravel.build/example-app?with=pgsql,redis" | bash
cd example-app
sail up
  1. Run the Laravel Tinker Plugin
<?php
use App\Models\User;
echo "123\n\n";
User::all();

Expected behavior

Successful connection to the database. Display all users

Screenshots

No response

IDE & Version

PhpStorm 2023.2.1

PHP Version

8.2.9

OS and version

Ubuntu 22.04.3

Laravel Tinker plugin version

2.6.1

Interpreter type

Docker compose

Laravel Version

10.20.0

Tinker version

2.8.1

Psysh version

0.11.20

Additional Context

No response

@fenestron fenestron added the bug Something isn't working label Aug 30, 2023
@Roboroads
Copy link
Owner

Hey! 99.9% sure you are using a local interpreter to reach your docker database. That, indeed, does not work.

Check #250 :)

@Roboroads Roboroads closed this as not planned Won't fix, can't repro, duplicate, stale Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants