/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
- <?php namespace App\Laravel\Controllers\Backoffice;
- /**
- *
- * Models used for this controller
- */
- use App\Laravel\Models\Question;
- /**
- *
- * Requests used for validating inputs
- */
- use App\Laravel\Requests\Backoffice\AdvertisementRequest;
- /**
- *
- * Classes used for this controller
- */
- use App\Http\Requests\Request;
- use Input, Helper, Carbon, Session, Str, File, Image, ImageUploader;
- class QuestionController extends Controller{
- /**
- *
- * @var Array $data
- */
- protected $data;
- public function __construct () {
- parent::__construct();
- $view = Input::get('view','table');
- array_merge($this->data, parent::get_data());
- $this->data['page_title'] = "Question";
- $this->data['page_description'] = "This is the general information about ".$this->data['page_title'].".";
- $this->data['route_file'] = "question";
- }
- public function index () {
- $this->data['question'] = Question::orderBy('created_at',"DESC")->get();
- return view('backoffice.'.$this->data['route_file'].'.index',$this->data);
- }
- }