Advertisement
Guest User

complete

a guest
Oct 23rd, 2019
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. public function Announcement()
  2. {
  3. $categorydate = Investor::selectRaw('YEAR(date) AS tahun')
  4. ->where('coverage', '=', 'ANNOUNCEMENT')
  5. ->whereRaw('YEAR(date)>0')
  6. ->groupBy('tahun')
  7. ->orderBy('tahun','DESC')
  8. ->pluck('tahun')->all();
  9.  
  10. $ann = Investor::select(DB::raw('name,title, title_en, subtitle, coverage'))
  11. ->where('coverage', '=', 'ANNOUNCEMENT')
  12. ->get();
  13.  
  14. $inves= Investor::select(DB::raw('title, title_en'))
  15. ->where('type', '=', 'INVESTOR RELATIONS')
  16. ->orderBy('date','DESC')
  17. ->get();
  18.  
  19. $extension = Investor::select('document')
  20. ->where('type','=','investor')
  21. ->where('coverage','=','ANNOUNCEMENT')
  22. ->get();
  23.  
  24.  
  25.  
  26. $announcement = Investor::select('id','date', 'document', 'excerpt')
  27. ->where('type','=','investor')
  28. ->where('coverage','=','ANNOUNCEMENT')
  29. ->get();
  30.  
  31. return view('investors.announcement')
  32. ->with('ann',$ann)
  33. ->with('inves',$inves)
  34. ->with('announcement', $announcement)
  35. ->with('categorydate',$categorydate);
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement