I'm writing tests and I want to assert, that a returned collection has some specific structure. For asserting jsons I'm using assertJsonStructure() method on
here is how i trying to paginate: $posts = Post::all()->sortByDesc("created_at")->pagination(1); but i get this error: Method Illuminate\Database\Eloquen
How can i get 'natural order' in 'Eloquent ORM'? In table I have column 'text' (string). Normal order: Model::orderBy('text') 'value 1' 'value 12' 'value 23'