本文整理汇总了PHP中app\helpers\Helper::sendStudentInvoice方法的典型用法代码示例。如果您正苦于以下问题:PHP Helper::sendStudentInvoice方法的具体用法?PHP Helper::sendStudentInvoice怎么用?PHP Helper::sendStudentInvoice使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\helpers\Helper
的用法示例。
在下文中一共展示了Helper::sendStudentInvoice方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: mail_invoice
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function mail_invoice($student_id, $fee_schedule_code)
{
$table = 'fee_sch_' . session()->get('current_session') . '_' . session()->get('current_term');
$data['fee_elements'] = DB::table($table)->where('fee_schedule_code', $fee_schedule_code)->get();
$data['fee_schedule'] = DB::table($table)->where('fee_schedule_code', $fee_schedule_code)->first();
$data['invoice'] = \DB::table('invoices_' . \Session::get('current_session') . '_' . \Session::get('current_term'))->where(['student_id' => $student_id, 'fee_schedule_code' => $fee_schedule_code])->first();
// dd($data['fee_schedule']);
$student = Student::findOrFail($student_id);
$data['student'] = $student;
$data['school'] = School::findOrFail(1);
//get this students parent
$data['parent_email'] = $data['student']->studentParent->email;
$send_mail = Helper::sendStudentInvoice($data, $student);
// dd($send_mail);
return redirect()->back();
}