Closed webard closed 7 months ago
In newer Laravel, Illuminate\Database\Query\Expression
does extends Illuminate\Contracts\Database\Query\Expression
and that shouldn't cause Larastan to throw an error. However, we also support version where Illuminate\Database\Query\Expression
doesn't extend Illuminate\Contracts\Database\Query\Expression
and only implements __toString()
.
This feel more like a Larastan issue.
Description:
I have Trend metric like this:
which using
duration_in_seconds
column, but in Trend I want to show minutes so I divided value by 60.Everything works correctly, but Larastan reports error:
I haven't checked other metrics or methods like sumByMinutes etc, but this error probably also occurs.
PS. I know about
transform()
method, but Raw expressions should work too.Detailed steps to reproduce the issue on a fresh Nova installation:
DB::raw()
expression as $column parameter.