Show colored badge for every tag on transactions' create view
MODIFY
app/Http/Controllers/TransactionController.php
app/Http/Controllers/TransactionController.php
@@ -9,7 +9,7 @@ class TransactionController extends Controller {
$tags = [];
foreach (session('space')->tags as $tag) {
- $tags[] = ['key' => $tag->id, 'label' => $tag->name];
+ $tags[] = ['key' => $tag->id, 'label' => '<div class="row"><div class="row__column row__column--compact row__column--middle mr-1"><div style="width: 15px; height: 15px; border-radius: 2px; background: #' . $tag->color . ';"></div></div><div class="row__column row__column--middle">' . $tag->name . '</div></div>'];
}
return view('transactions.create', compact('tags'));

Show colored badge for every tag on transactions' create view