I have this report migration
$table->unsignedInteger('target_id')->unsigned()->nullable()->index();
$table->unsignedInteger('user_id')->unsigned()->nullable()->index();
$table->string('reason'); // can be one of three values, say ('bad, 'good', 'something')
i want now to display a table where i have the user and column for each reason counting how many times he got records on this
user | bad | good | something
Jeffrey | 3 | 10 | 2
how to query this one ? and have a collection where i can loop and display rows in table :)