@extends('layouts.app') @section('title', 'Notes — Hisab') @section('content') @php $colors = ['#1f2937', '#7f1d1d', '#78350f', '#713f12', '#365314', '#134e4a', '#1e3a8a', '#4c1d95', '#831843', '#3f3f46']; $filtered = $notes; $search = request('search', ''); if ($search) { $filtered = $notes->filter(fn($n) => str_contains(strtolower($n->title . ' ' . $n->content), strtolower($search))); } $pinned = $filtered->where('pinned', true); $others = $filtered->where('pinned', false); @endphp

Notes

Google Keep style — dhoroner note niye rakhun

@if ($pinned->count() > 0)

Pinned

@foreach ($pinned as $note) @include('notes.card', ['note' => $note, 'colors' => $colors]) @endforeach
@endif
@if ($pinned->count() > 0)

Others

@endif @if ($others->isEmpty() && $pinned->isEmpty())

Kono note nei. Notun ekta lekhun.

@else
@foreach ($others as $note) @include('notes.card', ['note' => $note, 'colors' => $colors]) @endforeach
@endif

Notun note

@csrf
@foreach ($colors as $c) @endforeach
@endsection