Question: I would like to layout DIV tiles as in file managers. Without any reordering, strightly from left to right then from top to bottom. Automatically wrapping by the width of window.

[![enter image description here](https://i.stack.imgur.com/8cJKy.png)](https://i.stack.imgur.com/8cJKy.png)

How to do that? Any libraries appreciated.

Can Masonry do this? I don't need it to think where to fit next tile!

Answer: 
Since laravel doesn't propose a way to filter the relation when using `withCount`, a clean solution would be to declare the relation and add the `withTrashd()` to it.

In **Post.php**

```php
public function commentsWithTrashed()
{
    return $this->comment()->withTrashed();
}

```

Now you can use the `withCount` on it.

```php
$query = Post::withTrashed()
    ->withCount('commentsWithTrashed')
    ->get();

```
You can use the withTrashed method: 

```
>withTrashed()

```