My MongoDB aggregation query made in Laravel framework doesn't work (array empty)

Well, to fix your query, you will have to learn how program MongoDB. There is fine documentation and complete free video courses on that.