Kyslik / column-sortable

Package for handling column sorting in Laravel 5/6/7/8
MIT License
644 stars 105 forks source link

Disabling relationships #139

Closed CCHECKED closed 4 years ago

CCHECKED commented 4 years ago

Hi, there's a problem. When manually changing the query in the browser bar and adding to sort '.'the error occurs Relation 'text' is not instance of HasOne or BelongsTo. Therefore, any user on the site will be able to cause an error, which will lead to an overflow of the log file.

Kyslik commented 4 years ago

Hey,

first of all when in production you need to disable displaying debug info:

For local development, you should set the APP_DEBUG environment variable to true. In your production environment, this value should always be false.

Second option (recommended) is to catch the exception and handle it yourself, do see documentation.

Kyslik commented 4 years ago

Closing for inactivity; feel free to re-open.