public function getHome()
 {
     $categories = Event::all();
     $employee = Employee::all();
     $invoice = Invoice::orderBy('Id', 'DESC')->get();
     return View('executor/home')->with(array('categories' => $categories, 'employee' => $employee, 'invoice' => $invoice));
 }
 public function getIndex()
 {
     $categories = Event::all();
     $employee = Employee::all();
     $invoice = Invoice::orderBy('Id', 'desc')->get();
     return View('home1')->with(array('categories' => $categories, 'employee' => $employee, 'invoice' => $invoice));
 }
 public function getHome()
 {
     $year = date("Y");
     $categories = Event::where(DB::raw('year(date)'), $year)->get();
     $employee = Employee::all();
     // dd($year);
     $invoice = Invoice::orderBy('Id', 'DESC')->where(DB::raw('year(InvoiceDate)'), $year)->where(DB::raw('year(DueDate)'), $year)->get();
     return View('executor/home')->with(array('categories' => $categories, 'employee' => $employee, 'invoice' => $invoice));
 }
 public function getHome()
 {
     $year = date("Y");
     $varr = Auth::user()->empid;
     $evarr = User::where('empid', $varr)->get();
     $edetails = Employee::where('emp_ide_id', $varr)->get();
     $categories = Event::where(DB::raw('year(date)'), $year)->get();
     $employee = Employee::all();
     $invoice = Invoice::orderBy('Id', 'DESC')->where(DB::raw('year(InvoiceDate)'), $year)->where(DB::raw('year(DueDate)'), $year)->get();
     $invnull = Invoice::where('Status', '=', 'Null')->get();
     return View('reviewer/home')->with(array('categories' => $categories, 'employee' => $employee, 'invoice' => $invoice, 'invnull' => $invnull, 'edetails' => $edetails));
 }
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $Invoices = Invoice::orderBy('created_at', 'desc')->paginate(5);
     return view('invoice.list', ['Invoices' => $Invoices]);
 }
Beispiel #6
0
 static function getLast($count)
 {
     $Last = Invoice::orderBy('created_at', 'desc')->take($count)->get();
     return $Last;
 }
<?php

use App\Invoice;
use App\Event;
$lastId = Invoice::orderBy('updated_at', 'desc')->first();
$lastinvoice = Invoice::where('Id', $lastId->Id)->get();
foreach ($lastinvoice as $inv) {
    $evname = $inv['EventName'];
}
$varr = Event::where('event', $evname)->get();
?>
@foreach($lastinvoice as $inv)

@foreach($varr as $invar)


 <p><b>Dear {{$inv['ClientName']}},</b></p>
<p>We thank <b>{{$inv['Companyname']}}</b> for giving us an opportunity to serve you at our <b>{{$inv['EventName']}}</b> initiative to be held on
<b>{{$invar['date']}}</b> at <b>{{$invar['city']}}-{{$invar['country']}}</b> , in this regards please find attached Pro-Forma 
 invoice numbered : <b>{{$inv['InvoiceCode']}}</b> dated : <b>{{$inv['InvoiceDate']}}</b>.</p>

<p><b>Special Note: please pay the due amount as per the terms mentioned in the pro-forma invoice.</b></p>
 @endforeach

@endforeach