<?php
namespace App\Http\Controllers;
use App\Faq;
use App\Problema;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Gate;
use Symfony\Component\HttpFoundation\Response;
class FAQController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
//
// abort_if(Gate::denies('faq_access'), Response::HTTP_FORBIDDEN, '403 Forbidden');
$faq = Faq::all();
$faqSeguranca = Problema::query()
->select('problemas.*')
->where('faq_id', '=', 1)
->get();
$faqCartoes = Problema::query()
->select('problemas.*')
->where('faq_id', '=', 2)
->get();
$faqPagamentos = Problema::query()
->select('problemas.*')
->where('faq_id', '=', 3)
->get();
$faqConta = Problema::query()
->select('problemas.*')
->where('faq_id', '=', 4)
->get();
$faqTransferencia = Problema::query()
->select('problemas.*')
->where('faq_id', '=', 5)
->get();
$faqTV = Problema::query()
->select('problemas.*')
->where('faq_id', '=', 6)
->get();
return view('tickets.faq', ['faq'=>$faq, 'faqSeguranca'=>$faqSeguranca, 'faqCartoes'=>$faqCartoes,
'faqPagamentos'=>$faqPagamentos, 'faqConta'=>$faqConta, 'faqTransferencia'=>$faqTransferencia, 'faqTV'=>$faqTV]);
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
//
return view('tickets.faq');
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
//
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
//
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
//
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
//
}
}