Skip to content

instance_route('slug', ['slug' => '']) 라우터 파라미터 값에 '' 사용 시 오류 발생 #347

Description

@xharpenParksuhyeon

라우트 사용 시 파라미터 쿼리 값을 공백 ('') 을 넣어준 경우에 에러가 발생하는 걸 확인했습니다.
코어에서 사용하는 라라벨 버전이 5.5에서 6.x로 변경되면서 발생한 문제로 판단됩니다.

라우트 정의 시 파라미터 쿼리 값을 Nullable 하게 설정해줘야 오류가 발생하지 않습니다.


변경 전

Route::get('/{slug}', ['as' => 'slug', 'uses' => 'BoardModuleController@slug']);

변경 후

Route::get('/{slug?}', ['as' => 'slug', 'uses' => 'BoardModuleController@slug']);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions