示例#1
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     //
     $total_trusts = Trusts::count();
     $definitions = Definitions::all();
     $years = Trusts::select('year')->groupBy('year')->lists('year');
     return view('watsonv2', ['total' => $total_trusts, 'years' => $years, 'definitions' => $definitions]);
 }
示例#2
0
 public function index()
 {
     $categories = ['branch', 'type', 'scope', 'theme', 'unit', 'settlor', 'fiduciary'];
     $definitions = Definitions::all();
     $trusts = Trusts::select('id', 'registry', 'income', 'yield', 'expenses', 'availability', 'year', 'initial_date')->get();
     $registries = Trusts::select("id", "registry", "designation")->groupBy("registry")->get();
     return view('data', ['trusts' => $trusts, 'categories' => $categories, 'definitions' => $definitions, 'registries' => $registries]);
 }
示例#3
0
 public function index()
 {
     $main_article = Article::all()->first();
     $articles = Article::all();
     $categories = ['branch', 'type', 'scope', 'theme', 'unit', 'settlor', 'fiduciary'];
     $year_max = max(Trusts::select("year")->groupBy("year")->get()->toArray());
     $year = $year_max["year"];
     $definitions = Definitions::all();
     $category = $definitions->where("name", "branch")->first();
     $trusts = Trusts::groupBy("registry")->select("id", "branch", "type", "scope", "theme", "unit", "settlor", "fiduciary", 'income', 'yield', 'expenses', 'availability', 'initial_amount', 'year')->where("year", $year)->get();
     return view('home')->with(['main_article' => $main_article, 'articles' => $articles, 'file_url' => '/images/articles/', 'months' => $this->months, 'trusts' => $trusts, 'categories' => $categories, 'category' => $category, 'definitions' => $definitions, 'year' => $year]);
 }
示例#4
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index($registry)
 {
     //
     $trusts = Trusts::where('registry', $registry)->orderBy('year', 'asc')->get()->toArray();
     if (empty($trusts)) {
         $trust = Trusts::find($registry)->toArray();
         $trusts = [$trust];
     } else {
         $trust = $trusts[0];
     }
     $definitions = Definitions::all();
     return view('Gregson', ['trusts' => $trusts, 'selected' => $trust, 'definitions' => $definitions]);
 }