Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
freelancernishad committed Jan 28, 2024
1 parent 770e8d6 commit 0222c49
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 3 deletions.
44 changes: 44 additions & 0 deletions app/Http/Controllers/api/studentsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1049,6 +1049,50 @@ public function student_list_pdf(Request $r,$year,$class,$school_id)
}


public function student_list_stipend_pdf(Request $r,$year,$class,$school_id)
{
$school_id = sitedetails()->school_id;



$wd = [
'school_id'=>$school_id,
'StudentClass' => $class,
'Year' => $year,
'StudentStatus' => 'Active',
'stipend' => 'Yes',
];
if($r->group){
$wd['StudentGroup'] = $r->group;
}

$data['count'] = DB::table('students')->where($wd)->count();
if ($data['count'] > 0) {
$data['rows'] = DB::table('students')->where($wd)->orderBy('StudentRoll','ASC')->get();
}
$data['pdf']='pdf';
// frontend/schoolLogo.png
//in Controller
// $pathgovlogo = 'frontend/schoolLogo.png';
// $typegovlogo = pathinfo($pathgovlogo, PATHINFO_EXTENSION);
// $dataigovlogo = file_get_contents($pathgovlogo);
// $govlogo = 'data:image/' . $typegovlogo . ';base64,' . base64_encode($dataigovlogo);
// $data['logo'] = $govlogo;
$fileName = 'students-'.date('Y-m-d H:m:s');
$data['fileName'] = $fileName;
$types = 'school';
if($r->types){
$types = $r->types;
}

$data['types'] = $types;
// return $data;
$pdf = LaravelMpdf::loadView('admin/pdfReports.total_student', $data);
return $pdf->stream("$fileName.pdf");
// return view('', $data);
}




public function applicant_invoice($trxid)
Expand Down
2 changes: 1 addition & 1 deletion public/js/backend.js

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions resources/js/backend/components/students/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@
<a v-if="searchtype == 'filterclass'"
class="btn-fill-lg font-normal text-light gradient-pastel-green float-right" target="_blank"
:href="'/dashboard/student_list/pdf/' + year + '/' + student_class + '/' + school_id" >Download Student List</a>

<a v-if="searchtype == 'filterclass'"
class="btn-fill-lg font-normal text-light gradient-pastel-green float-right" target="_blank"
:href="'/dashboard/student_list_stipend/pdf/' + year + '/' + student_class + '/' + school_id" >উপবৃত্তি তালিকা </a>

<div class="table-responsive">
<table class="table table-striped">
<thead>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/frontlayout.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@



<script src="{{ asset('js/frontend.js?ver=1.2.65') }}" async ></script>
<script src="{{ asset('js/frontend.js?ver=1.2.66') }}" async ></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin="anonymous"></script>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/layout.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@



<script src="{{ asset('js/backend.js?ver=1.2.65') }}"></script>
<script src="{{ asset('js/backend.js?ver=1.2.66') }}"></script>



Expand Down
1 change: 1 addition & 0 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@

Route::get('/result_sheet/pdf/{school_id}/{group}/{class}/{exam}/All/{date}', [resultController::class, 'resultViewpdf']);
Route::get('/student_list/pdf/{year}/{class}/{school_id}', [studentsController::class, 'student_list_pdf']);
Route::get('/student_list_stipend/pdf/{year}/{class}/{school_id}', [studentsController::class, 'student_list_stipend_pdf']);
Route::get('/{vue_capture?}', function () {
// return Auth::user()->roles->permission;
// Auth::user()->roles;
Expand Down

0 comments on commit 0222c49

Please sign in to comment.