Skip to content

Commit 39eb09f

Browse files
committed
update letter layout
1 parent f19bf09 commit 39eb09f

19 files changed

+2765
-341
lines changed

app/Http/Controllers/UserController.php

+9
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,15 @@ public function joiningLetter(User $user)
242242
return view('letter.joining', compact('user'));
243243
}
244244

245+
/**
246+
* @param User $user
247+
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
248+
*/
249+
public function promoteLetter(User $user)
250+
{
251+
return view('letter.promoteletter', compact('user'));
252+
}
253+
245254
/**
246255
* @param User $user
247256
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View

app/User.php

+5
Original file line numberDiff line numberDiff line change
@@ -313,4 +313,9 @@ public function getDesignationAttribute()
313313
{
314314
return $this->designations->first();
315315
}
316+
317+
public function account()
318+
{
319+
return $this->hasOne(Account::class, 'user_id');
320+
}
316321
}

config/dompdf.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149
* Used if no suitable fonts can be found. This must exist in the font folder.
150150
* @var string
151151
*/
152-
'default_font' => 'serif',
152+
'default_font' => 'roboto',
153153

154154
/*
155155
* Image DPI setting
+39-20
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,43 @@
11
@extends('letter.layoutletter')
22

33
@section('data')
4-
<tr>
5-
<td class="p-3">
6-
<h3 align="center" class="pb-4"><b>TO WHOM IT MAY CONCERN</b></h3>
7-
</td>
8-
</tr>
9-
<tr>
10-
<td class="p-3">
11-
<h6><b>Date : </b>{{ now()->format('jS F, Y') }}</h6>
12-
<h6><b>To : </b>{{ $user->name }}</h6>
13-
<p class="py-2">
14-
This is to certify that {{ $user->name }} was working in our company from {{ date('jS F Y', strtotime($user->joining_date))}}
15-
to {{ date('jS F Y', strtotime($user->leaving_date))}} and last position achieved in our organization was {{ $user->designation->title }}.
16-
</p>
17-
<p>{{ $user->name }} rendered his services with great responsibility and professional attitude.</p>
18-
<p class="mb-5">We wish all the best in all future endeavors.</p>
19-
<h6>Warm Regards,</h6>
20-
<p>BinBytes, Rajkot</p>
21-
</td>
22-
</tr>
23-
@include('letter._footer')
4+
<tr>
5+
<td class="px-3 py-3">
6+
<table class="table table-borderless">
7+
<tr>
8+
<td class="logo pt-4">
9+
<img src="{{ url('images/logo.png') }}" alt="Logo" width="50">
10+
</td>
11+
<td>
12+
<b>BINBYTES</b>
13+
<p class="address mt-3">409-A, The Spire, 150ft Ring Road, Rajkot-360006, Gujarat, India.</p>
14+
<p class="address">Phone : (+91) 75670 72070 / (+91) 90330 90059</p>
15+
</td>
16+
</tr>
17+
</table>
18+
</td>
19+
</tr>
20+
<tr>
21+
<td class="px-3"><hr></td>
22+
</tr>
23+
<tr>
24+
<td class="p-3">
25+
<h3 align="center" class="pb-4"><b>TO WHOM IT MAY CONCERN</b></h3>
26+
</td>
27+
</tr>
28+
<tr>
29+
<td class="p-3">
30+
<h6><b>Date : </b>{{ now()->format('jS F, Y') }}</h6>
31+
<h6><b>To : </b>{{ $user->name }}</h6>
32+
<p class="py-2">
33+
This is to certify that {{ $user->name }} was working in our company from {{ date('jS F Y', strtotime($user->joining_date))}}
34+
to {{ date('jS F Y', strtotime($user->leaving_date))}} and last position achieved in our organization was {{ $user->designation->title }}.
35+
</p>
36+
<p>{{ $user->name }} rendered his services with great responsibility and professional attitude.</p>
37+
<p class="mb-5">We wish all the best in all future endeavors.</p>
38+
<h6>Warm Regards,</h6>
39+
<p>BinBytes, Rajkot</p>
40+
</td>
41+
</tr>
42+
@include('letter._footer')
2443
@endsection
+39-20
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,43 @@
11
@extends('letter.layoutletter')
22

33
@section('data')
4-
<tr>
5-
<td class="p-3">
6-
<h3 align="center" class="pb-4"><b>JOINING LETTER</b></h3>
7-
</td>
8-
</tr>
9-
<tr>
10-
<td class="p-3">
11-
<h6><b>Date : </b>{{ now()->format('jS F, Y') }}</h6>
12-
<h6><b>To : </b>{{ $user->name }}</h6>
13-
<p class="pt-3">
14-
This is to certify that {{ $user->name }} was working in our company from {{ date('jS F Y', strtotime($user->joining_date))}}
15-
to {{ date('jS F Y', strtotime($user->leaving_date))}} and last position achieved in our organization was {{ $user->designation->title }}.
16-
</p>
17-
<p>{{ $user->name }} rendered his services with great responsibility and professional attitude.</p>
18-
<p class="mb-5">We wish all the best in all future endeavors.</p>
19-
<h6>Warm Regards,</h6>
20-
<p>BinBytes, Rajkot</p>
21-
</td>
22-
</tr>
23-
@include('letter._footer')
4+
<tr>
5+
<td class="px-3 py-3">
6+
<table class="table table-borderless">
7+
<tr>
8+
<td class="logo pt-4">
9+
<img src="{{ url('images/logo.png') }}" alt="Logo" width="50">
10+
</td>
11+
<td>
12+
<b>BINBYTES</b>
13+
<p class="address mt-3">409-A, The Spire, 150ft Ring Road, Rajkot-360006, Gujarat, India.</p>
14+
<p class="address">Phone : (+91) 75670 72070 / (+91) 90330 90059</p>
15+
</td>
16+
</tr>
17+
</table>
18+
</td>
19+
</tr>
20+
<tr>
21+
<td class="px-3"><hr></td>
22+
</tr>
23+
<tr>
24+
<td class="p-3">
25+
<h3 align="center" class="pb-4"><b>JOINING LETTER</b></h3>
26+
</td>
27+
</tr>
28+
<tr>
29+
<td class="p-3">
30+
<h6><b>Date : </b>{{ now()->format('jS F, Y') }}</h6>
31+
<h6><b>To : </b>{{ $user->name }}</h6>
32+
<p class="pt-3">
33+
This is to certify that {{ $user->name }} was working in our company from {{ date('jS F Y', strtotime($user->joining_date))}}
34+
to {{ date('jS F Y', strtotime($user->leaving_date))}} and last position achieved in our organization was {{ $user->designation->title }}.
35+
</p>
36+
<p>{{ $user->name }} rendered his services with great responsibility and professional attitude.</p>
37+
<p class="mb-5">We wish all the best in all future endeavors.</p>
38+
<h6>Warm Regards,</h6>
39+
<p>BinBytes, Rajkot</p>
40+
</td>
41+
</tr>
42+
@include('letter._footer')
2443
@endsection

0 commit comments

Comments
 (0)