-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLaravel-Blade-Khutinati
More file actions
82 lines (69 loc) · 2.4 KB
/
Laravel-Blade-Khutinati
File metadata and controls
82 lines (69 loc) · 2.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
Date Formate---
{{ date('d-M-Y', strtotime($TransactionReport->transaction_date));}}
@php
$time = strtotime($SomityPost->datet);
$month = date('M', $time); //3Char month name like Jan
$month = date('F', $time); //ful month name like january
$date = date('d', $time); // get day as 1 to 31
$year = date('Y', $time);
$day = date('l', strtotime($request->date)); //Thursday
@endphp
{{date("l jS \of F Y h:i:s A")}}
Long text in Short {{ Str::limit($your_string, 50) }}
</p>
Get age = date_diff(date_create($data->dob), date_create('today'))->y;
Get current Year in Blade {{ now()->year }}
Dicimal Formate {{ number_format($Expense->price, 2) }} //for text field
Dicimal Formate {{ number_format($Expense->price, 2 ,".","") }} //for input type number field
=====
input type number remove aerow
/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
/* Firefox */
input[type=number] {
-moz-appearance: textfield;
}
===========
Status button in Table
<td>
@if ($Bank->is_active == 1)
<span class="badge badge-success py-1">@lang('form.Active')</span>
@else
<span class="badge badge-danger py-1">@lang('form.Inactive')</span>
@endif
</td>
==================
Form old value
value="{{old('name')}}"
=====
require Icon
1. <span class="text-danger">*</span>
2. <sup><span class="require_icon"><i class="bi bi-asterisk"></i></span></sup>
/* New added */
.require_icon {
font-size: 8px;
color: rgba(240, 91, 91, 0.786);
margin-top: 10px !important;
}
==============================
Show active menu
{{ Route::is('order.index') || Route::is('order.create') || Route::is('order.edit') ? 'active' : '' }}
=======================
Blade Text Limitation
{{ \Illuminate\Support\Str::limit($fullText, 100, $end='...') }}
=======================
{{-- All error show --}}
@if ($errors->any())
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<ul class="p-0 m-0" style="list-style: none;">
@foreach ($errors->all() as $error)
<li><i class="mdi mdi-alert-circle"></i>{{ $error }}</li>
@endforeach
</ul>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
@endif