강의

멘토링

커뮤니티

Inflearn Community Q&A

nataek2159's profile image
nataek2159

asked

The ultimate tech tree for PHP developers, Laravel lectures

This is a hands-on tutorial that sets up Docker, wsl2, and visual studio code, and finishes with sail up, including alias settings.

같은 에러 인데요..SQLSTATE[42S02]: Base table or view not found: 1146 Table 'laravel.sessions' doesn't exist

Written on

·

496

0

설명한 것과 똑같이 진행 했는데..

저도 localhost

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'laravel.sessions' doesn't exist

가 발생 했습니다.

 

답변을 보면..

명령어에
sail artisan make:session-table <- 11 최신 버전으로 실습하시는 경우
php artisan session:table <- 9 또는 10버전으로 실습하시는 경우

sail artisan migrate

라고 되어 있는데..

php artisan session:table 입력 시

Composer detected issues in your platform:

Your Composer dependencies require a PHP version ">= 8.2.0". You are running 8.1.2-1ubuntu2.17.

PHP Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.2.0". You are running 8.1.2-1ubuntu2.17. in /var/www/html/vendor/composer/platform_check.php on line 24

라는 에러가 발생 합니다.

컴포저와 php 버전이 맞지 않아서 그러는 것 같은데..
실습 과정에서는 컴포저 나 php 버전에 대해서 작성 하여 진행 하지 않았습니다.

그래서 어떻게 수정을 해야 하는 건지 모르겠습니다.

 

답변 부탁 드립니다.

phpLaravel

Answer 1

0

backchur님의 프로필 이미지
backchur
Instructor

저희 강의는 sail 환경에서 실습을 하는 것 이기 때문에 기본적으로 9버전이나 11 버전 동일하게

9 -> sail artisan session:table
11+ -> sail artisan make:session-table (윗 방법도 작동은 합니다.)

이라고 하는 것이 맞습니다. 말씀하시는 오류도 php 버전이 문제라기 보다 sail 환경의 php 가 아닌 직접 깔린 버전을 쓰면서 나타나는 현상으로 보입니다. 강의에서 php artisan 이라고 안내 드린 부분이 있었는지 좀 더 찾아봐야 될 것 같지만 우선은 기본 sail artisan 이라고 기억해 주세요.

nataek2159's profile image
nataek2159

asked

Ask a question