PageRenderTime 27ms CodeModel.GetById 19ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/app/Laravel/Controllers/Frontend/PartnerController.php

https://bitbucket.org/cityserv/techreportph
PHP | 42 lines | 17 code | 9 blank | 16 comment | 0 complexity | d988f79aeb8e50c42074e9d4afccff0b MD5 | raw file
 1<?php 
 2
 3namespace App\Laravel\Controllers\Frontend;
 4
 5/*
 6*
 7* Models used for this controller
 8*/
 9use App\User;
10use App\Laravel\Models\Partner;
11
12/*
13*
14* Requests used for validating inputs
15*/
16
17
18/*
19*
20* Classes used for this controller
21*/
22use Helper, Carbon, Session, Str, DB;
23
24class PartnerController extends Controller{
25
26	/*
27	*
28	* @var Array $data
29	*/
30	protected $data;
31
32	public function __construct () {
33		$this->data = [];
34		parent::__construct();
35		array_merge($this->data, parent::get_data());
36	}
37
38	public function index ($type = NULL) {
39		$this->data['partners'] = Partner::where('type',$type)->get();
40		return view('frontend._pages.partners',$this->data);
41	}
42}