PageRenderTime 18ms CodeModel.GetById 13ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/app/Laravel/Controllers/Backoffice/QuestionController.php

https://bitbucket.org/cityserv/techreportph
PHP | 44 lines | 20 code | 8 blank | 16 comment | 0 complexity | 4d418481b3e50690879a454e48720405 MD5 | raw file
 1<?php namespace App\Laravel\Controllers\Backoffice;
 2
 3/**
 4*
 5* Models used for this controller
 6*/
 7use App\Laravel\Models\Question;
 8
 9/**
10*
11* Requests used for validating inputs
12*/
13use App\Laravel\Requests\Backoffice\AdvertisementRequest;
14
15/**
16*
17* Classes used for this controller
18*/
19use App\Http\Requests\Request;
20use Input, Helper, Carbon, Session, Str, File, Image, ImageUploader;
21
22class QuestionController extends Controller{
23
24	/**
25	*
26	* @var Array $data
27	*/
28	protected $data;
29
30	public function __construct () {
31		parent::__construct();
32		$view = Input::get('view','table');
33		array_merge($this->data, parent::get_data());
34		$this->data['page_title'] = "Question";
35		$this->data['page_description'] = "This is the general information about ".$this->data['page_title'].".";
36		$this->data['route_file'] = "question";
37	}
38
39	public function index () {
40		$this->data['question'] = Question::orderBy('created_at',"DESC")->get();
41		return view('backoffice.'.$this->data['route_file'].'.index',$this->data);
42	}
43
44}